Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1652778

Re: [PATCH] ubifs: Add freeze support

From Hyunchul Lee <hyc.lee@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH] ubifs: Add freeze support
Date 2017-05-30 04:40 +0200
Message-ID <tMFeF-TW-5@gated-at.bofh.it> (permalink)
References <tLawi-6pJ-23@gated-at.bofh.it> <tLFgJ-Kk-7@gated-at.bofh.it> <tMh2F-MD-1@gated-at.bofh.it> <tMiBr-1YX-1@gated-at.bofh.it> <tMoxb-5JZ-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] ubifs: Add freeze support Hyunchul Lee <hyc.lee@gmail.com> - 2017-05-26 01:40 +0200
  Re: [PATCH] ubifs: Add freeze support Richard Weinberger <richard@nod.at> - 2017-05-26 12:00 +0200
    Re: [PATCH] ubifs: Add freeze support Christoph Hellwig <hch@infradead.org> - 2017-05-27 10:20 +0200
    Re: [PATCH] ubifs: Add freeze support Hyunchul Lee <hyc.lee@gmail.com> - 2017-05-29 03:20 +0200
      Re: [PATCH] ubifs: Add freeze support Hyunchul Lee <hyc.lee@gmail.com> - 2017-05-29 06:50 +0200
        Re: [PATCH] ubifs: Add freeze support Amir Goldstein <amir73il@gmail.com> - 2017-05-29 07:50 +0200
          Re: [PATCH] ubifs: Add freeze support Richard Weinberger <richard@nod.at> - 2017-05-29 11:10 +0200
            Re: [PATCH] ubifs: Add freeze support Amir Goldstein <amir73il@gmail.com> - 2017-05-29 12:10 +0200
              Re: [PATCH] ubifs: Add freeze support Richard Weinberger <richard@nod.at> - 2017-05-29 12:20 +0200
                Re: [PATCH] ubifs: Add freeze support Amir Goldstein <amir73il@gmail.com> - 2017-05-29 13:50 +0200
  Re: [PATCH] ubifs: Add freeze support Christoph Hellwig <hch@infradead.org> - 2017-05-27 10:30 +0200
    Re: [PATCH] ubifs: Add freeze support Hyunchul Lee <hyc.lee@gmail.com> - 2017-05-29 02:50 +0200
      Re: [PATCH] ubifs: Add freeze support Hyunchul Lee <hyc.lee@gmail.com> - 2017-05-29 04:30 +0200
        Re: [PATCH] ubifs: Add freeze support Richard Weinberger <richard@nod.at> - 2017-05-29 10:50 +0200
          Re: [PATCH] ubifs: Add freeze support Hyunchul Lee <hyc.lee@gmail.com> - 2017-05-30 04:40 +0200
            Re: [PATCH] ubifs: Add freeze support Richard Weinberger <richard@nod.at> - 2017-05-30 10:00 +0200

csiph-web