Add GB_NOWITNESS flag
It prevents WITNESS from recording the lock order for the buffer lock acquired by getblkx(). Reviewed by: mckusick Discussed with: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D34073
This commit is contained in:
parent
e11b2b69c5
commit
c02780b78c
@ -4003,7 +4003,10 @@ loop:
|
||||
* it must be on a queue.
|
||||
*/
|
||||
lockflags = LK_EXCLUSIVE | LK_INTERLOCK |
|
||||
((flags & GB_LOCK_NOWAIT) ? LK_NOWAIT : LK_SLEEPFAIL);
|
||||
((flags & GB_LOCK_NOWAIT) != 0 ? LK_NOWAIT : LK_SLEEPFAIL);
|
||||
#ifdef WITNESS
|
||||
lockflags |= (flags & GB_NOWITNESS) != 0 ? LK_NOWITNESS : 0;
|
||||
#endif
|
||||
|
||||
error = BUF_TIMELOCK(bp, lockflags,
|
||||
BO_LOCKPTR(bo), "getblk", slpflag, slptimeo);
|
||||
|
@ -508,6 +508,7 @@ buf_track(struct buf *bp __unused, const char *location __unused)
|
||||
#define GB_CKHASH 0x0020 /* If reading, calc checksum hash */
|
||||
#define GB_NOSPARSE 0x0040 /* Do not instantiate holes */
|
||||
#define GB_CVTENXIO 0x0080 /* Convert errors to ENXIO */
|
||||
#define GB_NOWITNESS 0x0100 /* Do not record for WITNESS */
|
||||
|
||||
#ifdef _KERNEL
|
||||
extern int nbuf; /* The number of buffer headers */
|
||||
|
Loading…
x
Reference in New Issue
Block a user