From: Theodore Ts'o <tytso@mit.edu>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH 6/9] filefrag: accommodate holes when calculating expected values
Date: Sat, 5 Mar 2016 21:41:00 -0500 [thread overview]
Message-ID: <20160306024100.GG10297@thunk.org> (raw)
In-Reply-To: <20160213223804.25381.9378.stgit@birch.djwong.org>
On Sat, Feb 13, 2016 at 02:38:04PM -0800, Darrick J. Wong wrote:
> Currently, filefrag's "expected physical block" column expects extent
> records to be physically adjacent regardless of the amount of logical
> block space between the two records. This means that if we punch a
> hole in a file, we get reports like this:
>
> ext: logical_offset: physical_offset: length: expected: flags:
> 4: 4096.. 8343: 57376.. 61623: 4248:
> 5: 8345.. 10313: 61625.. 63593: 1969: 61624:
>
> Notice how it expects 8345 to map to 61624, and scores this against
> the fragmentation of the file. Flagging this as "unexpected" is
> incorrect because the gap in the logical mapping is exactly the same
> size as the gap in the physical extents.
>
> Furthermore, this particular mapping leaves the door open to the
> optimal mapping -- if a write to block 8344 causes it to be mapped to
> 61624, the entire range 4096-10313 can be mapped with a single extent.
> Until that happens, there's no way to combine extents 4 and 5 because
> of the gap in the logical mapping at block 8344.
>
> Therefore, tweak the extent report to account for holes.
>
> v2: Make it work for extents crossing FIEMAP calls, and clean up the
> FIBMAP version to report correct expected values.
>
> v3: Don't count physically but not logically contiguous extents
> in the fragmentation summary.
>
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Thanks, applied.
- Ted
next prev parent reply other threads:[~2016-03-06 2:41 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-13 22:37 [PATCH 0/9] e2fsprogs: save checksum seeds; fix broken xattr editing; misc fixes Darrick J. Wong
2016-02-13 22:37 ` [PATCH 1/9] libext2fs: store checksum seed in superblock Darrick J. Wong
2016-03-05 23:21 ` Theodore Ts'o
2016-02-13 22:37 ` [PATCH 2/9] tune2fs: allow user to turn on saving the checksum seed Darrick J. Wong
2016-03-05 23:36 ` Theodore Ts'o
2016-02-13 22:37 ` [PATCH 3/9] e2fsck: check the checksum seed feature flag is set correctly Darrick J. Wong
2016-03-05 23:37 ` Theodore Ts'o
2016-02-13 22:37 ` [PATCH 4/9] mke2fs: store checksum seed at format time Darrick J. Wong
2016-03-06 0:19 ` Theodore Ts'o
2016-02-13 22:37 ` [PATCH 5/9] tests: check proper operation of metadata_csum_seed Darrick J. Wong
2016-03-06 0:20 ` Theodore Ts'o
2016-02-13 22:38 ` [PATCH 6/9] filefrag: accommodate holes when calculating expected values Darrick J. Wong
2016-03-06 2:41 ` Theodore Ts'o [this message]
2016-02-13 22:38 ` [PATCH 7/9] tune2fs: confirm dangerous operations Darrick J. Wong
2016-02-15 0:49 ` Andreas Dilger
2016-02-15 16:53 ` Darrick J. Wong
2016-03-06 5:10 ` Theodore Ts'o
2016-03-06 6:24 ` Darrick J. Wong
2016-02-13 22:38 ` [PATCH 8/9] tune2fs: recover the journal Darrick J. Wong
2016-03-06 5:23 ` Theodore Ts'o
2016-02-13 22:38 ` [PATCH 9/9] libext2fs: sort keys for xattr blocks Darrick J. Wong
2016-02-14 10:37 ` Richard Purdie
2016-03-06 3:55 ` Theodore Ts'o
2016-03-06 22:08 ` Darrick J. Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160306024100.GG10297@thunk.org \
--to=tytso@mit.edu \
--cc=darrick.wong@oracle.com \
--cc=linux-ext4@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.