NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/51422: unnecesary assignation in buf_destroy sbin/fsck_lfs/bufcache.c
The following reply was made to PR bin/51422; it has been noted by GNATS.
From: Jose Luis Rodriguez Garcia <joseyluis%gmail.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: bin/51422: unnecesary assignation in buf_destroy sbin/fsck_lfs/bufcache.c
Date: Thu, 18 Aug 2016 05:20:58 +0200
Lookin further, it seems that B_NEEDCOMMIT is only used in
sys/fs/nfs/client and sys/fs/smbfs.
What was the purpose of the author of the code using B_NEEDCOMMIT?
I send a new patch removing B_NEEDCOMMIT from the user bufer cache of lfs:
Index: bufcache.c
===================================================================
RCS file: /cvsroot/src/sbin/fsck_lfs/bufcache.c,v
retrieving revision 1.16
diff -u -r1.16 bufcache.c
--- bufcache.c 31 Jul 2016 18:27:26 -0000 1.16
+++ bufcache.c 18 Aug 2016 03:18:03 -0000
@@ -155,7 +155,6 @@
void
buf_destroy(struct ubuf * bp)
{
- bp->b_flags |= B_NEEDCOMMIT;
LIST_REMOVE(bp, b_vnbufs);
LIST_REMOVE(bp, b_hash);
if (!(bp->b_flags & B_DONTFREE))
@@ -231,7 +230,6 @@
* the buffer, its contents are invalid; but shrinking is okay.
*/
if ((bp = incore(vp, lbn)) != NULL) {
- assert(!(bp->b_flags & B_NEEDCOMMIT));
assert(!(bp->b_flags & B_BUSY));
bp->b_flags |= B_BUSY;
bremfree(bp);
@@ -309,7 +307,6 @@
{
int age;
- assert(!(bp->b_flags & B_NEEDCOMMIT));
assert(bp->b_flags & B_BUSY);
bp->b_flags |= set;
Index: bufcache.h
===================================================================
RCS file: /cvsroot/src/sbin/fsck_lfs/bufcache.h,v
retrieving revision 1.12
diff -u -r1.12 bufcache.h
--- bufcache.h 29 Mar 2015 19:35:58 -0000 1.12
+++ bufcache.h 18 Aug 2016 03:18:03 -0000
@@ -92,7 +92,6 @@
* These flags are kept in b_flags.
*/
#define B_AGE 0x00000001 /* Move to age queue
when I/O done. */
-#define B_NEEDCOMMIT 0x00000002 /* Needs committing to
stable storage */
#define B_BUSY 0x00000010 /* I/O in progress. */
#define B_DELWRI 0x00000080 /* Delay I/O until
buffer reused. */
#define B_DONE 0x00000200 /* I/O completed. */
On Thu, Aug 18, 2016 at 4:35 AM, <gnats-admin%netbsd.org@localhost> wrote:
> Thank you very much for your problem report.
> It has the internal identification `bin/51422'.
> The individual assigned to look at your
> report is: bin-bug-people.
>
>>Category: bin
>>Responsible: bin-bug-people
>>Synopsis: unnecesary assignation in buf_destroy sbin/fsck_lfs/bufcache.c
>>Arrival-Date: Thu Aug 18 02:35:00 +0000 2016
>
Home |
Main Index |
Thread Index |
Old Index