Chris Mason wrote:
> Heinz Mauelshagen and I have come up with an API for LVM to use
> for creating consistent snapshots. The idea is to block FS modifications
> while the snapshot is being created, and to give the FS the chance to flush
> everything (including all pending transactions) to disk before
> LVM starts doing copy on write.
[...]
> +int fsync_dev_lockfs(kdev_t dev)
> +{
> + sync_buffers(dev, 0);
> +
> + lock_kernel();
> + sync_supers(dev);
> + /* note, the FS might need to start transactions to
> + ** sync the inodes, or the quota, no locking until
> + ** after these are done
> + */
> + sync_inodes(dev);
> + DQUOT_SYNC(dev);
> + /* if inodes or quotas could be dirtied during the
> + ** sync_supers_lockfs call, the FS is responsible for getting
> + ** them on disk, without deadlocking against the lock
> + */
> + sync_supers_lockfs(dev) ;
> + unlock_kernel();
> +
> + return sync_buffers(dev, 1) ;
> +}
> +
What is the thinking behind having a sync_super sandwich? I've always
wondered about that.
--
Daniel
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]