From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Bottomley Subject: Re: hot scsi disk resize Date: 17 Mar 2003 10:21:41 -0600 Sender: linux-scsi-owner@vger.kernel.org Message-ID: <1047918111.1632.3.camel@mulgrave> References: <20030303181536.A30199@infradead.org> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Id: linux-scsi@vger.kernel.org To: alexey@technomagesinc.com Cc: Christoph Hellwig , SCSI Mailing List , Jens Axboe , Dennis Gerasimov , viro@math.psu.edu On Tue, 2003-03-04 at 01:00, alexey@technomagesinc.com wrote: > Here is new version of the patch. All procfs-related stuff has been removed. > One may rescan device size writing something to /sysfs/...//rescan: I applied all of this, except this piece: > diff -uNr linux/fs/block_dev.c edited/fs/block_dev.c > --- linux/fs/block_dev.c Mon Jan 20 02:23:49 2003 > +++ edited/fs/block_dev.c Mon Mar 3 18:49:47 2003 > @@ -623,6 +623,8 @@ > up(&whole->bd_sem); > } > } else { > + if (!part) > + bd_set_size(bdev,(loff_t)get_capacity(disk)<<9); > put_disk(disk); > module_put(owner); > if (bdev->bd_contains == bdev) { > > Because adding this in will break the initial ramdisk. Thus, although the SCSI layer does resize, the block layer may not. I've copied Al Viro because he's more familiar with the block layer device code than I and may have been planning to add this feature. Al, can you tell us what needs to happen to allow for hot resizing a SCSI disc? Thanks, James