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

2017-08-21 Thread Peter Zijlstra
On Mon, Aug 14, 2017 at 02:40:59PM +0200, Jan Kara wrote: > Hum, this proposal (and the problems you are trying to deal with) seem very > similar to Peter Zijlstra's mpin() proposal from 2014 [1], just moved to > the DAX area (and so additionally complicated by the fact that filesystems > now have

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

2017-08-16 Thread Jan Kara
On Tue 15-08-17 16:50:55, Dan Williams wrote: > On Tue, Aug 15, 2017 at 1:37 AM, Jan Kara wrote: > > On Mon 14-08-17 09:14:42, Dan Williams wrote: > >> On Mon, Aug 14, 2017 at 5:40 AM, Jan Kara wrote: > >> > On Sun 13-08-17 13:31:45, Dan Williams wrote: > >> >> On Sun, Aug 13, 2017 at 2:24 AM, Ch

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

2017-08-15 Thread Dan Williams
On Tue, Aug 15, 2017 at 1:37 AM, Jan Kara wrote: > On Mon 14-08-17 09:14:42, Dan Williams wrote: >> On Mon, Aug 14, 2017 at 5:40 AM, Jan Kara wrote: >> > On Sun 13-08-17 13:31:45, Dan Williams wrote: >> >> On Sun, Aug 13, 2017 at 2:24 AM, Christoph Hellwig wrote: >> >> > Thay being said I think

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

2017-08-15 Thread Jan Kara
On Mon 14-08-17 09:14:42, Dan Williams wrote: > On Mon, Aug 14, 2017 at 5:40 AM, Jan Kara wrote: > > On Sun 13-08-17 13:31:45, Dan Williams wrote: > >> On Sun, Aug 13, 2017 at 2:24 AM, Christoph Hellwig wrote: > >> > Thay being said I think we absolutely should support RDMA memory > >> > registra

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

2017-08-14 Thread Darrick J. Wong
On Sun, Aug 13, 2017 at 01:31:45PM -0700, Dan Williams wrote: > On Sun, Aug 13, 2017 at 2:24 AM, Christoph Hellwig wrote: > > On Sat, Aug 12, 2017 at 12:19:50PM -0700, Dan Williams wrote: > >> The application does not need to know the storage address, it needs to > >> know that the storage address

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

2017-08-14 Thread Dan Williams
On Mon, Aug 14, 2017 at 5:40 AM, Jan Kara wrote: > On Sun 13-08-17 13:31:45, Dan Williams wrote: >> On Sun, Aug 13, 2017 at 2:24 AM, Christoph Hellwig wrote: >> > Thay being said I think we absolutely should support RDMA memory >> > registrations for DAX mappings. I'm just not sure how S_IOMAP_I

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

2017-08-14 Thread Jan Kara
On Sun 13-08-17 13:31:45, Dan Williams wrote: > On Sun, Aug 13, 2017 at 2:24 AM, Christoph Hellwig wrote: > > Thay being said I think we absolutely should support RDMA memory > > registrations for DAX mappings. I'm just not sure how S_IOMAP_IMMUTABLE > > helps with that. We'll want a MAP_SYNC |

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

2017-08-13 Thread Dave Chinner
On Sun, Aug 13, 2017 at 11:24:36AM +0200, Christoph Hellwig wrote: > And maybe that's where we need to converge - > "sealing" the extent map makes sense as such a temporary measure > that is not persisted on disk, which automatically gets released > when the holding process exits, because we sort

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

2017-08-13 Thread Dan Williams
On Sun, Aug 13, 2017 at 2:24 AM, Christoph Hellwig wrote: > On Sat, Aug 12, 2017 at 12:19:50PM -0700, Dan Williams wrote: >> The application does not need to know the storage address, it needs to >> know that the storage address to file offset is fixed. With this >> information it can make assumpt

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

2017-08-13 Thread Christoph Hellwig
On Sat, Aug 12, 2017 at 12:19:50PM -0700, Dan Williams wrote: > The application does not need to know the storage address, it needs to > know that the storage address to file offset is fixed. With this > information it can make assumptions about the permanence of results it > gets from the kernel.

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

2017-08-12 Thread Dan Williams
On Sat, Aug 12, 2017 at 12:33 AM, Christoph Hellwig wrote: > On Fri, Aug 11, 2017 at 03:26:05PM -0700, Dan Williams wrote: >> Right, but they let userspace make inferences about the state of >> metadata relative to I/O to a given storage address. In this regard >> S_IOMAP_IMMUTABLE is no different

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

2017-08-12 Thread Christoph Hellwig
On Fri, Aug 11, 2017 at 08:57:18PM -0700, Andy Lutomirski wrote: > 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 thin

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

2017-08-12 Thread Christoph Hellwig
On Fri, Aug 11, 2017 at 03:26:05PM -0700, Dan Williams wrote: > Right, but they let userspace make inferences about the state of > metadata relative to I/O to a given storage address. In this regard > S_IOMAP_IMMUTABLE is no different than MAP_SYNC, but 'immutable' goes > a step further to let an a

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

2017-08-11 Thread Dan Williams
On Fri, Aug 11, 2017 at 8:57 PM, Andy Lutomirski wrote: > On Fri, Aug 11, 2017 at 3:26 PM, Dan Williams > wrote: >> On Fri, Aug 11, 2017 at 3:44 AM, Christoph Hellwig wrote: >>> Please explain how this interface allows for any sort of safe userspace >>> DMA. >> >> So this is where I continue to

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

2017-08-11 Thread Andy Lutomirski
On Fri, Aug 11, 2017 at 3:26 PM, Dan Williams wrote: > On Fri, Aug 11, 2017 at 3:44 AM, Christoph Hellwig wrote: >> 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 MA

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

2017-08-11 Thread Dan Williams
On Fri, Aug 11, 2017 at 3:44 AM, Christoph Hellwig wrote: > On Sun, Aug 06, 2017 at 11:51:50AM -0700, Dan Williams wrote: >> Of course it's a useful API. An application already needs to worry >> about the block map, that's why we have fallocate, msync, fiemap >> and... > > Fallocate and msync do n

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

2017-08-11 Thread Christoph Hellwig
On Sun, Aug 06, 2017 at 11:51:50AM -0700, Dan Williams wrote: > Of course it's a useful API. An application already needs to worry > about the block map, that's why we have fallocate, msync, fiemap > and... Fallocate and msync do not expose the block map in any way. Proof: they work just fine ove

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

2017-08-06 Thread Dan Williams
On Sat, Aug 5, 2017 at 2:50 AM, Christoph Hellwig wrote: > On Thu, Aug 03, 2017 at 07:38:11PM -0700, Dan Williams wrote: >> [ adding linux-api to the cover letter for notification, will send the >> full set to linux-api for v3 ] > > Just don't send this crap ever again. All the so called use case

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

2017-08-05 Thread Christoph Hellwig
On Thu, Aug 03, 2017 at 07:38:11PM -0700, Dan Williams wrote: > [ adding linux-api to the cover letter for notification, will send the > full set to linux-api for v3 ] Just don't send this crap ever again. All the so called use cases in the earlier thread were incorrect and highly dangerous. Pro

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

2017-08-03 Thread Dan Williams
[ adding linux-api to the cover letter for notification, will send the full set to linux-api for v3 ] On Thu, Aug 3, 2017 at 7:28 PM, Dan Williams wrote: > Changes since v1 [1]: > * Add IS_IOMAP_IMMUTABLE() checks to xfs ioctl paths that perform block > map changes (xfs_alloc_file_space and xfs