linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hyunchul Lee <hyc.lee@gmail.com>
To: Richard Weinberger <richard@nod.at>
Cc: Artem Bityutskiy <dedekind1@gmail.com>,
	adrian.hunter@intel.com, linux-kernel@vger.kernel.org,
	kernel-team@lge.com, linux-mtd@lists.infradead.org,
	linux-fsdevel@vger.kernel.org,
	Christoph Hellwig <hch@infradead.org>
Subject: Re: [PATCH] ubifs: Add freeze support
Date: Tue, 30 May 2017 11:37:40 +0900	[thread overview]
Message-ID: <20170530023740.GA15808@sebu> (raw)
In-Reply-To: <8e61baf3-a78e-d17f-ebe2-cd56d6c52259@nod.at>

On Mon, May 29, 2017 at 10:42:37AM +0200, Richard Weinberger wrote:
> Hyunchul,
> 
> Am 29.05.2017 um 04:24 schrieb Hyunchul Lee:
> >>> This is just broken.  First ubifs should still properly propagate
> >>> the errors, and second freezing/unfreezing read only file systems is
> >>> perfectly valid, 
> >>
> >> it is right.
> > 
> > if updating TNC is failed, ubifs might become inconsistant and be switched to 
> > read-only mode. for example, when ubifs_jnl_update is called to create a file, 
> > if inserting a znode for new inode is failed, TNC has only a znode for 
> > new dentry. and this can be only recoverd by replay.
> > 
> > is it required to fix this?
> 
> UBIFS is designed to be power-cut tolerant.
> So, UBIFS must not corrupt in any case.
> 
> Which failure are you facing?
> 
> I have the feeling that you try to paper over some other issue. :-)

The failure hasn't happened. I wondered the following situation
should be handled.

ubifs_create
  ubifs_jnl_update
    write_head
    ubifs_tnc_add_nm  /* (1) add dentry to TNC */
    ubifs_tnc_add     /* (2) add new inode to TNC */
    ubifs_tnc_add     /* (3) add parent inode to TNC */

If ubifs_tnc_add(2) fails, TNC would have the index of a dentry 
which points to an invalid inode. So, though ubifs_readdir
emits the dentry, this inode cannot be accessed. Becasue
there isn't the index of the inode.

I know this situation is hardly probable. But UBIFS would
be read-only and inconsitant in this situation, until replay
is completed.

> 
> Thanks,
> //richard

-- 

Thanks,
Hyunchul

  reply	other threads:[~2017-05-30  2:37 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-25 23:30 [PATCH] ubifs: Add freeze support Hyunchul Lee
2017-05-26  9:52 ` Richard Weinberger
2017-05-27  8:18   ` Christoph Hellwig
2017-05-29  1:18   ` Hyunchul Lee
2017-05-29  4:40     ` Hyunchul Lee
2017-05-29  5:40       ` Amir Goldstein
2017-05-29  9:00         ` Richard Weinberger
2017-05-29 10:04           ` Amir Goldstein
2017-05-29 10:17             ` Richard Weinberger
2017-05-29 11:44               ` Amir Goldstein
2017-05-27  8:23 ` Christoph Hellwig
2017-05-29  0:43   ` Hyunchul Lee
2017-05-29  2:24     ` Hyunchul Lee
2017-05-29  8:42       ` Richard Weinberger
2017-05-30  2:37         ` Hyunchul Lee [this message]
2017-05-30  7:51           ` Richard Weinberger

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=20170530023740.GA15808@sebu \
    --to=hyc.lee@gmail.com \
    --cc=adrian.hunter@intel.com \
    --cc=dedekind1@gmail.com \
    --cc=hch@infradead.org \
    --cc=kernel-team@lge.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard@nod.at \
    /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).