[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230624230950.2272-1-demi@invisiblethingslab.com>
Date: Sat, 24 Jun 2023 19:09:43 -0400
From: Demi Marie Obenour <demi@...isiblethingslab.com>
To: Alasdair Kergon <agk@...hat.com>,
Mike Snitzer <snitzer@...nel.org>, dm-devel@...hat.com
Cc: Demi Marie Obenour <demi@...isiblethingslab.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH v2 0/4] Diskseq support in device-mapper
This work aims to allow userspace to create and destroy device-mapper
devices in a race-free way.
Changes since v1:
- Potentially backwards-incompatible changes to device-mapper now
require userspace opt-in.
- The code has been tested: I have a block script written in C that uses
these changes to successfully boot a Xen VM.
- The core block layer is completely untouched. Instead of exposing a
block device inode directly to userspace, device-mapper ioctls that
create a block device now return that device's diskseq. Userspace can
then use that diskseq to safely open the device. Furthermore, ioctls
that operate on an existing device-mapper device now accept a diskseq
parameter, which can be used to prevent races.
Demi Marie Obenour (4):
dm ioctl: Allow userspace to opt-in to strict parameter checks
dm ioctl: Allow userspace to provide expected diskseq
dm ioctl: Allow userspace to suppress uevent generation
dm ioctl: inform caller about already-existing device
drivers/md/dm-core.h | 2 +
drivers/md/dm-ioctl.c | 351 ++++++++++++++++++++++++++++------
drivers/md/dm.c | 5 +-
include/linux/device-mapper.h | 2 +-
include/uapi/linux/dm-ioctl.h | 90 ++++++++-
5 files changed, 382 insertions(+), 68 deletions(-)
--
Sincerely,
Demi Marie Obenour (she/her/hers)
Invisible Things Lab
Powered by blists - more mailing lists