On December 01, 2005 12:55PM Christoph Hellwig [mailto:hch@xxxxxxxxxxxxx] writes > On Wed, Nov 30, 2005 at 02:29:10PM -0500, Salyzyn, Mark wrote: > > Christoph Hellwig [mailto:hch@xxxxxxxxxxxxx] writes: > > > NACK on the write filter. If we can agree on it beeing > > > useful (and I must admit I tend to the contrary opinion) > > > it should be done in higher layers. > > Our customers won't stand still if we do not write (and > > read) protect the raid components. So you propose the > > introduction of an sdev->io_protect flag? > write a patch to do it and argue for it. in the driver it's in the > wrong place for certain and not acceptable by any means. I have enclosed the patch to drivers/scsi/scsi.c in support of write protection. Before this patch, the writeable flag is only checked in sd.c. With this patch we spread a wider net and cover requests from all sources including sg.c (which smartmontools access). It is possible to drop the check in sd.c, this patch does not take that action, expect it to be part of a later cleanup. This will allow the aacraid, ips, megaraid and possibly other hardware RAID drivers to export the physical components safely for status interrogation by combining the setting of no_uld_attach and writeable device flags in the slave configure function. Signed-off-by: Mark Salyzyn <Mark_Salyzyn@xxxxxxxxxxx>
Attachment:
wprotect2.patch
Description: wprotect2.patch