Bug 840848 - filefrag -v returns wrong extent counts
Summary: filefrag -v returns wrong extent counts
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: e2fsprogs
Version: 17
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Eric Sandeen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 840852
TreeView+ depends on / blocked
 
Reported: 2012-07-17 11:35 UTC by Martin Kyral
Modified: 2012-11-13 16:17 UTC (History)
4 users (show)

Fixed In Version: e2fsprogs-1.42.5
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 840852 (view as bug list)
Environment:
Last Closed: 2012-11-13 16:17:00 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Martin Kyral 2012-07-17 11:35:02 UTC
Description of problem:
I found out that on Fedora 17, filefrag -v returns wrong extent count. In fact, the utility behaves similar as described in https://bugzilla.redhat.com/show_bug.cgi?id=653234 but the behavior is opposite now.

Version-Release number of selected component (if applicable):
e2fsprogs-1.42.3-2.fc17

How reproducible:
Always


Steps to Reproduce:
1. touch foo
2. filefrag foo
3. filefrag -v foo
  
Actual results:
0 [mkyral@localhost ~ ]$ filefrag foo
foo: 1 extent found
   ^^^^^
0 [mkyral@localhost ~ ]$ filefrag -v foo
Filesystem type is: ef53
File size of foo is 0 (0 blocks, blocksize 4096)
foo: 0 extents found
   ^^^^^


Expected results:
0 [mkyral@localhost ~ ]$ filefrag foo
foo: 1 extent found
   ^^^^^
0 [mkyral@localhost ~ ]$ filefrag -v foo
Filesystem type is: ef53
File size of foo is 0 (0 blocks, blocksize 4096)
foo: 1 extent found

Additional info:

Comment 1 Eric Sandeen 2012-07-17 21:57:33 UTC
Well, actually, if you simply "touch foo" then it has 0 extents.

You should get 0 in both cases...

There was a patch on the list last April, "[PATCH] E2fsprogs/filefrag: fix filefrag regression" which addressed this but never got merged.  I'll review it & ping Ted.

Thanks,
-Eric

Comment 2 Eric Sandeen 2012-11-13 16:17:00 UTC
commit 036fda6d487737eac9be086d999b7480a81d37ea
Author: Liu Bo <liubo2009.com>
Date:   Sat Jul 28 17:29:13 2012 -0400

    filefrag: fix report of number of extents

fixed this.

Present in v1.42.5; I don't really think it needs an update pushed to F17.  If you disagree, please reopen and I can do so.


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