Re: [PATCH] xfs: quiesce the filesystem after recovery on readonly mount

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 23, 2016 at 11:24:53AM -0500, Eric Sandeen wrote:
> On 9/22/16 8:39 PM, Eric Sandeen wrote:
> > On 9/22/16 7:11 PM, Dave Chinner wrote:
> >> From: Dave Chinner <dchinner@xxxxxxxxxx>
> 
> ...
> 
> >> To avoid this problem, we need to ensure that a read-only mount
> >> always updates the log when it completes the second phase of
> >> recovery. We already handle this sort of issue with rw->ro remount
> >> transitions, so the solution is as simple as quiescing the
> >> filesystem at the appropriate time during the mount process. This
> >> results in the log being marked clean so the mount behaviour
> >> recorded in the logs on repeated RO mounts will change (i.e. log
> >> recovery will no longer be run on every mount until a RW mount is
> >> done). This is a user visible change in behaviour, but it is
> >> harmless.
> > 
> > Excellent idea :)
> > 
> > Reviewed-by: Eric Sandeen <sandeen@xxxxxxxxxx>
> 
> Actually ...  after playing with this a bit ...
> 
> Should we restrict this to only when the log got
> replayed, with a !XFS_LAST_UNMOUNT_WAS_CLEAN(mp) test?
> 
> Maybe it's harmless as it is, but it seems we should restrict
> it to the log-got-replayed case.

Well, writing another unmount record should be harmless. The thing
is that the quiesce call also serves to shut down periodic log
functions that are started when the second phase of recovery is run,
These are started regardless of whether the mount was clean or not.
Hence we are currently running periodic log work on ro mounts and
tryin gto cover/sync the log every so often. For rw mounts this is
needed, but for ro mounts once we know everything is clean we can
shut them down, jus tlike we do for a rw->ro remount.

So I think that just treating the ro mount like a rw mount followed
by a rw->ro transition after potential mount time modifications are
complete is the best approach for consistency of RO behaviour....

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs



[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux