On Thu, Jan 14, 2016 at 03:20:43PM +0100, David Sterba wrote:
> On Thu, Jan 14, 2016 at 09:09:14AM +0900, Tsutomu Itoh wrote:
> > On 2016/01/13 21:33, David Sterba wrote:
> > > 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.
> >
> > I want to output message as follows. Therefore, no_compress++ is necessary.
> >
> > # mount -o compress,compress,compress=no,compress=no,compress,compress=no <dev> <path>
> >
> > [ 162.048033] BTRFS: device fsid a7f6e96e-653e-42d0-8469-13025396caa2 devid 1 transid 3 <dev>
> > [ 185.349034] BTRFS info (device <dev>): use zlib compression
> > [ 185.349041] BTRFS info (device <dev>): use no compression
> > [ 185.349045] BTRFS info (device <dev>): use zlib compression
> > [ 185.349048] BTRFS info (device <dev>): use no compression
> > [ 185.349050] BTRFS info (device <dev>): disk space caching is enabled
>
> I don't think it's necessary ty print all the options. Only the last one
> is applied so I'd expect to see only "... use no compression".
... but we do print all the options as we find them already, never mind.
--
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