* Impossible case in btrfs self test?
@ 2014-09-10 2:40 Qu Wenruo
0 siblings, 0 replies; only message in thread
From: Qu Wenruo @ 2014-09-10 2:40 UTC (permalink / raw)
To: linux-btrfs
Hi, all
Btrfs self test seems to contain impossible case in it:
[0 - 5][5 - 6][6 - 10][10 - 4096]
[hole ][inline][ hole ][ regular ]
I really don't understand how such case can happen in real world.
If we create an inline extent, and punch hole inside inline extent, it
will only zero out the
inline extents, but not to create a new small hole extent.
It is also strange that if we do write beyong the inline range and reach 4K,
then it will be converted to a normal extent, no more inline extent any
more.
In fact, these test cases forces extent maps to handle unaligned extent.
However in fact, this will not happen except inlined file extent,
and regular/preallocated/hole file extents are all page size aligned.
Commit like the following could align to pagesize without problem if
there is no
such self test.
Actually the commit will cause some bug if not aligned to page size. My
fault again. :(
51f395ad4058883e4273b02fdebe98072dbdc0d2 btrfs: Use right extent length
when inserting overlap extent map.
Should we change the inode-test self test?
Thanks,
Qu
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-09-10 2:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-10 2:40 Impossible case in btrfs self test? Qu Wenruo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).