From: Josef Bacik <[email protected]>

Fscrypt will use our entire inline extent range for symlinks, which
uncovered a bug in btrfs check where we set the maximum inline extent
size to

min(sectorsize - 1, BTRFS_MAX_INLINE_DATA_SIZE)

which isn't correct, we have always allowed sectorsize sized inline
extents, so fix check to use the correct maximum inline extent size.

Signed-off-by: Josef Bacik <[email protected]>
Signed-off-by: Daniel Vacek <[email protected]>
---
 check/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/check/main.c b/check/main.c
index 5e29e2c5..dedb4db4 100644
--- a/check/main.c
+++ b/check/main.c
@@ -1720,7 +1720,7 @@ static int process_file_extent(struct btrfs_root *root,
        u64 disk_bytenr = 0;
        u64 extent_offset = 0;
        u64 mask = gfs_info->sectorsize - 1;
-       u32 max_inline_size = min_t(u32, mask,
+       u32 max_inline_size = min_t(u32, gfs_info->sectorsize,
                                BTRFS_MAX_INLINE_DATA_SIZE(gfs_info));
        u8 compression;
        int extent_type;
-- 
2.53.0


Reply via email to