This is bikeshedding, but it seems people are drastically more likely to
understand "zlib:9" as compression level rather than an algorithm version
compared to "zlib9".
Signed-off-by: Adam Borowski <kilobyte@xxxxxxxxxx>
---
fs/btrfs/compression.c | 2 ++
fs/btrfs/super.c | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c
index 70a50194fcf5..71782ec976c7 100644
--- a/fs/btrfs/compression.c
+++ b/fs/btrfs/compression.c
@@ -1096,6 +1096,8 @@ unsigned int btrfs_compress_str2level(const char *str)
if ('1' <= str[4] && str[4] <= '9' )
return str[4] - '0';
+ if (str[4] == ':' && '1' <= str[5] && str[5] <= '9')
+ return str[5] - '0';
return 0;
}
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 5467187701ef..537e04120457 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -1248,7 +1248,7 @@ static int btrfs_show_options(struct seq_file *seq, struct dentry *dentry)
else
seq_printf(seq, ",compress=%s", compress_type);
if (info->compress_level)
- seq_printf(seq, "%d", info->compress_level);
+ seq_printf(seq, ":%d", info->compress_level);
}
if (btrfs_test_opt(info, NOSSD))
seq_puts(seq, ",nossd");
--
2.14.1
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html