Re: [PATCH] ubifs: Add freeze support

2017-05-30 Thread Richard Weinberger
Hyunchul, Am 30.05.2017 um 04:37 schrieb Hyunchul Lee: >> 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 wondere

Re: [PATCH] ubifs: Add freeze support

2017-05-29 Thread Hyunchul Lee
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,

Re: [PATCH] ubifs: Add freeze support

2017-05-29 Thread Amir Goldstein
On Mon, May 29, 2017 at 1:17 PM, Richard Weinberger wrote: > Amir, > > Am 29.05.2017 um 12:04 schrieb Amir Goldstein: >>> Well, UBIFS is a bit different. >>> The UBIFS journal is not an add-on feature, you have to replay it in >>> any case. Otherwise you're facing corrupted data. >> >> Yes, I supp

Re: [PATCH] ubifs: Add freeze support

2017-05-29 Thread Richard Weinberger
Amir, Am 29.05.2017 um 12:04 schrieb Amir Goldstein: >> Well, UBIFS is a bit different. >> The UBIFS journal is not an add-on feature, you have to replay it in >> any case. Otherwise you're facing corrupted data. > > Yes, I suppose you are right. > I guess there is no equivalent of mount -oro,{no

Re: [PATCH] ubifs: Add freeze support

2017-05-29 Thread Amir Goldstein
On Mon, May 29, 2017 at 12:00 PM, Richard Weinberger wrote: > Amir, Hyunchul, > > Am 29.05.2017 um 07:40 schrieb Amir Goldstein: >> On Mon, May 29, 2017 at 7:40 AM, Hyunchul Lee wrote: >>> >>> and I missed the following case. >>> >>> in some embedded systems, clean-up for shutdown should be fast.

Re: [PATCH] ubifs: Add freeze support

2017-05-29 Thread Richard Weinberger
Amir, Hyunchul, Am 29.05.2017 um 07:40 schrieb Amir Goldstein: > On Mon, May 29, 2017 at 7:40 AM, Hyunchul Lee wrote: >> >> and I missed the following case. >> >> in some embedded systems, clean-up for shutdown should be fast. >> during this clean-up, freeze file system to guarantee integrity. >>

Re: [PATCH] ubifs: Add freeze support

2017-05-29 Thread Richard Weinberger
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 inconsis

Re: [PATCH] ubifs: Add freeze support

2017-05-28 Thread Amir Goldstein
On Mon, May 29, 2017 at 7:40 AM, Hyunchul Lee wrote: > > and I missed the following case. > > in some embedded systems, clean-up for shutdown should be fast. > during this clean-up, freeze file system to guarantee integrity. > umount with MNT_DETACH is not suitable because of not killing tasks. >

Re: [PATCH] ubifs: Add freeze support

2017-05-28 Thread Hyunchul Lee
and I missed the following case. in some embedded systems, clean-up for shutdown should be fast. during this clean-up, freeze file system to guarantee integrity. umount with MNT_DETACH is not suitable because of not killing tasks. On Mon, May 29, 2017 at 10:18:34AM +0900, Hyunchul Lee wrote: > H

Re: [PATCH] ubifs: Add freeze support

2017-05-28 Thread Hyunchul Lee
Hi, Richard. On Mon, May 29, 2017 at 09:43:46AM +0900, Hyunchul Lee wrote: > On Sat, May 27, 2017 at 01:23:38AM -0700, Christoph Hellwig wrote: > > > +static int ubifs_freeze_super(struct super_block *sb) > > > +{ > > > + struct ubifs_info *c = sb->s_fs_info; > > > + int err; > > > + > > > + dbg_g

Re: [PATCH] ubifs: Add freeze support

2017-05-28 Thread Hyunchul Lee
Hi, Richard. On Fri, May 26, 2017 at 11:52:42AM +0200, Richard Weinberger wrote: > Hyunchul, > > Am 26.05.2017 um 01:30 schrieb Hyunchul Lee: > > From: Hyunchul Lee > > > > for un/freeze support, implement freeze_super and un/freeze_fs > > of super_operations. > > ubifs_freeze_super just calls

Re: [PATCH] ubifs: Add freeze support

2017-05-28 Thread Hyunchul Lee
On Sat, May 27, 2017 at 01:23:38AM -0700, Christoph Hellwig wrote: > > +static int ubifs_freeze_super(struct super_block *sb) > > +{ > > + struct ubifs_info *c = sb->s_fs_info; > > + int err; > > + > > + dbg_gen("starting"); > > + /* freeze_super always succeeds if file system is in read-on

Re: [PATCH] ubifs: Add freeze support

2017-05-27 Thread Christoph Hellwig
> +static int ubifs_freeze_super(struct super_block *sb) > +{ > + struct ubifs_info *c = sb->s_fs_info; > + int err; > + > + dbg_gen("starting"); > + /* freeze_super always succeeds if file system is in read-only. > + * however if there are errors, UBIFS is switched to read-onl

Re: [PATCH] ubifs: Add freeze support

2017-05-27 Thread Christoph Hellwig
On Fri, May 26, 2017 at 11:52:42AM +0200, Richard Weinberger wrote: > Hyunchul, > > Am 26.05.2017 um 01:30 schrieb Hyunchul Lee: > > From: Hyunchul Lee > > > > for un/freeze support, implement freeze_super and un/freeze_fs > > of super_operations. > > ubifs_freeze_super just calls freeze_super.

Re: [PATCH] ubifs: Add freeze support

2017-05-26 Thread Richard Weinberger
Hyunchul, Am 26.05.2017 um 01:30 schrieb Hyunchul Lee: > From: Hyunchul Lee > > for un/freeze support, implement freeze_super and un/freeze_fs > of super_operations. > ubifs_freeze_super just calls freeze_super. because freeze_super always > succeeds if file system is read-only, UBIFS errors sh

[PATCH] ubifs: Add freeze support

2017-05-25 Thread Hyunchul Lee
From: Hyunchul Lee for un/freeze support, implement freeze_super and un/freeze_fs of super_operations. ubifs_freeze_super just calls freeze_super. because freeze_super always succeeds if file system is read-only, UBIFS errors should be checked. if there are errors, UBIFS is switched to read-only