Subject: Re: mount -u -r does not sync?
To: None <tech-kern@NetBSD.org>
From: David Young <dyoung@pobox.com>
List: tech-kern
Date: 06/23/2005 17:30:53
In FreeBSD, note the ffs_sync call in ffs_mount's 'update' path,
src/sys/ufs/ffs/ffs_vfsops.c:
if (fs->fs_ronly == 0 &&
vfs_flagopt(mp->mnt_optnew, "ro", NULL, 0)) {
if ((error = vn_start_write(NULL, &mp, V_WAIT)) != 0)
return (error);
/*
* Flush any dirty data.
*/
if ((error = ffs_sync(mp, MNT_WAIT, td)) != 0) {
vn_finished_write(mp);
return (error);
}
/*
* Check for and optionally get rid of files open
* for writing.
*/
flags = WRITECLOSE;
if (mp->mnt_flag & MNT_FORCE)
flags |= FORCECLOSE;
if (mp->mnt_flag & MNT_SOFTDEP) {
error = softdep_flushfiles(mp, flags, td);
} else {
error = ffs_flushfiles(mp, flags, td);
}
Dave
--
David Young OJC Technologies
dyoung@ojctech.com Urbana, IL * (217) 278-3933