From: Jan Kara <jack@suse.cz>
To: Chao Yu <yuchao0@huawei.com>
Cc: Jan Kara <jack@suse.cz>,
jack@suse.com, linux-kernel@vger.kernel.org, chao@kernel.org
Subject: Re: [PATCH] quota: be aware of error from dquot_initialize
Date: Tue, 14 Nov 2017 10:24:30 +0100 [thread overview]
Message-ID: <20171114092430.GB7053@quack2.suse.cz> (raw)
In-Reply-To: <b6bbc1ed-31aa-14b0-7ab5-fcee3d9a4d58@huawei.com>
On Tue 14-11-17 11:43:49, Chao Yu wrote:
> On 2017/11/13 17:18, Jan Kara wrote:
> > On Mon 13-11-17 11:31:48, Chao Yu wrote:
> >> Commit 6184fc0b8dd7 ("quota: Propagate error from ->acquire_dquot()")
> >> missed to handle error from dquot_initialize in dquot_file_open, fix it.
> >>
> >> Signed-off-by: Chao Yu <yuchao0@huawei.com>
> >
> > Good spotting. I've added the patch to my tree.
>
> Thanks for queuing the patch. :)
>
> BTW, I notice in add_dquot_ref we also didn't handle error of
> __dquot_initialize, should we handle it too?
It is questionable what we should do with an error in add_dquot_ref(). User
asked us to turn quotas on - that succeeded just fine but then we walked
over already active inodes in add_dquot_ref(), wanted to initialize
accounting information, and that failed for some inode. We can just leave
quota on, the accounting will work for other inodes - that's what we do
now. We could also propagate the failure up and refuse to turn quotas off.
I guess that's a somewhat better approach so if you want to implement that,
go ahead.
Honza
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
next prev parent reply other threads:[~2017-11-14 9:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-13 3:31 Chao Yu
2017-11-13 9:18 ` Jan Kara
2017-11-14 3:43 ` Chao Yu
2017-11-14 9:24 ` Jan Kara [this message]
2017-11-17 2:10 ` Chao Yu
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=20171114092430.GB7053@quack2.suse.cz \
--to=jack@suse.cz \
--cc=chao@kernel.org \
--cc=jack@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=yuchao0@huawei.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
all inboxes | Powered by JetHome®