linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* About the behavior of inline extent
@ 2017-04-10  3:27 Qu Wenruo
  2017-04-10 14:17 ` Josef Bacik
  0 siblings, 1 reply; 5+ messages in thread
From: Qu Wenruo @ 2017-04-10  3:27 UTC (permalink / raw)
  To: Chris Mason, David Sterba, Josef Bacik, btrfs

Hi,

Recent btrfs/137 test case makes me wonder what's the designed behavior 
of btrfs inline data extent.

The current behavior in fact is quite a chaos.
We need a standard of how inline extent should behave.

1) max_inline limit
    The problem of current max_inline is, it's never clear what it is
    limiting.

    For example, we don't allow page sized inline extent if not
    compressed.
    But we allow page sized inline extent if it's compressed.
    Is it just limiting size after compression?
    What if we really want to limit size before compression?

2) inline extent condition
    Is inline extent allowed if we have following regular extent?

    For plain extent, prealloc can cause regular extent to co-exist with
    inlined one.
    While normal write will only convert inlined extent to regular one.

    While for compressed extent, it can co-exist with regular extent, by
    # xfs_io -f -c "pwrite 0 4k" -c sync -c "pwrite 4k 16k" /mnt/btrfs/file

    So which is the correct behavior?
    Personally I think we should not allow co-exist, as it's already
    causing a lot of fixes for it, that's to say neither current
    behavior is correct.

3) inline extent and fallocate
    For inline extent, as long as we are calling fallocate inside the
    page size, only the isize is expanded.

    Only beyond page size, we get prealloc extents.
    (However inlined extent is still here, not converted)

    What's the designed behavior? Convert inline to regular or just
    leave it as is?

Thanks,
Qu



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-04-11  2:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-10  3:27 About the behavior of inline extent Qu Wenruo
2017-04-10 14:17 ` Josef Bacik
2017-04-10 15:34   ` David Sterba
2017-04-11  2:20     ` Qu Wenruo
2017-04-11  2:27       ` 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).