diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/vfs_bio.c | 4 | ||||
-rw-r--r-- | sys/kern/vfs_biomem.c | 24 | ||||
-rw-r--r-- | sys/sys/buf.h | 5 |
3 files changed, 8 insertions, 25 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index a733abcedbc..7a6a77d8ed6 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_bio.c,v 1.143 2013/01/13 03:58:09 beck Exp $ */ +/* $OpenBSD: vfs_bio.c,v 1.144 2013/01/18 08:52:04 beck Exp $ */ /* $NetBSD: vfs_bio.c,v 1.44 1996/06/11 11:15:36 pk Exp $ */ /* @@ -1035,7 +1035,7 @@ buf_get(struct vnode *vp, daddr64_t blkno, size_t size) LIST_INIT(&bp->b_dep); bp->b_bcount = size; - buf_acquire_unmapped(bp); + buf_acquire_nomap(bp); if (vp != NULL) { /* diff --git a/sys/kern/vfs_biomem.c b/sys/kern/vfs_biomem.c index b8b160338a6..e93d071f281 100644 --- a/sys/kern/vfs_biomem.c +++ b/sys/kern/vfs_biomem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_biomem.c,v 1.21 2012/12/02 19:42:36 beck Exp $ */ +/* $OpenBSD: vfs_biomem.c,v 1.22 2013/01/18 08:52:04 beck Exp $ */ /* * Copyright (c) 2007 Artur Grabowski <art@openbsd.org> * @@ -82,18 +82,6 @@ buf_acquire(struct buf *bp) } /* - * Busy a buffer, but don't map it. - * If it has a mapping, we keep it, but we also keep the mapping on - * the list since we assume that it won't be used anymore. - */ -void -buf_acquire_unmapped(struct buf *bp) -{ - splassert(IPL_BIO); - SET(bp->b_flags, B_BUSY|B_NOTMAPPED); -} - -/* * Acquire a buf but do not map it. Preserve any mapping it did have. */ void @@ -101,9 +89,7 @@ buf_acquire_nomap(struct buf *bp) { splassert(IPL_BIO); SET(bp->b_flags, B_BUSY); - if (bp->b_data == NULL) - SET(bp->b_flags, B_NOTMAPPED); - else { + if (bp->b_data != NULL) { TAILQ_REMOVE(&buf_valist, bp, b_valist); bcstats.kvaslots_avail--; bcstats.busymapped++; @@ -162,8 +148,6 @@ buf_map(struct buf *bp) } bcstats.busymapped++; - - CLR(bp->b_flags, B_NOTMAPPED); } void @@ -171,7 +155,7 @@ buf_release(struct buf *bp) { KASSERT(bp->b_flags & B_BUSY); - KASSERT((bp->b_data != NULL) || (bp->b_flags & B_NOTMAPPED)); + KASSERT(bp->b_data != NULL); splassert(IPL_BIO); if (bp->b_data) { @@ -183,7 +167,7 @@ buf_release(struct buf *bp) wakeup(&buf_needva); } } - CLR(bp->b_flags, B_BUSY|B_NOTMAPPED); + CLR(bp->b_flags, B_BUSY); } /* diff --git a/sys/sys/buf.h b/sys/sys/buf.h index 0f036cd81b9..3f8c6221105 100644 --- a/sys/sys/buf.h +++ b/sys/sys/buf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: buf.h,v 1.82 2012/12/02 19:42:36 beck Exp $ */ +/* $OpenBSD: buf.h,v 1.83 2013/01/18 08:52:04 beck Exp $ */ /* $NetBSD: buf.h,v 1.25 1997/04/09 21:12:17 mycroft Exp $ */ /* @@ -234,13 +234,12 @@ struct buf { #define B_SCANNED 0x00100000 /* Block already pushed during sync */ #define B_PDAEMON 0x00200000 /* I/O started by pagedaemon */ #define B_RELEASED 0x00400000 /* free this buffer after its kvm */ -#define B_NOTMAPPED 0x00800000 /* BUSY, but not necessarily mapped */ #define B_BITS "\20\001AGE\002NEEDCOMMIT\003ASYNC\004BAD\005BUSY" \ "\006CACHE\007CALL\010DELWRI\011DONE\012EINTR\013ERROR" \ "\014INVAL\015NOCACHE\016PHYS\017RAW\020READ" \ "\021WANTED\022WRITEINPROG\023XXX(FORMAT)\024DEFERRED" \ - "\025SCANNED\026DAEMON\027RELEASED\030NOTMAPPED" + "\025SCANNED\026DAEMON\027RELEASED" /* * This structure describes a clustered I/O. It is stored in the b_saveaddr |