Hello,

At file.c:306

        inline_size = end_pos;
        if (isize >= BTRFS_MAX_INLINE_DATA_SIZE(root) ||
            inline_size > 32768 ||
            inline_size >= BTRFS_MAX_INLINE_DATA_SIZE(root))

When 'end_pos' is larger than 2^32,  'inline_size' may become a small
value. In this case, 'dirty_and_release_pages' may try to insert a
very large inline extent.

Regards
YZ
---
diff -r 2456df534a5f file.c
--- a/file.c    Thu Nov 01 19:45:34 2007 -0400
+++ b/file.c    Mon Nov 05 07:41:23 2007 +0800
@@ -239,7 +239,7 @@ static int dirty_and_release_pages(struc
        u64 start_pos;
        u64 end_of_last_block;
        u64 end_pos = pos + write_bytes;
-       u32 inline_size;
+       u64 inline_size;
        loff_t isize = i_size_read(inode);

        em = alloc_extent_map(GFP_NOFS);

_______________________________________________
Btrfs-devel mailing list
[email protected]
http://oss.oracle.com/mailman/listinfo/btrfs-devel

Reply via email to