[pnfs] [PATCH 05/28] pnfsblock: expose scsi interface
Fredric Isaman
iisaman at citi.umich.edu
Wed Mar 12 16:30:20 EDT 2008
On Wed, 12 Mar 2008, Christoph Hellwig wrote:
> On Wed, Mar 12, 2008 at 02:10:03PM -0400, Fredric Isaman wrote:
>>>> Yes, absolutely. No one outside of few places in the core scsi code
>>>> should ever iterate over the scsi disks.
>>>>
>>
>> Is this for locking reasons?
>
> It's for abstraction and data hiding reasons. The existance of such
> a list is an implementation detail. Any inkernel or external user
> should use the block device API to access block devices. Even the
> implementation using the scsi layer is an implementation detail.
>
>> Basically, we are given a disk signature, (an array of offset, byte
>> sequence pairs) and want to match it against some visible disk (ignoring
>> partitions), or know that it is not currently visible.
>>
>> Thus our requirement are:
>>
>> Scan all available block devices (though all available SCSI devices is a
>> workable substitute).
>>
>> Notification of new devices would be a helpful in optimizing rescans for
>> unmapped disk signatures.
>>
>>
>> As Jason mentions, we will pursue doing this in userspace.
>
> Try looking into the libvolume_id and libblkid libraries which solve
> exactly this problem already, and it's a quite complicated one to start
> with.
>
>
OK. Thanks for the pointers.
Fred
More information about the pNFS
mailing list