Re: rescan_partitions() in SCSI disk driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux