There was a previuous discussion upstream about this kind of functionality (see https://lkml.org/lkml/2022/1/24/633). The previous patchset was rejected with concerns about how the feature was integrated. This patch takes a different approach, and instead of tying itself to unrelated mechanisms (e.g. deffer remove), this one allows an explicit signal via message interface to signalize device mapper shall block any further access to the device. The primary use case is to restrict userspace access to decrypted data after a device was setup with a kernel facility (e.g. swap). Daniil Lunev (1): dm: add message command to disallow device open drivers/md/dm-core.h | 1 + drivers/md/dm-ioctl.c | 10 ++++++++++ drivers/md/dm.c | 12 ++++++++++++ drivers/md/dm.h | 10 ++++++++++ include/uapi/linux/dm-ioctl.h | 5 +++++ 5 files changed, 38 insertions(+) -- 2.31.0 -- dm-devel mailing list dm-devel@xxxxxxxxxx https://listman.redhat.com/mailman/listinfo/dm-devel