From: Jan Kara <jack@suse.cz>
To: Dmitry Monakhov <dmonakhov@openvz.org>
Cc: Jan Kara <jack@suse.cz>, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] quota: handle io errors in dquot_transfer
Date: Wed, 7 Apr 2010 11:55:30 +0200 [thread overview]
Message-ID: <20100407095530.GA3375@quack.suse.cz> (raw)
In-Reply-To: <876343wwvb.fsf@openvz.org>
On Wed 07-04-10 11:22:00, Dmitry Monakhov wrote:
> Jan Kara <jack@suse.cz> writes:
>
> > On Mon 05-04-10 13:44:54, Dmitry Monakhov wrote:
> >> Currently quota is able to return real error code to caller.
> >> Now it is possible to fix long standing bug with silent quota
> >> corruption in dquot_transfer.
> >
> >> From 5e529864261c7bffe32a8b3d45d7b51749b4512f Mon Sep 17 00:00:00 2001
> >> From: Dmitry Monakhov <dmonakhov@openvz.org>
> >> Date: Mon, 5 Apr 2010 13:02:18 +0400
> >> Subject: [PATCH] quota: handle io errors in dquot_transfer
> >>
> >> Currently if one of dquot structures absent due to some io errors
> >> dquot_transfer will ignore corresponding quotatype. Which is very
> >> bad because result in silent quota inconsistency.
> > But because we were unable to read some quota structure, quota already
> > *is* inconsistent. So it's not like this particular operation would
> > introduce the inconsistency.
> Ohh... This is another type of error which is not handled at all.
> dquot_initialize() may fail to read dquot from a disk and live
> corresponding inode's structures semi-initialized. Before Christoph's
> cleanup it was almost impossible to solve this issue because init()
> was called from semi_random places. I'm tried to make it one but
> give up this idea due to lack of perspective.
> The good things is what since fs itself is now responsible for dquot
> init it is possible to solve this issue.
Yes, it shouldn't be too hard to handle errors from dquot_init now.
> >> Sane implementation must return corresponding error to caller.
> > But sure I agree we should return the fact that we stumbled on quota
> > inconsistency the same way we do it for dquot_alloc_space or
> > dquot_free_space.
> I'll combine init and transfer patches to one patchset.
> The way i see it now:
> 1) dquot_initialize() return eio to caller
> 2) dquot_transfer() return eio to caller
> 3-5) dquot_(alloc/free/claim/...) must check that corresponding
> ->i_dquot[type] was initialized.
> 5) fs: handle error from dquot_initialize (this one will be huge)
Yes, this looks like a good plan.
Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
prev parent reply other threads:[~2010-04-07 9:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-05 9:44 [PATCH] quota: handle io errors in dquot_transfer Dmitry Monakhov
2010-04-06 17:41 ` Jan Kara
2010-04-07 7:22 ` Dmitry Monakhov
2010-04-07 9:55 ` Jan Kara [this message]
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=20100407095530.GA3375@quack.suse.cz \
--to=jack@suse.cz \
--cc=dmonakhov@openvz.org \
--cc=linux-fsdevel@vger.kernel.org \
/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).