diff options
author | grog <grog@FreeBSD.org> | 2001-05-22 02:28:55 +0000 |
---|---|---|
committer | grog <grog@FreeBSD.org> | 2001-05-22 02:28:55 +0000 |
commit | 37b41ff62db4279283d7453860d4fbd74b375095 (patch) | |
tree | 2b6106cfac12f5dc656bbd550e619920cdd6cfa5 /sys/dev | |
parent | 335e7f48ab673b5e66db325246d41a53e81bf4da (diff) | |
download | FreeBSD-src-37b41ff62db4279283d7453860d4fbd74b375095.zip FreeBSD-src-37b41ff62db4279283d7453860d4fbd74b375095.tar.gz |
Add xferinfo flag bit for copied buffers.
Create a new struct rangelockinfo. In revision 1.21 of vinumlock.c,
the plex info was removed from struct rangelock, since it wasn't
needed there. It *is* needed for trace information, however, so use
struct rangelockinfo for that.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/vinum/request.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/sys/dev/vinum/request.h b/sys/dev/vinum/request.h index 25d826f..3d215e3 100644 --- a/sys/dev/vinum/request.h +++ b/sys/dev/vinum/request.h @@ -33,7 +33,7 @@ * otherwise) arising in any way out of the use of this software, even if * advised of the possibility of such damage. * - * $Id: request.h,v 1.18 2000/05/07 04:05:33 grog Exp grog $ + * $Id: request.h,v 1.19 2000/11/24 03:41:51 grog Exp grog $ * $FreeBSD$ */ @@ -55,6 +55,7 @@ enum xferinfo { #endif XFR_REVIVECONFLICT = 0x1000, /* possible conflict with a revive operation */ XFR_BUFLOCKED = 0x2000, /* BUF_LOCK performed on this buffer */ + XFR_COPYBUF = 0x4000, /* data buffer was copied */ /* operations that need a parity block */ XFR_PARITYOP = (XFR_NORMAL_WRITE | XFR_RECOVERY_READ | XFR_DEGRADED_WRITE), /* operations that use the group parameters */ @@ -129,6 +130,7 @@ struct rqgroup { */ struct request { struct buf *bp; /* pointer to the high-level request */ + caddr_t save_data; /* for copied write buffers */ enum xferinfo flags; union { int volno; /* volume index */ @@ -187,10 +189,22 @@ enum rqinfo_type { loginfo_unlock, /* unlock range */ }; +/* + * This is the rangelock structure with an added + * buffer pointer and plex number. We don't need + * the plex number for the locking protocol, but + * it does help a lot when logging. + */ +struct rangelockinfo { + daddr_t stripe; /* address + 1 of the range being locked */ + struct buf *bp; /* user's buffer pointer */ + int plexno; +}; + union rqinfou { /* info to pass to logrq */ struct buf *bp; struct rqelement *rqe; /* address of request, for correlation */ - struct rangelock *lockinfo; + struct rangelockinfo *lockinfo; }; struct rqinfo { |