From: Erik Mouw <erik@harddisk-recovery.com>
To: Kokachev Oleksiy <o.kokachev@samsung.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: rescan_partitions() in SCSI disk driver
Date: Thu, 13 Jul 2006 13:06:22 +0200 [thread overview]
Message-ID: <20060713110622.GF31644@harddisk-recovery.com> (raw)
In-Reply-To: <004001c6a62c$5290c8f0$73a5580a@swcenter.sec.samsung.co.kr>
On Thu, Jul 13, 2006 at 12:27:51PM +0900, Kokachev Oleksiy wrote:
> I'm trying to make some modifications to SCSI driver to correctly sync
> /proc/partitions when new disk is inserted.
> To revalidate disk I used sd_revalidate_disk(), but this function revalidate
> only disk info, but do not rescan partition table. How can I tell the driver
> to correctly rescan part/ table? I've tried to use rescan_partitions()
> function like below, but failed:
> struct scsi_disk *sdkp;
> bdev = bdget_disk(sdkp->disk, 0);
> rescan_partitions(sdkp->disk, bdev);
> But in this case bdev->bd_disk is NULL. Why? What did I do not correct?
Can be done from userland: blockdev --rereadpt /dev/whatever .
Erik
--
+-- Erik Mouw -- www.harddisk-recovery.com -- +31 70 370 12 90 --
| Lab address: Delftechpark 26, 2628 XH, Delft, The Netherlands
prev parent reply other threads:[~2006-07-13 11:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-13 3:27 rescan_partitions() in SCSI disk driver Kokachev Oleksiy
2006-07-13 11:06 ` Erik Mouw [this message]
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=20060713110622.GF31644@harddisk-recovery.com \
--to=erik@harddisk-recovery.com \
--cc=linux-scsi@vger.kernel.org \
--cc=o.kokachev@samsung.com \
/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