linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>
Cc: Marcos Paulo de Souza <marcos.souza.org@gmail.com>,
	dsterba@suse.com, linux-btrfs@vger.kernel.org,
	anand.jain@oracle.com, wqu@suse.com,
	Marcos Paulo de Souza <mpdesouza@suse.com>
Subject: Re: [PATCH] btrfs-progs: qgroup: Check for ENOTCONN error on create/assign/limit
Date: Thu, 28 Nov 2019 12:08:48 +0100	[thread overview]
Message-ID: <20191128110848.GD2734@twin.jikos.cz> (raw)
In-Reply-To: <0d82cb5f-9d01-0e3a-26bb-33019d8a9e65@gmx.com>

On Wed, Nov 27, 2019 at 12:30:38PM +0800, Qu Wenruo wrote:
> 
> 
> On 2019/11/27 上午11:48, Marcos Paulo de Souza wrote:
> > From: Marcos Paulo de Souza <mpdesouza@suse.com>
> > 
> > Current btrfs code returns ENOTCONN when the user tries to create a
> > qgroup on a subvolume without quota enabled. In order to present a
> > meaningful message to the user, we now handle ENOTCONN showing
> > the message "quota not enabled".
> > 
> > Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>
> 
> Don't forget the original -EINVAL.
> 
> So it needs to cover both -EINVAL (for older kernel) and -ENOTCONN (for
> newer kernel).

I think for now only ENOTCONN should be interpreted as 'quotas not
enabled' as we can be sure it's just that. But EINVAL means 'invalid
parameter' and this can be interpreted in that context as if the qgroup
ids are wrong etc.

  reply	other threads:[~2019-11-28 11:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-27  3:48 [PATCH] btrfs-progs: qgroup: Check for ENOTCONN error on create/assign/limit Marcos Paulo de Souza
2019-11-27  4:30 ` Qu Wenruo
2019-11-28 11:08   ` David Sterba [this message]
2019-11-28 12:39     ` 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=20191128110848.GD2734@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=anand.jain@oracle.com \
    --cc=dsterba@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=marcos.souza.org@gmail.com \
    --cc=mpdesouza@suse.com \
    --cc=quwenruo.btrfs@gmx.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).