Re: [Nbd] [PATCH v1 7/7] s390/block/dasd: remove obsolete while -EBUSY loop
- To: Sebastian Ott <sebott@...1294...>
- Cc: Jens Axboe <axboe@...161...>, nbd-general@lists.sourceforge.net, linux-s390@...25..., Peter Zijlstra <peterz@...1270...>, Ming Lei <ming.lei@...1301...>, Stefan Haberland <stefan.haberland@...1296...>, 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...>, Stefan Weinhuber <wein@...1296...>
- Subject: Re: [Nbd] [PATCH v1 7/7] s390/block/dasd: remove obsolete while -EBUSY loop
- From: Jarod Wilson <jarod@...696...>
- Date: Wed, 8 Apr 2015 14:00:56 -0400
- Message-id: <20150408180056.GM14217@...696...>
- In-reply-to: <alpine.LFD.2.11.1504081924120.1757@...1992...>
- References: <1428508384-29008-1-git-send-email-ming.lei@...1301...> <1428508384-29008-8-git-send-email-ming.lei@...1301...> <alpine.LFD.2.11.1504081924120.1757@...1992...>
On Wed, Apr 08, 2015 at 07:32:24PM +0200, Sebastian Ott wrote:
> On Wed, 8 Apr 2015, Ming Lei wrote:
> > From: Jarod Wilson <jarod@...696...>
> >
> > With the mutex_trylock bit gone from blkdev_reread_part(), the retry logic
> > in dasd_scan_partitions() shouldn't be necessary.
> >
> > CC: Christoph Hellwig <hch@...1270...>
> > CC: Jens Axboe <axboe@...161...>
> > CC: Tejun Heo <tj@...1285...>
> > CC: Alexander Viro <viro@...1300...>
> > CC: Markus Pargmann <mpa@...1897...>
> > CC: Stefan Weinhuber <wein@...1296...>
> > CC: Stefan Haberland <stefan.haberland@...1296...>
> > CC: Sebastian Ott <sebott@...1294...>
> > CC: Fabian Frederick <fabf@...1980...>
> > CC: Ming Lei <ming.lei@...1301...>
> > CC: David Herrmann <dh.herrmann@...17...>
> > CC: Andrew Morton <akpm@...133...>
> > CC: Peter Zijlstra <peterz@...1270...>
> > CC: nbd-general@lists.sourceforge.net
> > CC: linux-s390@...25...
> > Signed-off-by: Jarod Wilson <jarod@...696...>
> > ---
> > drivers/s390/block/dasd_genhd.c | 13 +++----------
> > 1 file changed, 3 insertions(+), 10 deletions(-)
> >
> > diff --git a/drivers/s390/block/dasd_genhd.c b/drivers/s390/block/dasd_genhd.c
> > index 2af4619..189ea2f 100644
> > --- a/drivers/s390/block/dasd_genhd.c
> > +++ b/drivers/s390/block/dasd_genhd.c
> > @@ -99,9 +99,8 @@ void dasd_gendisk_free(struct dasd_block *block)
> > int dasd_scan_partitions(struct dasd_block *block)
> > {
> > struct block_device *bdev;
> > - int retry, rc;
> > + int rc;
> >
> > - retry = 5;
> > bdev = bdget_disk(block->gdp, 0);
> > if (!bdev) {
> > DBF_DEV_EVENT(DBF_ERR, block->base, "%s",
> > @@ -118,14 +117,8 @@ int dasd_scan_partitions(struct dasd_block *block)
> > }
> >
> > rc = blkdev_reread_part(bdev);
> > - while (rc == -EBUSY && retry > 0) {
> > - schedule();
> > - rc = blkdev_reread_part(bdev);
> > - retry--;
> > - DBF_DEV_EVENT(DBF_ERR, block->base,
> > - "scan partitions error, retry %d rc %d",
> > - retry, rc);
> > - }
> > + DBF_DEV_EVENT(DBF_ERR, block->base,
> > + "scan partitions error, rc %d", rc);
>
> Could you please change that to only write the debug message in the error
> case. Other than that, both dasd patches look good.
D'oh, absolutely. Ming, do you want me to send an updated patch 7 along in
reply here, or do you want to handle it and/or repost the entire set?
--
Jarod Wilson
jarod@...696...
Reply to: