summaryrefslogtreecommitdiffstats
path: root/cpukit/libfs/src/rfs/rtems-rfs-file-system.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2012-02-28 17:19:49 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2012-03-13 12:24:18 +0100
commit796967c3df40a51a9028bc83d1a4b6dbeae07c3f (patch)
treeedd7251883f74506a69f76e6e9fbf173de195f50 /cpukit/libfs/src/rfs/rtems-rfs-file-system.h
parentlibblock: Documentation (diff)
downloadrtems-796967c3df40a51a9028bc83d1a4b6dbeae07c3f.tar.bz2
libblock: Change bdbuf API
The functions o rtems_bdbuf_get(), o rtems_bdbuf_read(), o rtems_bdbuf_syncdev(), and o rtems_bdbuf_purge_dev(), use now the disk device instead of the device identifier. This makes bdbuf independent of rtems_disk_obtain() and rtems_disk_release(). It is the responsiblity of the file system to obtain the disk device. This also reduces the overhead to get a buffer. The key for the AVL tree uses now the disk device instead of the device identifier. The pointer is interpreted as an unsigned integer. This reduces the memory overhead and makes the comparison operation a bit faster. Removed function rtems_bdbuf_purge_major(). This function was too destructive and could have unpredictable side effects.
Diffstat (limited to 'cpukit/libfs/src/rfs/rtems-rfs-file-system.h')
-rw-r--r--cpukit/libfs/src/rfs/rtems-rfs-file-system.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/cpukit/libfs/src/rfs/rtems-rfs-file-system.h b/cpukit/libfs/src/rfs/rtems-rfs-file-system.h
index 0ceade228e..96fdf6c9ab 100644
--- a/cpukit/libfs/src/rfs/rtems-rfs-file-system.h
+++ b/cpukit/libfs/src/rfs/rtems-rfs-file-system.h
@@ -131,6 +131,11 @@ struct _rtems_rfs_file_system
*/
size_t block_size;
+ /**
+ * The file descriptor for device I/O.
+ */
+ int device;
+
#if RTEMS_RFS_USE_LIBBLOCK
/**
* The disk device. This is the data about the block device this file system
@@ -140,11 +145,6 @@ struct _rtems_rfs_file_system
rtems_disk_device* disk;
#else
/**
- * The device number which is a the file handle for device I/O.
- */
- dev_t device;
-
- /**
* The number of blocks in the file system.
*/
size_t size;
@@ -284,7 +284,7 @@ struct _rtems_rfs_file_system
* @param _fs Pointer to the file system.
*/
#if RTEMS_RFS_USE_LIBBLOCK
-#define rtems_rfs_fs_device(_fs) ((_fs)->disk->dev)
+#define rtems_rfs_fs_device(_fs) ((_fs)->disk)
#else
#define rtems_rfs_fs_device(_fs) ((_fs)->device)
#endif