linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V3 0/3] nvmet: add ns write protect feature
@ 2018-08-02 21:10 Chaitanya Kulkarni
  2018-08-02 21:10 ` [PATCH V3 1/3] nvme: add support for ns write protect definitions Chaitanya Kulkarni
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Chaitanya Kulkarni @ 2018-08-02 21:10 UTC (permalink / raw)


Hi,

This patch series implements the support for NVMeOF target ns write
protect get/set-features command. In this implementation we support
Write Protect and No Write Protect state for the target ns which can be
toggled/read by set/get-features commands.  

Regards,
Chaitanya

Changes since V2:-
1. Fix the offset numbering.
2. Use short-cut in nvmet_ns_wp_cmd_allow() for admin-cmds.
3. Get rid of conditional operators in nvmet_write_protect_flush_sync().
4. Use the original status from the file/bdev flush call.
5. Use simplified set and unset write-protect switch with
   subsus->mutex_lock synchronization.
6. Add helper to handle get-features for write-protect.
7. Don't initialize ns->readonly in nvmet_ns_alloc().
8. Use ! instead of false for nvmet_ns_wp_cmd_allow().
9. Get rid of blk_status_t in nvmet_bdev_flush().
10. Adjust the patch for latest ANA related code changes.

Changes since V1:-
1. Incorporate Christoph's comments.
2. Use feature not changeable error code in case of invalid state
   transition.
3. Split the patche into 3 patches.
4. Set the gendisk associated with the nvme namespace into readonly mode
   if identify namespace nsattr attribute indicates namesapce is write
   protected.

Chaitanya Kulkarni (3):
  nvme: add support for ns write protect definitions
  nvme-core: set gendisk read only based on nsattr
  nvmet: add ns write protect support

 drivers/nvme/host/core.c          |  6 ++
 drivers/nvme/target/admin-cmd.c   | 97 +++++++++++++++++++++++++++++++
 drivers/nvme/target/core.c        |  5 +-
 drivers/nvme/target/io-cmd-bdev.c |  9 +++
 drivers/nvme/target/io-cmd-file.c | 15 ++++-
 drivers/nvme/target/nvmet.h       |  6 ++
 include/linux/nvme.h              | 17 +++++-
 7 files changed, 149 insertions(+), 6 deletions(-)

-- 
2.17.0

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-08-03 12:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-02 21:10 [PATCH V3 0/3] nvmet: add ns write protect feature Chaitanya Kulkarni
2018-08-02 21:10 ` [PATCH V3 1/3] nvme: add support for ns write protect definitions Chaitanya Kulkarni
2018-08-03 12:10   ` Christoph Hellwig
2018-08-02 21:10 ` [PATCH V3 2/3] nvme-core: set gendisk read only based on nsattr Chaitanya Kulkarni
2018-08-02 21:11 ` [PATCH V3 3/3] nvmet: add ns write protect support Chaitanya Kulkarni
2018-08-03 12:17   ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).