[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1220628997.7790.30.camel@grinch>
Date: Fri, 05 Sep 2008 09:36:37 -0600
From: Andrew Patterson <andrew.patterson@...com>
To: Andre Noll <maan@...temlinux.org>
Cc: linux-scsi@...r.kernel.org, James.Bottomley@...senPartnership.com,
linux-kernel@...r.kernel.org, viro@...iv.linux.org.uk,
axboe@...nel.dk, andmike@...ux.vnet.ibm.com, mike.miller@...com,
genanr@...phone.com, jmoyer@...hat.com
Subject: Re: [PATCH 2/6] Adjust block device size after an online resize of
a disk.
On Fri, 2008-09-05 at 15:12 +0200, Andre Noll wrote:
> On 14:27, Andrew Patterson wrote:
> > int revalidate_disk(struct gendisk *disk)
> > {
> > + struct block_device *bdev;
> > int ret = 0;
> >
> > if (disk->fops->revalidate_disk)
> > ret = disk->fops->revalidate_disk(disk);
>
> Maybe we should return early at this point if revalidate_disk()
> failed or fops->revalidate_disk is NULL.
We won't run check_disk_size_change() if we return early here. So the
question is would anyone ever make this call if they didn't have a
revalidate_disk routine? This in not the case in the current code. I
could go either way.
>
> > + bdev = bdget_disk(disk, 0);
> > + if (!bdev)
> > + return ret;
>
> We might return success here even if bdev is NULL. OTOH, as the callers
> of revalidate_disk() do not check the return value anyway (although at
> least tapeblock_revalidate_disk() might return a negative value) it's
> probably also an option to change the return type of revalidate_disk()
> to void.
>
The revalidate_disk() wrapper tries to maintain compatibility with the
current interface. It might make sense to change it given no one
actually really seems to use the return value. I guess I am very wary
about effectively changing the interface of the lower-level
revalidate_disk() routines, at least in this particular patchset.
> Andre
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists