diff options
author | Pawel Jakub Dawidek <pjd@FreeBSD.org> | 2004-08-04 21:35:05 +0000 |
---|---|---|
committer | Pawel Jakub Dawidek <pjd@FreeBSD.org> | 2004-08-04 21:35:05 +0000 |
commit | 51385a3c0085796ea4b8d6883c03e0735be207b6 (patch) | |
tree | c0a8d5c029b11ea1effeb49bac7f946df7e11fc7 /sys/sys | |
parent | 29fe871daef9267c2b84fef43ed30893925adc67 (diff) | |
download | src-51385a3c0085796ea4b8d6883c03e0735be207b6.tar.gz src-51385a3c0085796ea4b8d6883c03e0735be207b6.zip |
- Add two fields to bio structure: 'bio_cflags' which can be used by
consumer and 'bio_pflags' which can be used by provider.
- Remove BIO_FLAG1 and BIO_FLAG2 flags. From now on new fields should be
used for internal flags.
- Update g_bio(9) manual page.
- Update some comments.
- Update GEOM_MIRROR, which was the only one using BIO_FLAGs.
Idea from: phk
Reviewed by: phk
Notes
Notes:
svn path=/head/; revision=133142
Diffstat (limited to 'sys/sys')
-rw-r--r-- | sys/sys/bio.h | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/sys/sys/bio.h b/sys/sys/bio.h index be9b20e02053..33ae4e7a376f 100644 --- a/sys/sys/bio.h +++ b/sys/sys/bio.h @@ -49,20 +49,22 @@ typedef void bio_task_t(void *); * The bio structure describes an I/O operation in the kernel. */ struct bio { - u_int bio_cmd; /* I/O operation. */ + uint8_t bio_cmd; /* I/O operation. */ + uint8_t bio_flags; /* General flags. */ + uint8_t bio_cflags; /* Private use by the consumer. */ + uint8_t bio_pflags; /* Private use by the provider. */ struct cdev *bio_dev; /* Device to do I/O on. */ struct disk *bio_disk; /* Valid below geom_disk.c only */ off_t bio_offset; /* Offset into file. */ long bio_bcount; /* Valid bytes in buffer. */ caddr_t bio_data; /* Memory, superblocks, indirect etc. */ - u_int bio_flags; /* BIO_ flags. */ int bio_error; /* Errno for BIO_ERROR. */ long bio_resid; /* Remaining I/0 in bytes. */ void (*bio_done)(struct bio *); - void *bio_driver1; /* Private use by the callee. */ - void *bio_driver2; /* Private use by the callee. */ - void *bio_caller1; /* Private use by the caller. */ - void *bio_caller2; /* Private use by the caller. */ + void *bio_driver1; /* Private use by the provider. */ + void *bio_driver2; /* Private use by the provider. */ + void *bio_caller1; /* Private use by the consumer. */ + void *bio_caller2; /* Private use by the consumer. */ TAILQ_ENTRY(bio) bio_queue; /* Disksort queue. */ const char *bio_attribute; /* Attribute for BIO_[GS]ETATTR */ struct g_consumer *bio_from; /* GEOM linkage */ @@ -82,18 +84,16 @@ struct bio { }; /* bio_cmd */ -#define BIO_READ 0x00000001 -#define BIO_WRITE 0x00000002 -#define BIO_DELETE 0x00000004 -#define BIO_GETATTR 0x00000008 -#define BIO_CMD1 0x40000000 /* Available for local hacks */ -#define BIO_CMD2 0x80000000 /* Available for local hacks */ +#define BIO_READ 0x01 +#define BIO_WRITE 0x02 +#define BIO_DELETE 0x04 +#define BIO_GETATTR 0x08 +#define BIO_CMD1 0x40 /* Available for local hacks */ +#define BIO_CMD2 0x80 /* Available for local hacks */ /* bio_flags */ -#define BIO_ERROR 0x00000001 -#define BIO_DONE 0x00000004 -#define BIO_FLAG2 0x40000000 /* Available for local hacks */ -#define BIO_FLAG1 0x80000000 /* Available for local hacks */ +#define BIO_ERROR 0x01 +#define BIO_DONE 0x02 #ifdef _KERNEL |