Re: [RFC 4/5] ext4: add fs freezing support on suspend/hibernation

2017-10-04 Thread Dave Chinner
On Wed, Oct 04, 2017 at 12:48:39PM -0400, Theodore Ts'o wrote: > On Wed, Oct 04, 2017 at 06:05:23PM +1100, Dave Chinner wrote: > > Basically, before thawing filesystems the rest of the kernel > > infrastructure needs to have been restarted. i.e. the order > > needs to be: > > > > freeze userspace

Re: [RFC 4/5] ext4: add fs freezing support on suspend/hibernation

2017-10-04 Thread Theodore Ts'o
On Wed, Oct 04, 2017 at 06:05:23PM +1100, Dave Chinner wrote: > Basically, before thawing filesystems the rest of the kernel > infrastructure needs to have been restarted. i.e. the order > needs to be: > > freeze userspace > freeze filesystems > freeze kernel threads > freeze workqueues > > thaw

Re: [RFC 4/5] ext4: add fs freezing support on suspend/hibernation

2017-10-04 Thread Bart Van Assche
On Wed, 2017-10-04 at 18:05 +1100, Dave Chinner wrote: > Basically, before thawing filesystems the rest of the kernel > infrastructure needs to have been restarted. i.e. the order > needs to be: > > freeze userspace > freeze filesystems > freeze kernel threads > freeze workqueues > > thaw workque

Re: [RFC 4/5] ext4: add fs freezing support on suspend/hibernation

2017-10-04 Thread Dave Chinner
On Tue, Oct 03, 2017 at 09:42:04PM -0400, Theodore Ts'o wrote: > On Tue, Oct 03, 2017 at 10:13:21PM +0200, Luis R. Rodriguez wrote: > > > After we remove add the NEEDS_RECOVERY flag, we need to make sure > > > recovery flag is pushed out to disk before any other changes are > > > allowed to be push

Re: [RFC 4/5] ext4: add fs freezing support on suspend/hibernation

2017-10-03 Thread Theodore Ts'o
On Tue, Oct 03, 2017 at 10:13:21PM +0200, Luis R. Rodriguez wrote: > > After we remove add the NEEDS_RECOVERY flag, we need to make sure > > recovery flag is pushed out to disk before any other changes are > > allowed to be pushed out to disk. That's why we originally did the > > update synchronou

Re: [RFC 4/5] ext4: add fs freezing support on suspend/hibernation

2017-10-03 Thread Luis R. Rodriguez
On Tue, Oct 03, 2017 at 03:59:30PM -0400, Theodore Ts'o wrote: > On Tue, Oct 03, 2017 at 11:53:12AM -0700, Luis R. Rodriguez wrote: > > @@ -4926,7 +4926,7 @@ static int ext4_unfreeze(struct super_block *sb) > > ext4_set_feature_journal_needs_recovery(sb); > > } > > > > - ext4_co

Re: [RFC 4/5] ext4: add fs freezing support on suspend/hibernation

2017-10-03 Thread Theodore Ts'o
On Tue, Oct 03, 2017 at 11:53:12AM -0700, Luis R. Rodriguez wrote: > @@ -4926,7 +4926,7 @@ static int ext4_unfreeze(struct super_block *sb) > ext4_set_feature_journal_needs_recovery(sb); > } > > - ext4_commit_super(sb, 1); > + ext4_commit_super(sb, 0); > return 0