Btrfs: Fix mount -o max_inline=0
authorChris Mason <chris.mason@oracle.com>
Wed, 11 Jun 2008 20:51:38 +0000 (16:51 -0400)
committerChris Mason <chris.mason@oracle.com>
Thu, 25 Sep 2008 15:04:03 +0000 (11:04 -0400)
max_inline=0 used to force the max_inline size to one sector instead.  Now
it properly disables inline data items, while still being able to read
any that happen to exist on disk.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/super.c

index 346932e546baca227bcf918e58de72e375db48a4..f3274befd46a2b9cef628c9a2b3088b3cc69d32a 100644 (file)
@@ -184,8 +184,11 @@ int btrfs_parse_options(struct btrfs_root *root, char *options)
                                info->max_inline = btrfs_parse_size(num);
                                kfree(num);
 
-                               info->max_inline = max_t(u64,
-                                       info->max_inline, root->sectorsize);
+                               if (info->max_inline) {
+                                       info->max_inline = max_t(u64,
+                                               info->max_inline,
+                                               root->sectorsize);
+                               }
                                printk(KERN_INFO "btrfs: max_inline at %llu\n",
                                        info->max_inline);
                        }