Re: [Nbd] [PATCH 5/6] block: dasd_genhd: convert to blkdev_reread_part
- To: Jarod Wilson <jarod@...696...>
- Cc: Jens Axboe <axboe@...161...>, "nbd-general@lists.sourceforge.net" <nbd-general@lists.sourceforge.net>, linux-s390@...25..., Stefan Haberland <stefan.haberland@...1296...>, Sebastian Ott <sebott@...1294...>, Linux Kernel Mailing List <linux-kernel@...25...>, Christoph Hellwig <hch@...1270...>, Fabian Frederick <fabf@...1980...>, Alexander Viro <viro@...1300...>, David Herrmann <dh.herrmann@...17...>, Tejun Heo <tj@...1285...>, Andrew Morton <akpm@...133...>
- Subject: Re: [Nbd] [PATCH 5/6] block: dasd_genhd: convert to blkdev_reread_part
- From: Ming Lei <ming.lei@...1301...>
- Date: Tue, 7 Apr 2015 08:47:33 +0800
- Message-id: <CACVXFVO6Snp2FtnSXJNfcXNg2T81gHGy8TwfVCJ4MRqQvYO7sA@...18...>
- In-reply-to: <20150406134655.GE14217@...696...>
- References: <1428218688-4092-1-git-send-email-ming.lei@...1301...> <1428218688-4092-6-git-send-email-ming.lei@...1301...> <20150406134655.GE14217@...696...>
On Mon, Apr 6, 2015 at 9:46 PM, Jarod Wilson <jarod@...696...> wrote:
> On Sun, Apr 05, 2015 at 03:24:47PM +0800, Ming Lei wrote:
>> Also remove the obsolete comment.
>>
>> Signed-off-by: Ming Lei <ming.lei@...1301...>
>> ---
>> drivers/s390/block/dasd_genhd.c | 9 +++------
>> 1 file changed, 3 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/s390/block/dasd_genhd.c b/drivers/s390/block/dasd_genhd.c
>> index 90f39f7..2af4619 100644
>> --- a/drivers/s390/block/dasd_genhd.c
>> +++ b/drivers/s390/block/dasd_genhd.c
>> @@ -116,14 +116,11 @@ int dasd_scan_partitions(struct dasd_block *block)
>> rc);
>> return -ENODEV;
>> }
>> - /*
>> - * See fs/partition/check.c:register_disk,rescan_partitions
>> - * Can't call rescan_partitions directly. Use ioctl.
>> - */
>> - rc = ioctl_by_bdev(bdev, BLKRRPART, 0);
>> +
>> + rc = blkdev_reread_part(bdev);
>> while (rc == -EBUSY && retry > 0) {
>> schedule();
>> - rc = ioctl_by_bdev(bdev, BLKRRPART, 0);
>> + rc = blkdev_reread_part(bdev);
>> retry--;
>> DBF_DEV_EVENT(DBF_ERR, block->base,
>> "scan partitions error, retry %d rc %d",
>
> Note: patch 6/6 in the series makes this whole while() loops pointless,
> since the possibility of the -EBUSY return goes away.
Yes, I do see that, and the while() can be removed after this patchset
is merged.
Thanks,
Ming Lei
Reply to: