svn commit: r368494 - in stable/12/sys: fs/ext2fs ufs/ufs
Kirk McKusick
mckusick at FreeBSD.org
Wed Dec 9 22:37:24 UTC 2020
Author: mckusick
Date: Wed Dec 9 22:37:23 2020
New Revision: 368494
URL: https://svnweb.freebsd.org/changeset/base/368494
Log:
MFC of 368396 and 368425.
Document BA_CLRBUF flag.
Sponsored by: Netflix
Modified:
stable/12/sys/fs/ext2fs/ext2_extern.h
stable/12/sys/ufs/ufs/ufs_extern.h
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sys/fs/ext2fs/ext2_extern.h
==============================================================================
--- stable/12/sys/fs/ext2fs/ext2_extern.h Wed Dec 9 20:38:26 2020 (r368493)
+++ stable/12/sys/fs/ext2fs/ext2_extern.h Wed Dec 9 22:37:23 2020 (r368494)
@@ -135,6 +135,13 @@ void ext2_gd_csum_set(struct m_ext2fs *);
/* Flags to low-level allocation routines.
* The low 16-bits are reserved for IO_ flags from vnode.h.
+ *
+ * The BA_CLRBUF flag specifies that the existing content of the block
+ * will not be completely overwritten by the caller, so buffers for new
+ * blocks must be cleared and buffers for existing blocks must be read.
+ * When BA_CLRBUF is not set the buffer will be completely overwritten
+ * and there is no reason to clear them or to spend I/O fetching existing
+ * data. The BA_CLRBUF flag is handled in the ext2_balloc() functions.
*/
#define BA_CLRBUF 0x00010000 /* Clear invalid areas of buffer. */
#define BA_SEQMASK 0x7F000000 /* Bits holding seq heuristic. */
Modified: stable/12/sys/ufs/ufs/ufs_extern.h
==============================================================================
--- stable/12/sys/ufs/ufs/ufs_extern.h Wed Dec 9 20:38:26 2020 (r368493)
+++ stable/12/sys/ufs/ufs/ufs_extern.h Wed Dec 9 22:37:23 2020 (r368494)
@@ -119,6 +119,13 @@ void softdep_revert_rmdir(struct inode *, struct inode
*
* Note: The general vfs code typically limits the sequential heuristic
* count to 127. See sequential_heuristic() in kern/vfs_vnops.c
+ *
+ * The BA_CLRBUF flag specifies that the existing content of the block
+ * will not be completely overwritten by the caller, so buffers for new
+ * blocks must be cleared and buffers for existing blocks must be read.
+ * When BA_CLRBUF is not set the buffer will be completely overwritten
+ * and there is no reason to clear them or to spend I/O fetching existing
+ * data. The BA_CLRBUF flag is handled in the UFS_BALLOC() functions.
*/
#define BA_CLRBUF 0x00010000 /* Clear invalid areas of buffer. */
#define BA_METAONLY 0x00020000 /* Return indirect block buffer. */
More information about the svn-src-stable-12
mailing list