super.c (5c1aab1dd5445ed8bdcdbb575abc1b0d7ee5b2e7) super.c (00142756e1f8015d2f8ce96532d156689db7e448)
1/*
2 * Copyright (C) 2007 Oracle. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public
6 * License v2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,

--- 47 unchanged lines hidden (view full) ---

56#include "compression.h"
57#include "rcu-string.h"
58#include "dev-replace.h"
59#include "free-space-cache.h"
60#include "backref.h"
61#include "tests/btrfs-tests.h"
62
63#include "qgroup.h"
1/*
2 * Copyright (C) 2007 Oracle. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public
6 * License v2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,

--- 47 unchanged lines hidden (view full) ---

56#include "compression.h"
57#include "rcu-string.h"
58#include "dev-replace.h"
59#include "free-space-cache.h"
60#include "backref.h"
61#include "tests/btrfs-tests.h"
62
63#include "qgroup.h"
64#include "backref.h"
64#define CREATE_TRACE_POINTS
65#include <trace/events/btrfs.h>
66
67static const struct super_operations btrfs_super_ops;
68static struct file_system_type btrfs_fs_type;
69
70static int btrfs_remount(struct super_block *sb, int *flags, char *data);
71

--- 436 unchanged lines hidden (view full) ---

508 } else if (strcmp(args[0].from, "lzo") == 0) {
509 compress_type = "lzo";
510 info->compress_type = BTRFS_COMPRESS_LZO;
511 btrfs_set_opt(info->mount_opt, COMPRESS);
512 btrfs_clear_opt(info->mount_opt, NODATACOW);
513 btrfs_clear_opt(info->mount_opt, NODATASUM);
514 btrfs_set_fs_incompat(info, COMPRESS_LZO);
515 no_compress = 0;
65#define CREATE_TRACE_POINTS
66#include <trace/events/btrfs.h>
67
68static const struct super_operations btrfs_super_ops;
69static struct file_system_type btrfs_fs_type;
70
71static int btrfs_remount(struct super_block *sb, int *flags, char *data);
72

--- 436 unchanged lines hidden (view full) ---

509 } else if (strcmp(args[0].from, "lzo") == 0) {
510 compress_type = "lzo";
511 info->compress_type = BTRFS_COMPRESS_LZO;
512 btrfs_set_opt(info->mount_opt, COMPRESS);
513 btrfs_clear_opt(info->mount_opt, NODATACOW);
514 btrfs_clear_opt(info->mount_opt, NODATASUM);
515 btrfs_set_fs_incompat(info, COMPRESS_LZO);
516 no_compress = 0;
516 } else if (strcmp(args[0].from, "zstd") == 0) {
517 compress_type = "zstd";
518 info->compress_type = BTRFS_COMPRESS_ZSTD;
519 btrfs_set_opt(info->mount_opt, COMPRESS);
520 btrfs_clear_opt(info->mount_opt, NODATACOW);
521 btrfs_clear_opt(info->mount_opt, NODATASUM);
522 btrfs_set_fs_incompat(info, COMPRESS_ZSTD);
523 no_compress = 0;
524 } else if (strncmp(args[0].from, "no", 2) == 0) {
525 compress_type = "no";
526 btrfs_clear_opt(info->mount_opt, COMPRESS);
527 btrfs_clear_opt(info->mount_opt, FORCE_COMPRESS);
528 compress_force = false;
529 no_compress++;
530 } else {
531 ret = -EINVAL;

--- 698 unchanged lines hidden (view full) ---

1230 if (info->max_inline != BTRFS_DEFAULT_MAX_INLINE)
1231 seq_printf(seq, ",max_inline=%llu", info->max_inline);
1232 if (info->thread_pool_size != min_t(unsigned long,
1233 num_online_cpus() + 2, 8))
1234 seq_printf(seq, ",thread_pool=%d", info->thread_pool_size);
1235 if (btrfs_test_opt(info, COMPRESS)) {
1236 if (info->compress_type == BTRFS_COMPRESS_ZLIB)
1237 compress_type = "zlib";
517 } else if (strncmp(args[0].from, "no", 2) == 0) {
518 compress_type = "no";
519 btrfs_clear_opt(info->mount_opt, COMPRESS);
520 btrfs_clear_opt(info->mount_opt, FORCE_COMPRESS);
521 compress_force = false;
522 no_compress++;
523 } else {
524 ret = -EINVAL;

--- 698 unchanged lines hidden (view full) ---

1223 if (info->max_inline != BTRFS_DEFAULT_MAX_INLINE)
1224 seq_printf(seq, ",max_inline=%llu", info->max_inline);
1225 if (info->thread_pool_size != min_t(unsigned long,
1226 num_online_cpus() + 2, 8))
1227 seq_printf(seq, ",thread_pool=%d", info->thread_pool_size);
1228 if (btrfs_test_opt(info, COMPRESS)) {
1229 if (info->compress_type == BTRFS_COMPRESS_ZLIB)
1230 compress_type = "zlib";
1238 else if (info->compress_type == BTRFS_COMPRESS_LZO)
1239 compress_type = "lzo";
1240 else
1231 else
1241 compress_type = "zstd";
1232 compress_type = "lzo";
1242 if (btrfs_test_opt(info, FORCE_COMPRESS))
1243 seq_printf(seq, ",compress-force=%s", compress_type);
1244 else
1245 seq_printf(seq, ",compress=%s", compress_type);
1246 }
1247 if (btrfs_test_opt(info, NOSSD))
1248 seq_puts(seq, ",nossd");
1249 if (btrfs_test_opt(info, SSD_SPREAD))

--- 1193 unchanged lines hidden ---
1233 if (btrfs_test_opt(info, FORCE_COMPRESS))
1234 seq_printf(seq, ",compress-force=%s", compress_type);
1235 else
1236 seq_printf(seq, ",compress=%s", compress_type);
1237 }
1238 if (btrfs_test_opt(info, NOSSD))
1239 seq_puts(seq, ",nossd");
1240 if (btrfs_test_opt(info, SSD_SPREAD))

--- 1193 unchanged lines hidden ---