]> www.infradead.org Git - users/jedix/linux-maple.git/commit
btrfs: allow inline data extents creation if block size < page size
authorQu Wenruo <wqu@suse.com>
Fri, 15 Nov 2024 06:03:44 +0000 (16:33 +1030)
committerDavid Sterba <dsterba@suse.com>
Tue, 18 Mar 2025 19:35:49 +0000 (20:35 +0100)
commit9951ec02f255c7b1e6f684090f464268d4c45184
tree6522df8267abb4604d4f35fc65d2c13d45993bb0
parent0d31ca6584f21821c708752d379871b9fce2dc48
btrfs: allow inline data extents creation if block size < page size

Previously inline data extents creation was disabled if the block size
(previously called sector size) is smaller than the page size, for the
following reasons:

- Possible mixed inline and regular data extents
  However this is also the same if the block size matches the page size,
  thus we do not treat mixed inline and regular extents as an error.

  And the chance to cause mixed inline and regular data extents are not
  even increased, it has the same requirement (compressed inline data
  extent covering the whole first block, followed by regular extents).

- Inability to handle async/inline delalloc range for block size < page
  size cases
  This is already fixed since commit 1d2fbb7f1f9e ("btrfs: allow
  compression even if the range is not page aligned").

  This was the major technical obstacle, but it's not anymore.

With that removed, we can enable inline data extents creation no matter
the block size nor the page size, allowing btrfs to have the same
capacity for all block sizes.

Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode.c