All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nikolay Borisov <nborisov@suse.com>
To: Roman Mamedov <rm@romanrm.net>
Cc: Qu Wenruo <wqu@suse.com>,
	linux-btrfs@vger.kernel.org, David Sterba <dsterba@suse.cz>
Subject: Re: [PATCH] btrfs: inode: Don't compress if NODATASUM or NODATACOW set
Date: Mon, 14 May 2018 12:46:31 +0300	[thread overview]
Message-ID: <a430d610-8d97-fb92-551b-387b83ecff38@suse.com> (raw)
In-Reply-To: <20180514143933.60b3bb76@natsu>

[Adding David to CC]

On 14.05.2018 12:39, Roman Mamedov wrote:
> On Mon, 14 May 2018 11:36:26 +0300
> Nikolay Borisov <nborisov@suse.com> wrote:
> 
>> So what made you have these expectation, is it codified somewhere
>> (docs/man pages etc)? I'm fine with that semantics IF this is what
>> people expect.
> 
> "Compression ...does not work for NOCOW files":
> https://btrfs.wiki.kernel.org/index.php/Compression
> 
> The mount options man page does not say that the NOCOW attribute of files will
> be disregarded with compress-force.  It only mentions interaction with the
> nodatacow and nodatasum mount options. So I'd expect the attribute to still
> work and prevent compression of NOCOW files.

I wouldn't say this is very clear, it needs to be stated explicitly.

> 
>> Now the question is why people grew up to have this expectation and not the
>> other way round? IMO force_compress should really disregard everything else
> 
> Both are knobs that the user needs to explicitly set, the difference is that
> the +C attribute is fine-grained and the mount option is global. If they are
> set by the user to conflicting values, it seems more useful to have the
> fine-grained control override the global one, not the other way round.

This is valid reasoning but so is mine. So I'd like to have some rules
on that matter such that in the future things will have consistent
semantics. Obviously in this case the "local options trump global ones"
seems to be prevalent. I don't have problem with that but this should
codified somewhere.


David, what's your take on that. Where do you think will be the best
place to say that local, per-inode options take precedence over global ones?

> 

  reply	other threads:[~2018-05-14  9:46 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-14  7:02 [PATCH] btrfs: inode: Don't compress if NODATASUM or NODATACOW set Qu Wenruo
2018-05-14  8:10 ` Nikolay Borisov
2018-05-14  8:20   ` Roman Mamedov
2018-05-14  8:36     ` Nikolay Borisov
2018-05-14  9:31       ` james harvey
2018-05-14  9:39       ` Roman Mamedov
2018-05-14  9:46         ` Nikolay Borisov [this message]
2018-05-14 16:49           ` David Sterba
2018-05-14  9:30     ` james harvey
2018-05-14 10:35       ` Qu Wenruo
2018-05-14 22:24         ` james harvey
2018-05-15  0:15         ` james harvey
2018-05-14  8:24   ` Qu Wenruo
2018-05-14 16:52 ` David Sterba
2018-05-14 20:46   ` Timofey Titovets
2018-05-15 18:18     ` David Sterba
2018-05-14 22:29   ` james harvey
2018-05-15  1:35   ` Qu Wenruo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a430d610-8d97-fb92-551b-387b83ecff38@suse.com \
    --to=nborisov@suse.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=rm@romanrm.net \
    --cc=wqu@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.