Open liulanzheng opened 3 years ago
Yeah, it doesn't implement the SWP bit in the mode sense control page.
You can implement it in handle_control_page()
if you want, which is similar to dev->write_cache_enabled
.
@lxbsz Thanks for you advice, I implemented it and worked. But I am not quite familiar with iSCSI protocol and 'mode sense control page', I didn't find how to implement it in handle_control_page(). At last, I set the SWP bit in the 'DEVICE-SPECIFIC PARAMETER' field in the 'mode parameter header'. I am not sure whether it is correct even thong it worked.
Yeah, set the wp
bit in DEVICE-SPECIFIC PARAMETER
should be enough.
For the spec, you can refer to https://origin-www.seagate.com/files/staticfiles/support/docs/manual/Interface%20manuals/100293068j.pdf
I need to mark a device write protected or not depending on what file is opened. But i didn't find an api to set the write protected bit in libtcmu.