xfs
[Top] [All Lists]

Re: [PATCH 1/3] xfs: consider freeze levels in xfs_fs_writable()

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 1/3] xfs: consider freeze levels in xfs_fs_writable()
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Fri, 26 Sep 2014 07:03:30 +1000
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20140925161756.GA25798@xxxxxxxxxxxxx>
References: <1411647632-28240-1-git-send-email-david@xxxxxxxxxxxxx> <1411647632-28240-2-git-send-email-david@xxxxxxxxxxxxx> <20140925161756.GA25798@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Thu, Sep 25, 2014 at 09:17:56AM -0700, Christoph Hellwig wrote:
> > index d36bdbc..9073895 100644
> > --- a/fs/xfs/xfs_mount.c
> > +++ b/fs/xfs/xfs_mount.c
> > @@ -607,7 +607,7 @@ xfs_mount_reset_sbqflags(
> >      * If the fs is readonly, let the incore superblock run
> >      * with quotas off but don't flush the update out to disk
> >      */
> > -   if (mp->m_flags & XFS_MOUNT_RDONLY)
> > +   if (!xfs_fs_writable(mp, SB_UNFROZEN))
> 
> This adds a new caller of xfs_fs_writable, which isn't mentioned in the
> changelog.

I can mention it, but it's so trivial I didn't think it was worth
it.

> > +   /*
> > +    * We can be called during the fs freeze process, and we need to be
> > +    * able to write the superblock in that case.
> > +    */
> > +   if (!xfs_fs_writable(mp, SB_FREEZE_FS))
> >             return 0;
> 
> And this already changes the checked freeze level, also not mentioned.

The changelog says "Hence allow the caller to pass in the freeze
level it is allowed to write" which is exactly what this code is
doing.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>