Thread (20 messages) 20 messages, 7 authors, 2017-08-21

Re: [PATCH v2 0/5] fs, xfs: block map immutable files for dax, dma-to-storage, and swap

From: Dan Williams <hidden>
Date: 2017-08-12 04:44:05
Also in: linux-fsdevel, linux-xfs, lkml, nvdimm

On Fri, Aug 11, 2017 at 8:57 PM, Andy Lutomirski [off-list ref] wrote:
On Fri, Aug 11, 2017 at 3:26 PM, Dan Williams [off-list ref] wrote:
quoted
On Fri, Aug 11, 2017 at 3:44 AM, Christoph Hellwig [off-list ref] wrote:
quoted
Please explain how this interface allows for any sort of safe userspace
DMA.
So this is where I continue to see S_IOMAP_IMMUTABLE being able to
support applications that MAP_SYNC does not. Dave mentioned userspace
pNFS4 servers, but there's also Samba and other protocols that want to
negotiate a direct path to pmem outside the kernel. Xen support has
thus far not been able to follow in the footsteps of KVM enabling due
to a dependence on static M2P tables that assume a static
guest-physical to host-physical relationship [1]. Immutable files
would allow Xen to follow the same "mmap a file" semantic as KVM.
One thing that makes me quite nervous about S_IOMAP_IMMUTABLE is the
degree to which things go badly if one program relies on it while
another program clears the flag: you risk corrupting unrelated
filesystem metadata.  I think a userspace interface to pin the extent
mapping of a file really wants a way to reliably keep it pinned (or to
reliably zap the userspace application if it gets unpinned).
In the current patches, mapping_mapped() pins the immutable state.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help