[Top] [All Lists]

Re: how to sync / commit data to disk?

To: xfs@xxxxxxxxxxx
Subject: Re: how to sync / commit data to disk?
From: "Geir A. Myrestrand" <geir.myrestrand@xxxxxxxxxxxxxx>
Date: Tue, 23 Jan 2007 10:58:15 -0500
Cc: Peter Gervai <grinapo@xxxxxxxxx>
In-reply-to: <d55656c10701230716x1ae7cf49kd8a854fd73429c4f@xxxxxxxxxxxxxx>
Organization: FalconStor Software, Inc.
References: <d55656c10701230716x1ae7cf49kd8a854fd73429c4f@xxxxxxxxxxxxxx>
Reply-to: geir.myrestrand@xxxxxxxxxxxxxx
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Thunderbird (Windows/20061207)
Peter Gervai wrote:

[Tried to search archieves, found nothing, probably my keywords are bad. :-)]

What is the recommended way to make sure that a file is written
physically to the disk? (apart from the cache of the disk.)

This problem seem to have arisen in grub bootloader under Debian linux
(and most probably everywhere else): it must be sure that the copied
files are there, and can be addressed by C/H/S and modified there, at
the given sector address.

My educated guess would be
xfs_freeze -f
xfs_freeze -u

but I give a large chance to be wrong about it.


Please cc on me if possible. Thanks.

Call the sync before you freeze the file system, not after. You can't write to the file system when it is frozen, so it makes no sense to call sync after a freeze.

I don't think you have any control of whether the data is written physically to the disk or is still in the disk(s) buffer, the buffer you can flush is on the software side. Call sync and freeze.


Geir A. Myrestrand

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