Re: [PATCH V2] Btrfs: fix output of compression message in btrfs_parse_options()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 06, 2016 at 05:03:40PM +0900, Tsutomu Itoh wrote:
>  			} else if (strncmp(args[0].from, "no", 2) == 0) {
>  				compress_type = "no";
>  				btrfs_clear_opt(info->mount_opt, COMPRESS);
>  				btrfs_clear_opt(info->mount_opt, FORCE_COMPRESS);
>  				compress_force = false;
> +				no_compress++;
>  			} else {
...
> +			if ((btrfs_test_opt(root, COMPRESS) &&
> +			     (info->compress_type != saved_compress_type ||
> +			      compress_force != saved_compress_force)) ||
> +			    (!btrfs_test_opt(root, COMPRESS) &&
> +			     no_compress == 1)) {

If there are more than one 'compress=no' then the message won't be
printed. I don't see a reason for doing no_compress++ above.

> +				btrfs_info(root->fs_info,
> +					   "%s %s compression",
> +					   (compress_force) ? "force" : "use",
> +					   compress_type);
> +			}
> +			compress_force = false;
>  			break;
>  		case Opt_ssd:
>  			btrfs_set_and_info(root, SSD,
--
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




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux