All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] add ro state control function for nvdimm drivers
@ 2021-10-27 12:09 Huaisheng Ye
  2021-10-27 12:09 ` [PATCH 1/4] libnvdimm: add a ro state control function for nvdimm Huaisheng Ye
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Huaisheng Ye @ 2021-10-27 12:09 UTC (permalink / raw)
  To: dan.j.williams, hch, vishal.l.verma, dave.jiang, ira.weiny
  Cc: nvdimm, linux-kernel, Huaisheng Ye

libndctl failed to pass for the reason of writing pmem disk when running
ndctl testing.

Here is the error message below,

    namespace6.0: failed to write /dev/pmem6
    check_namespaces: namespace6.0 validate_bdev failed
    ndctl-test1 failed: -6

Commit 98f49b63e84d4ee1a5c327d0b5f4e8699f6c70fe removes set_device_ro and
e00adcadf3af7a8335026d71ab9f0e0a922191ac adds a new set_read_only method
to allow for driver-specific processing when changing the block device's
read-only state.

Current drivers nd_pmem, nd_blk and nd_btt don't have the capability to
enable or disable write protect (read-only) state. Without that,
blkdev_roset just modifies the value of bd_read_only of struct block_device
and returns success to ioctl of block device. Error would happen when writing
read-only disk next.

Add ro state control function in libnvdimm for this purpose, and implement
set_read_only for BLKROSET.

Huaisheng Ye (4):
  libnvdimm: add a ro state control function for nvdimm
  libnvdimm/pmem: implement ->set_read_only to hook into BLKROSET
    processing
  libnvdimm/blk: implement ->set_read_only to hook into BLKROSET
    processing
  libnvdimm/btt: implement ->set_read_only to hook into BLKROSET
    processing

 drivers/nvdimm/blk.c  |  1 +
 drivers/nvdimm/btt.c  |  1 +
 drivers/nvdimm/bus.c  | 17 +++++++++++++++++
 drivers/nvdimm/nd.h   |  1 +
 drivers/nvdimm/pmem.c |  1 +
 5 files changed, 21 insertions(+)

-- 
2.27.0


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

end of thread, other threads:[~2021-11-09  8:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-27 12:09 [PATCH 0/4] add ro state control function for nvdimm drivers Huaisheng Ye
2021-10-27 12:09 ` [PATCH 1/4] libnvdimm: add a ro state control function for nvdimm Huaisheng Ye
2021-10-27 12:09 ` [PATCH 2/4] libnvdimm/pmem: implement ->set_read_only to hook into BLKROSET processing Huaisheng Ye
2021-10-27 12:09 ` [PATCH 3/4] libnvdimm/blk: " Huaisheng Ye
2021-10-27 12:09 ` [PATCH 4/4] libnvdimm/btt: " Huaisheng Ye
2021-11-09  8:14 ` [PATCH 0/4] add ro state control function for nvdimm drivers Christoph Hellwig

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.