Re: [PATCH 14/29] s390/dasd: Convert to bdev_open_by_path()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 23.08.23 um 12:48 schrieb Jan Kara:
Convert dasd to use bdev_open_by_path() and pass the handle around.

CC: linux-s390@xxxxxxxxxxxxxxx
CC: Christian Borntraeger <borntraeger@xxxxxxxxxxxxx>
CC: Sven Schnelle <svens@xxxxxxxxxxxxx>
Acked-by: Christoph Hellwig <hch@xxxxxx>
Signed-off-by: Jan Kara <jack@xxxxxxx>
---

The DASD part does not compile. please see below.

Beside of this the patch looks OK to me.

with the error fixed:
Acked-by: Stefan Haberland <sth@xxxxxxxxxxxxx>

  drivers/s390/block/dasd.c       | 12 +++++----
  drivers/s390/block/dasd_genhd.c | 45 ++++++++++++++++-----------------
  drivers/s390/block/dasd_int.h   |  2 +-
  drivers/s390/block/dasd_ioctl.c |  2 +-
  4 files changed, 31 insertions(+), 30 deletions(-)

diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c
index 215597f73be4..16a2d631a169 100644
--- a/drivers/s390/block/dasd.c
+++ b/drivers/s390/block/dasd.c
@@ -412,7 +412,8 @@ dasd_state_ready_to_online(struct dasd_device * device)
  					KOBJ_CHANGE);
  			return 0;
  		}
-		disk_uevent(device->block->bdev->bd_disk, KOBJ_CHANGE);
+		disk_uevent(device->block->bdev_handle->bdev->bd_disk,
+			    KOBJ_CHANGE);
  	}
  	return 0;
  }
@@ -432,7 +433,8 @@ static int dasd_state_online_to_ready(struct dasd_device *device)
device->state = DASD_STATE_READY;
  	if (device->block && !(device->features & DASD_FEATURE_USERAW))
-		disk_uevent(device->block->bdev->bd_disk, KOBJ_CHANGE);
+		disk_uevent(device->block->bdev_handle->bdev->bd_disk,
+			    KOBJ_CHANGE);
  	return 0;
  }
@@ -3590,7 +3592,7 @@ int dasd_generic_set_offline(struct ccw_device *cdev)
  	 * in the other openers.
  	 */
  	if (device->block) {
-		max_count = device->block->bdev ? 0 : -1;
+		max_count = device->block->bdev_handle ? 0 : -1;
  		open_count = atomic_read(&device->block->open_count);
  		if (open_count > max_count) {
  			if (open_count > 0)
@@ -3636,8 +3638,8 @@ int dasd_generic_set_offline(struct ccw_device *cdev)
  		 * so sync bdev first and then wait for our queues to become
  		 * empty
  		 */
-		if (device->block)
-			bdev_mark_dead(device->block->bdev, false);
+		if (device->block && device->block->bdev_handle) {

the brace is not needed here and there is no matching right brace.

+			bdev_mark_dead(device->block->bdev_handle->bdev, false);
  		dasd_schedule_device_bh(device);
  		rc = wait_event_interruptible(shutdown_waitq,
  					      _wait_for_empty_queues(device));





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux