summaryrefslogtreecommitdiffstats
path: root/cpukit/libblock/include/rtems/bdbuf.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/libblock/include/rtems/bdbuf.h')
-rw-r--r--cpukit/libblock/include/rtems/bdbuf.h39
1 files changed, 18 insertions, 21 deletions
diff --git a/cpukit/libblock/include/rtems/bdbuf.h b/cpukit/libblock/include/rtems/bdbuf.h
index 37e06aa9e9..254c745c7a 100644
--- a/cpukit/libblock/include/rtems/bdbuf.h
+++ b/cpukit/libblock/include/rtems/bdbuf.h
@@ -301,7 +301,7 @@ typedef struct rtems_bdbuf_group rtems_bdbuf_group;
* To manage buffers we using buffer descriptors (BD). A BD holds a buffer plus
* a range of other information related to managing the buffer in the cache. To
* speed-up buffer lookup descriptors are organized in AVL-Tree. The fields
- * 'dev' and 'block' are search keys.
+ * 'dd' and 'block' are search keys.
*/
typedef struct rtems_bdbuf_buffer
{
@@ -315,7 +315,7 @@ typedef struct rtems_bdbuf_buffer
signed char bal; /**< The balance of the sub-tree */
} avl;
- dev_t dev; /**< device number */
+ const rtems_disk_device *dd; /**< disk device */
rtems_blkdev_bnum block; /**< block number on the device */
@@ -470,8 +470,7 @@ rtems_bdbuf_init (void);
* The block number is the linear block number. This is relative to the start
* of the partition on the media.
*
- * @param device [in] Device number (constructed of major and minor device
- * number).
+ * @param dd [in] The disk device.
* @param block [in] Linear media block number.
* @param bd [out] Reference to the buffer descriptor pointer.
*
@@ -481,7 +480,11 @@ rtems_bdbuf_init (void);
* @retval RTEMS_INVALID_NUMBER Invalid block size.
*/
rtems_status_code
-rtems_bdbuf_get (dev_t device, rtems_blkdev_bnum block, rtems_bdbuf_buffer** bd);
+rtems_bdbuf_get (
+ const rtems_disk_device *dd,
+ rtems_blkdev_bnum block,
+ rtems_bdbuf_buffer** bd
+);
/**
* Get the block buffer and if not already in the cache read from the disk. If
@@ -498,8 +501,7 @@ rtems_bdbuf_get (dev_t device, rtems_blkdev_bnum block, rtems_bdbuf_buffer** bd)
* buffer is returned. The highest priority waiter will obtain the buffer
* first.
*
- * @param device [in] Device number (constructed of major and minor device
- * number).
+ * @param dd [in] The disk device.
* @param block [in] Linear media block number.
* @param bd [out] Reference to the buffer descriptor pointer.
*
@@ -510,7 +512,11 @@ rtems_bdbuf_get (dev_t device, rtems_blkdev_bnum block, rtems_bdbuf_buffer** bd)
* @retval RTEMS_IO_ERROR IO error.
*/
rtems_status_code
-rtems_bdbuf_read (dev_t device, rtems_blkdev_bnum block, rtems_bdbuf_buffer** bd);
+rtems_bdbuf_read (
+ const rtems_disk_device *dd,
+ rtems_blkdev_bnum block,
+ rtems_bdbuf_buffer** bd
+);
/**
* Release the buffer obtained by a read call back to the cache. If the buffer
@@ -575,31 +581,22 @@ rtems_bdbuf_sync (rtems_bdbuf_buffer* bd);
* @note Nesting calls to sync multiple devices will be handled sequentially. A
* nested call will be blocked until the first sync request has complete.
*
- * @param dev [in] Device number (constructed of major and minor device
- * number).
+ * @param dd [in] The disk device.
*
* @retval RTEMS_SUCCESSFUL Successful operation.
* @retval RTEMS_NOT_CONFIGURED Not initialized.
* @retval RTEMS_INVALID_ID No such device.
*/
rtems_status_code
-rtems_bdbuf_syncdev (dev_t dev);
+rtems_bdbuf_syncdev (const rtems_disk_device *dd);
/**
- * @brief Purges all buffers that matches the device identifier @a dev.
+ * @brief Purges all buffers corresponding to the disk device @a dd.
*
* This may result in loss of data.
*/
void
-rtems_bdbuf_purge_dev (dev_t dev);
-
-/**
- * @brief Purges all buffers that matches the device major number @a major.
- *
- * This may result in loss of data.
- */
-void
-rtems_bdbuf_purge_major (rtems_device_major_number major);
+rtems_bdbuf_purge_dev (const rtems_disk_device *dd);
/** @} */