summaryrefslogtreecommitdiffstats
path: root/cpukit/libblock/include/rtems/blkdev.h
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2008-08-02 06:23:45 +0000
committerChris Johns <chrisj@rtems.org>2008-08-02 06:23:45 +0000
commit2eb89adc33e627ee6cd548af950763a4865d82d4 (patch)
treef019eca8fa84b6fa052d4d4e12780b5783fc8520 /cpukit/libblock/include/rtems/blkdev.h
parent2008-08-02 Ralf Corsépius <ralf.corsepius@rtems.org> (diff)
downloadrtems-2eb89adc33e627ee6cd548af950763a4865d82d4.tar.bz2
2008-08-02 Chris Johns (chrisj@rtems.org>
* libblock/include/rtems/blkdev.h: Remove count and start from rtems_blkdev_request. Add RTEMS_BLKDEV_START_BLOCK macro. * libblock/src/bdbuf.c: Add read ahead blocks always consecutive comment. Change count to bufnum and remove start references. Sort the transfer list so blocks are consecutive where possible. * libblock/src/blkdev.c, libblock/src/nvdisk.c, libblock/src/ramdisk.c: Change count to bufnum and remove start references.
Diffstat (limited to '')
-rw-r--r--cpukit/libblock/include/rtems/blkdev.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/cpukit/libblock/include/rtems/blkdev.h b/cpukit/libblock/include/rtems/blkdev.h
index 03b639c73c..57cbb6e47c 100644
--- a/cpukit/libblock/include/rtems/blkdev.h
+++ b/cpukit/libblock/include/rtems/blkdev.h
@@ -87,11 +87,7 @@ typedef struct rtems_blkdev_request {
rtems_status_code status;
/* If status != RTEMS_SUCCESSFUL, this field contains error code */
int error;
- /* Start block number */
- rtems_blkdev_bnum start;
- /* Number of blocks to be exchanged */
- uint32_t count;
- /* Number of buffers provided */
+ /* Number of blocks for this request. */
uint32_t bufnum;
/* The task requesting the IO operation. */
@@ -101,6 +97,10 @@ typedef struct rtems_blkdev_request {
rtems_blkdev_sg_buffer bufs[0];
} rtems_blkdev_request;
+/* The start block in a request. Only valid if the driver has returned the
+ * RTEMS_BLKDEV_CAPABILITIES of RTEMS_BLKDEV_CAP_MULTISECTOR_CONT */
+#define RTEMS_BLKDEV_START_BLOCK(_r) (_r->bufs[0].block)
+
/* Block device IOCTL request codes */
#define RTEMS_BLKIO_REQUEST _IOWR('B', 1, rtems_blkdev_request)
#define RTEMS_BLKIO_GETBLKSIZE _IO('B', 2)