Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 653234

Summary: filefrag returns wrong extent counts
Product: Red Hat Enterprise Linux 6 Reporter: Igor Zhang <yugzhang>
Component: e2fsprogsAssignee: Eric Sandeen <esandeen>
Status: CLOSED ERRATA QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: low Docs Contact:
Priority: low    
Version: 6.0CC: bnater, branto, esandeen, sct
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: e2fsprogs-1.41.12-5.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-19 14:07:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Igor Zhang 2010-11-15 03:36:18 UTC
Description of problem:
When testing xfs with xfstests, 218 always failed and then I found a problem about filefrag.
Steps(on top of ext4):
# touch a
# filefrag a
a: 0 extents found
  ^^^^ 
# filefrag -v a
Filesystem type is: ef53
File size of a is 0 (0 blocks, blocksize 4096)
 ext logical physical expected length flags
a: 1 extent found
  ^^^^
[root@tyrannosaurus ~]# rpm -qf `which filefrag`
e2fsprogs-1.41.12-3.el6.x86_64

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:
filefrag returns wrong extent counts

Expected results:
With or without the option -v, filefrag should return a consistent extent count

Additional info:
RHEL5.6 preserved this behaviour:
[root@intel-s3e3144-02 ~]# touch a
[root@intel-s3e3144-02 ~]# filefrag a
a: 1 extent found
  ^^^^
[root@intel-s3e3144-02 ~]# filefrag -v a
Checking a
Filesystem type is: ef53
Filesystem cylinder groups is approximately 435
Blocksize of file a is 4096
File size of a is 0 (0 blocks)
First block: 0
Last block: 0
a: 1 extent found
  ^^^^
[root@intel-s3e3144-02 ~]# rpm -qf `which filefrag`
e2fsprogs-1.39-23.el5

Comment 2 Eric Sandeen 2010-11-15 03:57:01 UTC
Yes, filefrag is kind of a mess in this respect.

Comment 3 Eric Sandeen 2010-11-22 15:33:06 UTC
There are some oddities in how filefrag reports extents - depending on how it's invoked and what type of file it's looking at, it (intentionally, I think) reports different numbers of extents.  But this looks like an actual bug; I'll fix things that look like bugs and explain away things that are part of the upstream design ;)

Comment 4 Eric Sandeen 2010-11-23 23:30:12 UTC
Sent a patch for this upstream.

http://marc.info/?l=linux-ext4&m=129055450828278&w=2

-Eric

Comment 5 Eric Sandeen 2010-12-16 20:09:35 UTC
Built & tagged in e2fsprogs-1.41.12-5.el6

Comment 7 Branislav NĂ¡ter 2011-03-04 12:50:22 UTC
Bugfix was successfully verified on package e2fsprogs-1.41.12-7.el6 on all architectures (i386,x86_64,ppc64,s390x).

filefrag is now displaying correct values of extents.

# touch b
# filefrag b
b: 0 extents found
# filefrag -v b
Filesystem type is: ef53
File size of b is 0 (0 blocks, blocksize 4096)
b: 0 extents found

Comment 8 errata-xmlrpc 2011-05-19 14:07:20 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0702.html