On Thu, Apr 28, 2011 at 02:27:17PM +0000, John Baldwin wrote: > Author: jhb > Date: Thu Apr 28 14:27:17 2011 > New Revision: 221166 > URL: http://svn.freebsd.org/changeset/base/221166 > > Log: > Sync with several changes in UFS/FFS: > - 77115: Implement support for O_DIRECT. > - 98425: Fix a performance issue introduced in 70131 that was causing > reads before writes even when writing full blocks. > - 98658: Rename the BALLOC flags from B_* to BA_* to avoid confusion with > the struct buf B_ flags. > - 100344: Merge the BA_ and IO_ flags so so that they may both be used in > the same flags word. This merger is possible by assigning the IO_ flags > to the low sixteen bits and the BA_ flags the high sixteen bits. > - 105422: Fix a file-rewrite performance case. > - 129545: Implement IO_INVAL in VOP_WRITE() by marking the buffer as > "no cache". > - Readd the DOINGASYNC() macro and use it to control asynchronous writes. > Change i-node updates to honor DOINGASYNC() instead of always being > synchronous. > - Use a PRIV_VFS_RETAINSUGID check instead of checking cr_uid against 0 > directly when deciding whether or not to clear suid and sgid bits. > > Submitted by: Pedro F. Giffuni giffunip at yahoo >
> @@ -141,10 +162,42 @@ READ(ap) > if (error) > break; > > - bqrelse(bp); > + if ((ioflag & (IO_VMIO|IO_DIRECT)) && > + (LIST_FIRST(&bp->b_dep) == NULL)) { > + /* > + * If there are no dependencies, and it's VMIO, There is no dependencies for ext2fs, the FFS comments talks about SU. Also, I am unsure what the resulting semantic of O_DIRECTIO for ext2 is ? UFS tries to eliminate any use of buffer cache for O_DIRECTIO case, up to the mapping of user pages into pbuf to perform the actual i/o. In ext2 case, it seems we will just destroy the buffers after using them for i/o. Is it useful ?
pgpSEzWFoHUWS.pgp
Description: PGP signature