On Sat, Apr 28, 2018, 02:06 Harris, James R wrote: > > > On 4/27/18, 8:04 AM, "SPDK on behalf of Andrey Kuzmin" < > spdk-bounces(a)lists.01.org on behalf of andrey.v.kuzmin(a)gmail.com> wrote: > > On Fri, Apr 27, 2018 at 2:26 AM, Walker, Benjamin > wrote: > > On Thu, 2018-04-26 at 15:25 +0300, Andrey Kuzmin wrote: > >> Hi all, > >> > > > > >> While adding support for the shared access semantics seems to be > >> pretty straightforward, I thought it reasonable to bring the issue > up > >> here first, looking for insights, comments, and objections. Please > let > >> me know if there are any or I can give a shot to a shared access > >> patch. > > > > Your analysis is all correct. There are two access control > mechanisms in the > > bdev layer for different purposes; claiming, which is for stacking > bdevs > > together to make I/O pipelines, and descriptors, which is standard > read/write > > access control for consumers of bdevs. We thought it made the most > sense to > > allow write access to a bdev from only a single module for safety > reasons. > > What seems to be a fairly reasonable safety measure for a > general-purpose > I/O stack can easily become an unwarranted constraint in a > tightly-controlled > (say, appliance) settings. Turning single writer into a stack-level > configurable > option could buy us the best of both worlds at once. > > I’m wondering if we should just remove the safety check. The original > concern was to prevent the overwriting of metadata. For example, an NVMe > bdev contains a logical volume store – the lvol bdev module has claimed the > bdev, opening and writing directly to the NVMe bdev could corrupt the > metadata. > > But I agree there are a lot of use cases where you may still want to allow > this for one reason or another. And the Linux kernel doesn’t try to > prevent this – you can put an LVM PV/VG on a block device and then write > zeroes to the underlying block device. Same with using parted to put down > a GPT and creating a partition. > > So basically, it’s up to the user to know what they are doing. > Agreed. Regards, Andrey > -Jim > > > > > _______________________________________________ > SPDK mailing list > SPDK(a)lists.01.org > https://lists.01.org/mailman/listinfo/spdk > -- Regards, Andrey