On 06/19/2015 08:51 AM, Christoph Hellwig wrote: > On Thu, Jun 18, 2015 at 11:43:42AM +0200, Hannes Reinecke wrote: >> When LUNs are mapped with a demo-mode initiator we're missing >> the 'write_protect' attribute to set a LUN read-only. > > I don't think it's a good idea as-is. The target core clearly > differenciates between demo mode and production mode read only, and some > drivers already expose attributes for these. > > I have a big series in progress to clean the mess around this area > up. So for now please don't add anything here, it should become much > simpler after my changes, and I might be able to incorporate something > like this after the main series. > I've done this particular patch to simulate write-protected LUNs via tcm_loop. As the hooks already had been there I thought this to be the 'cleanest' approach. Of course, if you have other suggestions on how this should be achieved I'm happy to try this. Cheers, Hannes -- Dr. Hannes Reinecke zSeries & Storage hare@xxxxxxx +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton HRB 21284 (AG Nürnberg) -- To unsubscribe from this list: 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