svn commit: r298789 - in head/sys: kern sys
Pedro F. Giffuni
pfg at FreeBSD.org
Fri Apr 29 16:32:29 UTC 2016
Author: pfg
Date: Fri Apr 29 16:32:28 2016
New Revision: 298789
URL: https://svnweb.freebsd.org/changeset/base/298789
Log:
bufs: make B_DIRTY and B_PERSISTENT flags available
It appears these flags were related to ext2fs but are completely
unused nowadays. Retire them.
Suggested by: mckusick
Modified:
head/sys/kern/vfs_bio.c
head/sys/sys/buf.h
Modified: head/sys/kern/vfs_bio.c
==============================================================================
--- head/sys/kern/vfs_bio.c Fri Apr 29 16:07:25 2016 (r298788)
+++ head/sys/kern/vfs_bio.c Fri Apr 29 16:32:28 2016 (r298789)
@@ -1162,8 +1162,7 @@ vfs_buf_check_unmapped(struct buf *bp)
static int
isbufbusy(struct buf *bp)
{
- if (((bp->b_flags & (B_INVAL | B_PERSISTENT)) == 0 &&
- BUF_ISLOCKED(bp)) ||
+ if (((bp->b_flags & B_INVAL) == 0 && BUF_ISLOCKED(bp)) ||
((bp->b_flags & (B_DELWRI | B_INVAL)) == B_DELWRI))
return (1);
return (0);
Modified: head/sys/sys/buf.h
==============================================================================
--- head/sys/sys/buf.h Fri Apr 29 16:07:25 2016 (r298788)
+++ head/sys/sys/buf.h Fri Apr 29 16:32:28 2016 (r298789)
@@ -200,7 +200,7 @@ struct buf {
#define B_CACHE 0x00000020 /* Bread found us in the cache. */
#define B_VALIDSUSPWRT 0x00000040 /* Valid write during suspension. */
#define B_DELWRI 0x00000080 /* Delay I/O until buffer reused. */
-#define B_PERSISTENT 0x00000100 /* Perm. ref'ed while EXT2FS mounted. */
+#define B_00000100 0x00000100 /* Available flag. */
#define B_DONE 0x00000200 /* I/O completed. */
#define B_EINTR 0x00000400 /* I/O was interrupted */
#define B_NOREUSE 0x00000800 /* Contents not reused once released. */
@@ -213,7 +213,7 @@ struct buf {
#define B_00040000 0x00040000 /* Available flag. */
#define B_00080000 0x00080000 /* Available flag. */
#define B_00100000 0x00100000 /* Available flag. */
-#define B_DIRTY 0x00200000 /* Needs writing later (in EXT2FS). */
+#define B_00200000 0x00200000 /* Available flag. */
#define B_RELBUF 0x00400000 /* Release VMIO buffer. */
#define B_FS_FLAG1 0x00800000 /* Available flag for FS use. */
#define B_NOCOPY 0x01000000 /* Don't copy-on-write this buf. */
More information about the svn-src-head
mailing list