summaryrefslogtreecommitdiffstats
path: root/sys/gnu
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2003-08-28 00:56:39 +0000
committerjeff <jeff@FreeBSD.org>2003-08-28 00:56:39 +0000
commitc496ddf8e18fbe14bd2b59918fbef3a23a93eb00 (patch)
treedcfa0ef48d8184df0bc20ac32796bc4eb99dfdcb /sys/gnu
parentfd0b166b71c15af75d2190250d396854e4d82787 (diff)
downloadFreeBSD-src-c496ddf8e18fbe14bd2b59918fbef3a23a93eb00.zip
FreeBSD-src-c496ddf8e18fbe14bd2b59918fbef3a23a93eb00.tar.gz
- Clean-up comments that refer to the use of B_LOCKED.
Diffstat (limited to 'sys/gnu')
-rw-r--r--sys/gnu/ext2fs/ext2_vfsops.c1
-rw-r--r--sys/gnu/ext2fs/fs.h6
-rw-r--r--sys/gnu/fs/ext2fs/ext2_vfsops.c1
-rw-r--r--sys/gnu/fs/ext2fs/fs.h6
4 files changed, 8 insertions, 6 deletions
diff --git a/sys/gnu/ext2fs/ext2_vfsops.c b/sys/gnu/ext2fs/ext2_vfsops.c
index b5369f4..a51d393 100644
--- a/sys/gnu/ext2fs/ext2_vfsops.c
+++ b/sys/gnu/ext2fs/ext2_vfsops.c
@@ -488,7 +488,6 @@ static int compute_sb_data(devvp, es, fs)
printf("EXT2-fs: unable to read group descriptors (%d)\n", error);
return EIO;
}
- /* Set the B_LOCKED flag on the buffer, then brelse() it */
LCK_BUF(fs->s_group_desc[i])
}
if(!ext2_check_descriptors(fs)) {
diff --git a/sys/gnu/ext2fs/fs.h b/sys/gnu/ext2fs/fs.h
index c54f979..a14f28c 100644
--- a/sys/gnu/ext2fs/fs.h
+++ b/sys/gnu/ext2fs/fs.h
@@ -153,8 +153,10 @@ extern u_char *fragtbl[];
#define unlock_super(devvp) VOP_UNLOCK(devvp, 0, curthread)
/*
- * To lock a buffer, set the B_LOCKED flag and then brelse() it. To unlock,
- * reset the B_LOCKED flag and brelse() the buffer back on the LRU list
+ * Historically, ext2fs kept it's metadata buffers on the LOCKED queue. Now,
+ * we simply change the lock owner to kern so that it may be released from
+ * another context. Later, we release the buffer, and conditionally write it
+ * when we're done.
*/
#define LCK_BUF(bp) BUF_KERNPROC(bp);
diff --git a/sys/gnu/fs/ext2fs/ext2_vfsops.c b/sys/gnu/fs/ext2fs/ext2_vfsops.c
index b5369f4..a51d393 100644
--- a/sys/gnu/fs/ext2fs/ext2_vfsops.c
+++ b/sys/gnu/fs/ext2fs/ext2_vfsops.c
@@ -488,7 +488,6 @@ static int compute_sb_data(devvp, es, fs)
printf("EXT2-fs: unable to read group descriptors (%d)\n", error);
return EIO;
}
- /* Set the B_LOCKED flag on the buffer, then brelse() it */
LCK_BUF(fs->s_group_desc[i])
}
if(!ext2_check_descriptors(fs)) {
diff --git a/sys/gnu/fs/ext2fs/fs.h b/sys/gnu/fs/ext2fs/fs.h
index c54f979..a14f28c 100644
--- a/sys/gnu/fs/ext2fs/fs.h
+++ b/sys/gnu/fs/ext2fs/fs.h
@@ -153,8 +153,10 @@ extern u_char *fragtbl[];
#define unlock_super(devvp) VOP_UNLOCK(devvp, 0, curthread)
/*
- * To lock a buffer, set the B_LOCKED flag and then brelse() it. To unlock,
- * reset the B_LOCKED flag and brelse() the buffer back on the LRU list
+ * Historically, ext2fs kept it's metadata buffers on the LOCKED queue. Now,
+ * we simply change the lock owner to kern so that it may be released from
+ * another context. Later, we release the buffer, and conditionally write it
+ * when we're done.
*/
#define LCK_BUF(bp) BUF_KERNPROC(bp);
OpenPOWER on IntegriCloud