Re: [PATCHSET RFC] block/SCSI: implement in-kernel disk eventhandling

From: Mike Anderson
Date: Thu Nov 04 2010 - 14:38:25 EST


Douglas Gilbert <dgilbert@xxxxxxxxxxxx> wrote:
<snip>
> Ideally I would like to see a way from the user space
> to uncouple a unit from the sd (or sr) driver, in a
> similar way to how an LLD can use
> scsi_device::no_uld_attach . That would restrict user
> space access to the bsg or sg driver.

I am not sure if this is exactly what you want but you can unbind a
device from the sd driver today.

E.x.

# cd /sys/bus/scsi/drivers/sd
# ls
0:0:0:0 4:0:0:0 4:0:1:0 5:0:0:0 5:0:1:0 bind unbind
# sg_map
/dev/sg0 /dev/sda
/dev/sg1 /dev/sdb
/dev/sg2 /dev/sdc
/dev/sg3 /dev/sdd
/dev/sg4 /dev/sde
# echo "5:0:1:0" > unbind
# ls
0:0:0:0 4:0:0:0 4:0:1:0 5:0:0:0 bind unbind
# sg_map
/dev/sg0 /dev/sda
/dev/sg1 /dev/sdb
/dev/sg2 /dev/sdc
/dev/sg3 /dev/sdd
/dev/sg4

-andmike
--
Michael Anderson
andmike@xxxxxxxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/