Re: svn commit: r298789 - in head/sys: kern sys

2016-04-29 Thread Conrad Meyer
I think you'll want to remove them from the subsequent PRINT_BUF_FLAGS too.

Best,
Conrad

On Fri, Apr 29, 2016 at 9:32 AM, Pedro F. Giffuni  wrote:
> 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 {
>  #defineB_CACHE 0x0020  /* Bread found us in the 
> cache. */
>  #defineB_VALIDSUSPWRT  0x0040  /* Valid write during 
> suspension. */
>  #defineB_DELWRI0x0080  /* Delay I/O until buffer 
> reused. */
> -#defineB_PERSISTENT0x0100  /* Perm. ref'ed while EXT2FS 
> mounted. */
> +#defineB_0100  0x0100  /* Available flag. */
>  #defineB_DONE  0x0200  /* I/O completed. */
>  #defineB_EINTR 0x0400  /* I/O was interrupted */
>  #defineB_NOREUSE   0x0800  /* Contents not reused once 
> released. */
> @@ -213,7 +213,7 @@ struct buf {
>  #defineB_0004  0x0004  /* Available flag. */
>  #defineB_0008  0x0008  /* Available flag. */
>  #defineB_0010  0x0010  /* Available flag. */
> -#defineB_DIRTY 0x0020  /* Needs writing later (in 
> EXT2FS). */
> +#defineB_0020  0x0020  /* Available flag. */
>  #defineB_RELBUF0x0040  /* Release VMIO buffer. */
>  #defineB_FS_FLAG1  0x0080  /* Available flag for FS use. 
> */
>  #defineB_NOCOPY0x0100  /* Don't copy-on-write this 
> buf. */
>
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r298789 - in head/sys: kern sys

2016-04-29 Thread Pedro F. Giffuni
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 {
 #defineB_CACHE 0x0020  /* Bread found us in the cache. 
*/
 #defineB_VALIDSUSPWRT  0x0040  /* Valid write during 
suspension. */
 #defineB_DELWRI0x0080  /* Delay I/O until buffer 
reused. */
-#defineB_PERSISTENT0x0100  /* Perm. ref'ed while EXT2FS 
mounted. */
+#defineB_0100  0x0100  /* Available flag. */
 #defineB_DONE  0x0200  /* I/O completed. */
 #defineB_EINTR 0x0400  /* I/O was interrupted */
 #defineB_NOREUSE   0x0800  /* Contents not reused once 
released. */
@@ -213,7 +213,7 @@ struct buf {
 #defineB_0004  0x0004  /* Available flag. */
 #defineB_0008  0x0008  /* Available flag. */
 #defineB_0010  0x0010  /* Available flag. */
-#defineB_DIRTY 0x0020  /* Needs writing later (in 
EXT2FS). */
+#defineB_0020  0x0020  /* Available flag. */
 #defineB_RELBUF0x0040  /* Release VMIO buffer. */
 #defineB_FS_FLAG1  0x0080  /* Available flag for FS use. */
 #defineB_NOCOPY0x0100  /* Don't copy-on-write this 
buf. */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"