]> git.hungrycats.org Git - linux/commitdiff
Btrfs: set default max_inline to 8KiB instead of 8MiB
authorFilipe David Borba Manana <fdmanana@gmail.com>
Thu, 8 Aug 2013 21:45:48 +0000 (22:45 +0100)
committerZygo Blaxell <zblaxell@serenity.furryterror.org>
Wed, 3 Dec 2014 15:15:50 +0000 (10:15 -0500)
8MiB is way too large and likely set by mistake. This is not
a significant issue as in practice the max amount of data
added to an inline extent is also limited by the page cache
and btree leaf sizes.

Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com>
Reviewed-by: David Sterba <dsterba@suse.cz>
Signed-off-by: David Sterba <dsterba@suse.cz>
(cherry picked from commit 95ac567af212db3293af3897ccb521efdf1dd7ff)

fs/btrfs/ctree.h
fs/btrfs/disk-io.c
fs/btrfs/super.c

index 3a1c94a7115fb2e90d3a7354c3fd60bc80e8e468..165e426208f48af3793026a39852b9ae447a7b04 100644 (file)
@@ -2091,6 +2091,7 @@ struct btrfs_ioctl_defrag_range_args {
 #define        BTRFS_MOUNT_CHANGE_INODE_CACHE  (1 << 24)
 
 #define BTRFS_DEFAULT_COMMIT_INTERVAL  (30)
+#define BTRFS_DEFAULT_MAX_INLINE       (8192)
 
 #define btrfs_clear_opt(o, opt)                ((o) &= ~BTRFS_MOUNT_##opt)
 #define btrfs_set_opt(o, opt)          ((o) |= BTRFS_MOUNT_##opt)
index f4d5dcfe7daa1b70274f9f062b139f8db33b6244..4439c124b2d37b73bec882fa00ebbf7354ee87a3 100644 (file)
@@ -2255,7 +2255,7 @@ int open_ctree(struct super_block *sb,
        atomic_set(&fs_info->qgroup_op_seq, 0);
        atomic64_set(&fs_info->tree_mod_seq, 0);
        fs_info->sb = sb;
-       fs_info->max_inline = 8192 * 1024;
+       fs_info->max_inline = BTRFS_DEFAULT_MAX_INLINE;
        fs_info->metadata_ratio = 0;
        fs_info->defrag_inodes = RB_ROOT;
        fs_info->free_chunk_space = 0;
index c4124de4435bffed06afc3a76ea6aba49a7c5317..0ffcf862c182e489f8af25d5d149cd9bf432d8d0 100644 (file)
@@ -1014,7 +1014,7 @@ static int btrfs_show_options(struct seq_file *seq, struct dentry *dentry)
                seq_puts(seq, ",nodatacow");
        if (btrfs_test_opt(root, NOBARRIER))
                seq_puts(seq, ",nobarrier");
-       if (info->max_inline != 8192 * 1024)
+       if (info->max_inline != BTRFS_DEFAULT_MAX_INLINE)
                seq_printf(seq, ",max_inline=%llu", info->max_inline);
        if (info->alloc_start != 0)
                seq_printf(seq, ",alloc_start=%llu", info->alloc_start);