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 927541 - filefrag: filefrag -v reports wrong extent count
Summary: filefrag: filefrag -v reports wrong extent count
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: e2fsprogs
Version: 6.4
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Eric Sandeen
QA Contact: Petr Beňas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-26 07:35 UTC by Eryu Guan
Modified: 2015-01-04 23:04 UTC (History)
5 users (show)

Fixed In Version: e2fsprogs-1.41.12-15.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-11-21 22:43:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1689 0 normal SHIPPED_LIVE e2fsprogs bug fix update 2013-11-20 21:52:23 UTC

Description Eryu Guan 2013-03-26 07:35:20 UTC
Description of problem:
[root@hp-dl388g8-01 ~]# dd if=/dev/zero of=testfile bs=$block_size count=1 seek=$((2**32 - 2))
[root@hp-dl388g8-01 ~]# filefrag testfile
testfile: 1 extent found            <====== 1 extent in non-verbose mode
[root@hp-dl388g8-01 ~]# filefrag -v testfile
Filesystem type is: ef53
File size of testfile is 17592186040320 (4294967295 blocks, blocksize 4096)
 ext   logical physical expected length flags
   0 4294967294 11188222               1 eof
testfile: 2 extents found           <======= 2 extents in verbose mode

Version-Release number of selected component (if applicable):
e2fsprogs-1.41.12-14.el6

How reproducible:
always

Steps to Reproduce:
1.dd if=/dev/zero of=testfile bs=$block_size count=1 seek=$((2**32 - 2))
2.filefrag testfile
3.filefrag -v testfile
  
Actual results:
filefrag -v reports 2 extents for testfile

Expected results:
1 extent

Additional info:
e2fsprogs on RHEL7 doesn't have this issue, also e2fsprogs from F18

Comment 1 Eric Sandeen 2013-06-06 17:18:23 UTC
There are a lot of upstream filefrag fixes, I'll pull them all in w/ this bug.

339e457939bf1663ac2dbd52e47cd6e145726771 filefrag: fix segfault on virtual fs
036fda6d487737eac9be086d999b7480a81d37ea filefrag: fix report of number of extents
605cf6edaf6fce6a3810cda24c6ceca90af1a096 filefrag: fix infinite loop in filefrag
9c58eaf7d3a47d83945bd3756271e7ae675b25e1 filefrag: fix an off by one error in when printing the next expected block
a00be17e4768c5ce55f74be518f35f5d5d1b158b filefrag: Display the number of contiguous, not physical, extents
1e003cc77d43ee01eeaae962ff6d264c9a74a363 filefrag: Fix uninitialized "expected" value
a8d8432b584c222dc7960c15cd7b9acbc7c72352 filefrag: count 0 extents properly when verbose
b637f8e7ed4309ec39d87ea0cf07f48fc0610266 filefrag: remove useless assignment

Comment 7 Eric Sandeen 2013-06-26 15:18:32 UTC
One thing that should possibly be added to the test is a "sync" (or umount/remount) after creating the file which filefrag inspects.  Otherwise differences with respect to delayed allocation (which is all kernel behavior) may influence the test.

See how the answer changes after a sync for a freshly-created file:

[root@bp-05 tmp]# filefrag -v $mnt/testfile
Filesystem type is: ef53
File size of /mnt/bz927541/testfile is 17592186040320 (4294967295 blocks, blocksize 4096)
/mnt/bz927541/testfile: 0 extents found

[root@bp-05 tmp]# sync

[root@bp-05 tmp]# filefrag -v $mnt/testfile
Filesystem type is: ef53
File size of /mnt/bz927541/testfile is 17592186040320 (4294967295 blocks, blocksize 4096)
 ext   logical physical expected length flags
   0 4294967294     1550               1 eof
/mnt/bz927541/testfile: 2 extents found

Comment 8 Eric Sandeen 2013-06-26 15:27:48 UTC
I think that seeing 2 extents not one (above) was a local problem here; re-installing the brew-built packages, I see one extent as I should.

Adding syncs to the test will take kernelside delalloc behavior out of the mix, and I hope the test will pass.

Thanks,
-Eric

Comment 12 Petr Beňas 2013-08-13 09:31:14 UTC
Reproduced in e2fsprogs-1.41.12-14.el6.x86_64 and verified in e2fsprogs-1.41.12-15.el6.x86_64.

Comment 13 errata-xmlrpc 2013-11-21 22:43:46 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-1689.html


Note You need to log in before you can comment on or make changes to this bug.