aboutsummaryrefslogtreecommitdiff
path: root/sys/ufs
diff options
context:
space:
mode:
authorKirk McKusick <mckusick@FreeBSD.org>2020-12-06 20:50:21 +0000
committerKirk McKusick <mckusick@FreeBSD.org>2020-12-06 20:50:21 +0000
commitbb3c01ec7960a5eaff45916bd74446f96301c16d (patch)
tree9f8864d783b5fa95ed3ee6373aa0e3944f2f3cbe /sys/ufs
parent8fcfd0e2228de2c5b63d9c066d16a3f2a3b00cdb (diff)
downloadsrc-bb3c01ec7960a5eaff45916bd74446f96301c16d.tar.gz
src-bb3c01ec7960a5eaff45916bd74446f96301c16d.zip
Document the BA_CLRBUF flag used in ufs and ext2fs filesystems.
Suggested by: kib MFC after: 3 days Sponsored by: Netflix
Notes
Notes: svn path=/head/; revision=368396
Diffstat (limited to 'sys/ufs')
-rw-r--r--sys/ufs/ufs/ufs_extern.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/ufs/ufs/ufs_extern.h b/sys/ufs/ufs/ufs_extern.h
index cc6078065e7f..a28fcffabd2e 100644
--- a/sys/ufs/ufs/ufs_extern.h
+++ b/sys/ufs/ufs/ufs_extern.h
@@ -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. */