Re: [PATCH] Add option to fsfreeze to call syncfs() prior to freezing.

Christoph Hellwig
2012-12-07T12:44:20Z

On Fri, Dec 07, 2012 at 10:14:00AM +0000, Alun wrote:
> Hi,
>
> I've recently been looking into a problem on a heavily loaded fileserver.
> Running fsfreeze on the filesystem causes the load average to go sky high.
> Looking at the kernel sources, I discovered that the FIFREEZE ioctl suspends
> writes, then syncs the filesystem. With a large amount of dirty data, this
> can leave writes suspended for a significant time, even if your intent is to
> have the filesystem frozen for a short time. I raised this on the kernel
> list, suggesting an extra call to sync the filesystem prior to suspending
> writes, but it was pointed out to me that this would change the semantics
> of the ioctl.

It might be better to send a kernel patch to do a first async sync
attempt instead of band aiding this in one of the consumers.