From: Alex Tomas <alexey@technomagesinc.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-scsi@vger.kernel.org,
James Bottomley <James.Bottomley@steeleye.com>,
Jens Axboe <axboe@suse.de>,
Dennis Gerasimov <denis@technomagesinc.com>
Subject: Re: hot scsi disk resize
Date: 04 Mar 2003 08:37:50 +0300 [thread overview]
Message-ID: <m3isuz8zf5.fsf@lexa.home.net> (raw)
In-Reply-To: 20030303181536.A30199@infradead.org
Hi!
>>>>> Christoph Hellwig (CH) writes:
CH> On Mon, Mar 03, 2003 at 08:21:24PM +0300, Alex Tomas wrote:
>> + if (err >= 0) + err = length; + } else if (!strncmp("rescan",
>> buffer + 5, 6)) { + p = buffer + 12; + + host = simple_strtoul(p,
>> &p, 0); + channel = simple_strtoul(p + 1, &p, 0); + id =
>> simple_strtoul(p + 1, &p, 0); + lun = simple_strtoul(p + 1, &p,
>> 0); + err = scsi_rescan_single_device(host, channel, id, lun); +
>> if (err >= 0) + err = length;
CH> Please don't add more procfs option. A resize attribute for the
CH> sysfs node of the scsi_device is the better choice in my opinion.
I like your idea.
>> + buffer = kmalloc(512, GFP_DMA); + else + buffer = kmalloc(512,
>> GFP_KERNEL); + + sd_read_capacity(sdkp, gd->disk_name, SRpnt,
>> buffer); + set_capacity(gd, sdkp->capacity); +
>> scsi_release_request(SRpnt); + kfree(buffer);
CH> Don't you need some kind of serialization here?
Well. I think all changes sd_read_capacity() and set_capacity() make
need not to be protected. Am I right?
>> --- 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);
CH> This needs more explanation.
This is required because open("/dev/sd*",) should see new size of
disk being used. James Bottomley suggested to introduce new ioctl, but
I hope we may implmenent the feature w/o touching userspace tools.
with best regards, Alex
next prev parent reply other threads:[~2003-03-04 5:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-03 17:21 hot scsi disk resize Alex Tomas
2003-03-03 18:15 ` Christoph Hellwig
2003-03-04 5:37 ` Alex Tomas [this message]
2003-03-04 7:00 ` alexey
2003-03-17 16:21 ` James Bottomley
2003-03-17 16:30 ` Christoph Hellwig
2003-03-04 9:31 ` Fabien Salvi
2003-03-04 9:42 ` alexey
2003-03-05 10:18 ` Fabien Salvi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3isuz8zf5.fsf@lexa.home.net \
--to=alexey@technomagesinc.com \
--cc=James.Bottomley@steeleye.com \
--cc=axboe@suse.de \
--cc=denis@technomagesinc.com \
--cc=hch@infradead.org \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox