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 18:04:51
On Thu, Jun 23, 2005 at 05:30:53PM -0500, David Young wrote:
> 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);
> }
>
Here is a patch for NetBSD that adds an ffs_sync to rw->ro transitions.
It doesn't make any difference for my problem.
Dave
--
David Young OJC Technologies
dyoung@ojctech.com Urbana, IL * (217) 278-3933