Re: [PATCHv3 6/6] Documentation: Correct the description of FIEMAP_EXTENT_LAST

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 2/26/20 9:47 PM, Darrick J. Wong wrote:
On Wed, Feb 26, 2020 at 05:05:03AM -0800, Matthew Wilcox wrote:
On Wed, Feb 26, 2020 at 03:27:08PM +0530, Ritesh Harjani wrote:
Currently FIEMAP_EXTENT_LAST is not working consistently across
different filesystem's fiemap implementations and thus this feature
may be broken. So fix the documentation about this flag to meet the
right expectations.

Are you saying filesystems have both false positives and false negatives?
I can understand how a filesystem might fail to set FIEMAP_EXTENT_LAST,
but not how a filesystem might set it when there's actually another
extent beyond this one.

  * FIEMAP_EXTENT_LAST
-This is the last extent in the file. A mapping attempt past this
-extent will return nothing.
+This is generally the last extent in the file. A mapping attempt past this
+extent may return nothing. But the user must still confirm by trying to map
+past this extent, since different filesystems implement this differently.

"This flag means nothing and can be set arbitrarily by the fs for the lulz."


:) Got it. Will add more information to it.


Yuck.  I was really hoping for "This is set on the last extent record in
the dataset generated by the query parameters", particularly becaue
that's how e2fsprogs utilties interpret that flag.

-extent may return nothing. But the user must still confirm by trying to map
-past this extent, since different filesystems implement this differently.
+extent may return nothing. In some implementations this flag is also set on
+the last dataset queried by the user (via fiemap->fm_length).


Let me know if above looks good.

-ritesh




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux