xfs
[Top] [All Lists]

Re: Why does xfs_fs_thaw() call xfs_unmountfs_writesb()?

To: "Stephenson, Dale" <dale.stephenson@xxxxxxxxxxx>
Subject: Re: Why does xfs_fs_thaw() call xfs_unmountfs_writesb()?
From: Stephen Lord <lord@xxxxxxx>
Date: 16 May 2002 12:30:51 -0500
Cc: "'linux-xfs@xxxxxxxxxxx'" <linux-xfs@xxxxxxxxxxx>
In-reply-to: <2D0AFEFEE711D611923E009027D39F2B02F15C@cdserv.meridian-data.com>
References: <2D0AFEFEE711D611923E009027D39F2B02F15C@cdserv.meridian-data.com>
Sender: owner-linux-xfs@xxxxxxxxxxx
On Thu, 2002-05-16 at 12:31, Stephenson, Dale wrote:
> The xfs_freeze command uses xfs_fs_freeze() to flush out and freeze new
> writes to a file system, and xfs_fs_thaw() to let writes through again.  In
> between an xfs_freeze -f and xfs_freeze -u, the file system should be
> effectively frozen.
> 
> The last thing xfs_fs_freeze() does before returning is call
> xfs_unmountfs_writesb().  The first thing xfs_fs_thaw() does call it again.
> Since all new writes between the two calls should be waiting for the
> filesystem to be thawed, why does xfs_unmountfs_writesb() need to be called
> again?  What does xfs_unmountfs_writesb() accomplish in these two functions?
> 
> Dale Stephenson
> steph@xxxxxxxxxxxxxx

The function ensures the on disk superblock is uptodate, since we just
made the log clean. As for why both functions do it, good question,
probably just overzealous coding - rather like typing sync sync sync
before reboot.

Steve



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