On 1999-Oct-07 06:44:19 +1000, Matthew D. Fuller wrote:
>/dev/da0s1a on / (local, synchronous, writes: sync 32 async 15100)
>                         ^^^^^^^^^^^
>
>Though I'm still waiting for an explanation of WHY exactly I have async
>writes on a sync partition.   Nobody yet has said anything but 'that's
>interesting...'.  A direction to look would be helpful.

You get a synchronous mount by passing MNT_SYNCHRONOUS to mount(2).
Within the kernel, MNT_SYNCHRONOUS is used (basically only) within
kern/vfs_vnops.c:vn_write().  There it adds IO_SYNC to the write
request (the same as if the file has O_FSYNC enabled).  IO_SYNC will
be ignored if MNT_ASYNC is specified (which it isn't here).  The
write request goes through ufs/ufs/ufs_readwrite.c:WRITE(), which
passes it to bwrite() if it's IO_SYNC.

Inode access time updates (controlled by MNT_NOATIME, which becomes
~IN_ACCESS, which becomes IN_MODIFIED) don't go through vn_write() and
wind up in bdwrite().

As far as I can tell, the net effect is that inode access time updates
will remain async writes into the filesystem.

An easy way to tell would be to use NOATIME and see if you're still
getting async writes.  (Or any writes at all).

Peter
-- 
Peter Jeremy (VK2PJ)                    [EMAIL PROTECTED]
Alcatel Australia Limited
41 Mandible St                          Phone: +61 2 9690 5019
ALEXANDRIA  NSW  2015                   Fax:   +61 2 9690 5982


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to