summaryrefslogtreecommitdiff
path: root/fs/reiserfs
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2015-12-07 11:38:48 -0700
committerTom Rini <trini@konsulko.com>2016-01-13 21:05:18 -0500
commit7c4213f6a52f35ff6ba2d97aa4eb04cbfc963b86 (patch)
tree8dfb6b9f5721891de191bad798b0533e3a0bf69a /fs/reiserfs
parentadc421e4cee8275cd99367b3b455ffbb5ead3990 (diff)
block: pass block dev not num to read/write/erase()
This will allow the implementation to make use of data in the block_dev structure beyond the base device number. This will be useful so that eMMC block devices can encompass the HW partition ID rather than treating this out-of-band. Equally, the existence of the priv field is crying out for this patch to exist. Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'fs/reiserfs')
-rw-r--r--fs/reiserfs/dev.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/fs/reiserfs/dev.c b/fs/reiserfs/dev.c
index 68255458d5..7b24d6aa71 100644
--- a/fs/reiserfs/dev.c
+++ b/fs/reiserfs/dev.c
@@ -59,9 +59,11 @@ int reiserfs_devread (int sector, int byte_offset, int byte_len, char *buf)
if (byte_offset != 0) {
/* read first part which isn't aligned with start of sector */
- if (reiserfs_block_dev_desc->block_read(reiserfs_block_dev_desc->dev,
- part_info->start + sector, 1,
- (unsigned long *)sec_buf) != 1) {
+ if (reiserfs_block_dev_desc->block_read(reiserfs_block_dev_desc,
+ part_info->start +
+ sector,
+ 1, (void *)sec_buf)
+ != 1) {
printf (" ** reiserfs_devread() read error\n");
return 0;
}
@@ -73,9 +75,11 @@ int reiserfs_devread (int sector, int byte_offset, int byte_len, char *buf)
/* read sector aligned part */
block_len = byte_len & ~(SECTOR_SIZE-1);
- if (reiserfs_block_dev_desc->block_read(reiserfs_block_dev_desc->dev,
- part_info->start + sector, block_len/SECTOR_SIZE,
- (unsigned long *)buf) != block_len/SECTOR_SIZE) {
+ if (reiserfs_block_dev_desc->block_read(reiserfs_block_dev_desc,
+ part_info->start + sector,
+ block_len / SECTOR_SIZE,
+ (void *)buf)
+ != block_len/SECTOR_SIZE) {
printf (" ** reiserfs_devread() read error - block\n");
return 0;
}
@@ -85,9 +89,11 @@ int reiserfs_devread (int sector, int byte_offset, int byte_len, char *buf)
if ( byte_len != 0 ) {
/* read rest of data which are not in whole sector */
- if (reiserfs_block_dev_desc->block_read(reiserfs_block_dev_desc->dev,
- part_info->start + sector, 1,
- (unsigned long *)sec_buf) != 1) {
+ if (reiserfs_block_dev_desc->block_read(reiserfs_block_dev_desc,
+ part_info->start +
+ sector,
+ 1, (void *)sec_buf)
+ != 1) {
printf (" ** reiserfs_devread() read error - last part\n");
return 0;
}