Btrfs: Allow large data extents in a single file to span into metadata block groups
Signed-off-by: Chris Mason <chris.mason@oracle.com>
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index 5ceaed2..9dd2c5c 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -439,6 +439,12 @@
struct btrfs_file_extent_item);
found_type = btrfs_file_extent_type(leaf, extent);
if (found_type == BTRFS_FILE_EXTENT_REG) {
+ extent_end =
+ btrfs_file_extent_disk_bytenr(leaf,
+ extent);
+ if (extent_end)
+ *hint_byte = extent_end;
+
extent_end = key.offset +
btrfs_file_extent_num_bytes(leaf, extent);
found_extent = 1;