linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Richard Weinberger <richard.weinberger@gmail.com>,
	Jan Kara <jack@suse.cz>, Christoph Hellwig <hch@infradead.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	Dongsheng Yang <yangds.fnst@cn.fujitsu.com>,
	linux-mtd@lists.infradead.org, kernel@pengutronix.de
Subject: Re: UBIFS quota support
Date: Wed, 23 Jan 2019 11:47:45 +0100	[thread overview]
Message-ID: <1822599.pa7TLGMi6j@blindfold> (raw)
In-Reply-To: <20190123095535.itwduropd2moqs3n@pengutronix.de>

Sascha,

Am Mittwoch, 23. Januar 2019, 10:55:35 CET schrieb Sascha Hauer:
> > > S_SYNC won't help us. We need to make sure that a change of an inode and
> > > the corresponding update to the quota file is done atomically. Otherwise
> > > it may happen that we only change the size of an inode, but miss the
> > > corresponding quota updates, or depending on the implementation, maybe
> > > the other way round.
> > 
> > This is why I said yesterday you need to touch the UBIFS journal replay code too.
> > So, S_SYNC is not to keep the quota file consistent with UBIFS' state, it is
> > to make sure we don't lose quota updates.
> 
> But how we handle a power cut between the update to the quota file and
> the actual inode change then? During replay we'll find quota updates and
> inode updates, but we do not have any information which quota update
> belongs to which inode change.

In worst case we need to store more info in the journal to get this infos.
That's why I asked Jan for more info. I don't know what exactly quota expects
from the filesystem in terms of consistency. Maybe there are already some helpers, etc...

Thanks,
//richard



  reply	other threads:[~2019-01-23 10:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-10 11:44 UBIFS quota support Sascha Hauer
2019-01-10 11:44 ` Sascha Hauer
2019-01-22 23:07 ` Richard Weinberger
2019-01-23  9:43   ` Sascha Hauer
2019-01-23  9:46     ` Richard Weinberger
2019-01-23  9:55       ` Sascha Hauer
2019-01-23 10:47         ` Richard Weinberger [this message]
2019-01-23 15:47   ` Jan Kara
2019-01-25  9:21     ` Sascha Hauer
2019-01-28  8:09       ` Christoph Hellwig
2019-01-30 12:45       ` Jan Kara
2019-01-31  7:37         ` Sascha Hauer

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=1822599.pa7TLGMi6j@blindfold \
    --to=richard@nod.at \
    --cc=hch@infradead.org \
    --cc=jack@suse.cz \
    --cc=kernel@pengutronix.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard.weinberger@gmail.com \
    --cc=s.hauer@pengutronix.de \
    --cc=yangds.fnst@cn.fujitsu.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).