Subject: Re: does fsync(2) still ignore some filesystem metadata in 1.6.x?
To: NetBSD Kernel Technical Discussion List <tech-kern@NetBSD.ORG>
From: Greg A. Woods <woods@weird.com>
List: tech-kern
Date: 11/26/2004 18:53:08
[ On Friday, November 26, 2004 at 17:38:03 (-0500), Greg A. Woods wrote: ]
> Subject: does fsync(2) still ignore some filesystem metadata in 1.6.x?
>
> The following description of changes to src/sys/ufs/ffs/ffs_vnops.c
> suggests that in 1.6.x an fsync(2) call will _not_ necessarily cause the
> inode data to be flushed:
> 
> ----------------------------
> revision 1.61
> date: 2003/10/25 19:52:21;  author: kleink;  state: Exp;  lines: +5 -8
> Remove the present incarnation of FSYNC_DATAONLY use from ffs_fsync() and
> ffs_full_fsync(); while it is supposed to hint that the update of _file_
> metadata (as in timestamps et al.) may be omitted it doesn't mean the
> same for _filesystem_ metadata.
> ----------------------------
> 
> 
> If so ...

... then is this following change also now in need of being backed out since
the system is again flushing metadata?

src/sys/kern/vfs_syscalls.c:
----------------------------
revision 1.152
date: 2000/03/15 16:30:39;  author: fvdl;  state: Exp;  lines: +1 -3
In fdatasync, do not call bioops.io_fsync, since we're not flushing
metadata. If you do call it, there's actually a fair chance that it
will panic because its metadata dependencies were not cleared in
the VOP_FSYNC above (with FSYNC_DATAONLY).
----------------------------


-- 
						Greg A. Woods

+1 416 218-0098                  VE3TCP            RoboHack <woods@robohack.ca>
Planix, Inc. <woods@planix.com>          Secrets of the Weird <woods@weird.com>