Re: [RFC PATCH 2/2] mm, fs: daxfile, an interface for byte-addressable updates to pmem

2017-06-19 Thread Dave Chinner
ly like this: > > if (metadata is dirty) { > up_write(&mmap_sem); > sync the metadata; > down_write(&mmap_sem); > return 0; /* retry the fault */ > } else { > return whatever success code; > } How do you know that there is depe

Re: [RFC PATCH 2/2] mm, fs: daxfile, an interface for byte-addressable updates to pmem

2017-06-19 Thread Dave Chinner
On Mon, Jun 19, 2017 at 08:22:10AM -0700, Andy Lutomirski wrote: > On Mon, Jun 19, 2017 at 6:21 AM, Dave Chinner wrote: > > On Sat, Jun 17, 2017 at 10:05:45PM -0700, Andy Lutomirski wrote: > >> On Sat, Jun 17, 2017 at 8:15 PM, Dan Williams > >> wrote: > >&g

Re: [RFC PATCH 2/2] mm, fs: daxfile, an interface for byte-addressable updates to pmem

2017-06-20 Thread Dave Chinner
On Mon, Jun 19, 2017 at 10:53:12PM -0700, Andy Lutomirski wrote: > On Mon, Jun 19, 2017 at 5:46 PM, Dave Chinner wrote: > > On Mon, Jun 19, 2017 at 08:22:10AM -0700, Andy Lutomirski wrote: > >> Second: syncing extents. Here's a straw man. Forget the mmap() flag. >

Re: [RFC PATCH 2/2] mm, fs: daxfile, an interface for byte-addressable updates to pmem

2017-06-20 Thread Dave Chinner
n. However, we cannot guarantee that no writes occur to the inode with immutable extent maps (especially as the whole point is to allow userspace writes and commits without the kernel being involved), so extent sharing on immutable extent maps cannot be allowed... Cheers, Dave. -- Dave Chinner da..

Re: [RFC PATCH 2/2] mm, fs: daxfile, an interface for byte-addressable updates to pmem

2017-06-20 Thread Dave Chinner
On Tue, Jun 20, 2017 at 09:14:24AM -0700, Andy Lutomirski wrote: > On Tue, Jun 20, 2017 at 3:11 AM, Dave Chinner wrote: > > On Mon, Jun 19, 2017 at 10:53:12PM -0700, Andy Lutomirski wrote: > >> On Mon, Jun 19, 2017 at 5:46 PM, Dave Chinner wrote: > >> > On Mon, Ju

Re: [RFC PATCH 2/2] mm, fs: daxfile, an interface for byte-addressable updates to pmem

2017-06-20 Thread Dave Chinner
On Tue, Jun 20, 2017 at 06:24:03PM -0700, Darrick J. Wong wrote: > On Wed, Jun 21, 2017 at 09:53:46AM +1000, Dave Chinner wrote: > > On Tue, Jun 20, 2017 at 09:17:36AM -0700, Dan Williams wrote: > > > An immutable-extent DAX-file and a reflink-capable DAX-file are not > &

Re: [RFC PATCH 2/2] mm, fs: daxfile, an interface for byte-addressable updates to pmem

2017-06-21 Thread Dave Chinner
t; > + > > +SYSCALL_DEFINE3(daxctl, const char __user *, path, int, flags, int, align) > > I was /about/ to grouse about this syscall, then realized that maybe it > /is/ useful to be able to check a specific alignment. Maybe not, since > I had something more permanent in mind anyway. In any case, just pass > in an opened fd if this sticks around. We can do all that via fallocate(), too... Cheers, Dave. -- Dave Chinner da...@fromorbit.com ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [RFC PATCH 2/2] mm, fs: daxfile, an interface for byte-addressable updates to pmem

2017-06-21 Thread Dave Chinner
On Tue, Jun 20, 2017 at 10:18:24PM -0700, Andy Lutomirski wrote: > On Tue, Jun 20, 2017 at 6:40 PM, Dave Chinner wrote: > >> A per-inode > >> count of the number of live DAX mappings or of the number of struct > >> file instances that have requested DAX would work

Re: [RFC PATCH 2/2] mm, fs: daxfile, an interface for byte-addressable updates to pmem

2017-06-22 Thread Dave Chinner
On Wed, Jun 21, 2017 at 09:07:57PM -0700, Andy Lutomirski wrote: > On Wed, Jun 21, 2017 at 5:02 PM, Dave Chinner wrote: > > > > You seem to be calling the "fdatasync on every page fault" the > > It's the opposite of fdatasync(). It needs to sync whatever m

Re: [PATCH 2/3] fs, xfs: introduce FALLOC_FL_SEAL_BLOCK_MAP

2017-07-31 Thread Dave Chinner
the file is mapped or not. Perhaps it would be better to start with a man page documenting the desired API? FWIW, the if/else if/else structure could be cleaned up with a simple "goto out_unlock" construct such as: /* don't make immutable if inode is currently mapped */ error = -

Re: [PATCH 3/3] xfs: persist S_IOMAP_IMMUTABLE in di_flags2

2017-07-31 Thread Dave Chinner
code will now fail to allocate/zero anything... IOWs, this flag should be the last thing that is set on the inode once it's been fully allocated and zeroed. Cheers, Dave. -- Dave Chinner da...@fromorbit.com ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [PATCH 1/3] fs, xfs: introduce S_IOMAP_IMMUTABLE

2017-07-31 Thread Dave Chinner
can't imagine why anyone would want to turn a swap file back into a regular > file. > I haven't fully followed DAX, but I'd take your word for it if people want to > be able to remove the flag after. DAX isn't the driver of that funct

Re: [PATCH v2 2/5] fs, xfs: introduce FALLOC_FL_SEAL_BLOCK_MAP

2017-08-04 Thread Dave Chinner
ling, so we've already guaranteed that it won't have holes in it. Cheers, Dave. -- Dave Chinner da...@fromorbit.com ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [PATCH v2 4/5] xfs: introduce XFS_DIFLAG2_IOMAP_IMMUTABLE

2017-08-04 Thread Dave Chinner
allocate(FALLOC_FL_[UN]SEAL_BLOCK_MAP). Support for toggling this > > on-disk state is saved for a later patch. > > > > Cc: Jan Kara > > Cc: Jeff Moyer > > Cc: Christoph Hellwig > > Cc: Ross Zwisler > > Suggested-by: Dave Chinner > > Sugges

Re: [PATCH v2 2/5] fs, xfs: introduce FALLOC_FL_SEAL_BLOCK_MAP

2017-08-04 Thread Dave Chinner
On Fri, Aug 04, 2017 at 04:43:50PM -0700, Dan Williams wrote: > On Fri, Aug 4, 2017 at 4:31 PM, Dave Chinner wrote: > > On Thu, Aug 03, 2017 at 07:28:17PM -0700, Dan Williams wrote: > >> diff --git a/fs/xfs/xfs_bmap_util.c b/fs/xfs/xfs_bmap_util.c > >> index fe0f8f

Re: [PATCH v2 1/5] fs, xfs: introduce S_IOMAP_IMMUTABLE

2017-08-06 Thread Dave Chinner
d rather than discussion and review being shut down because "Christoph shouted nasty words at me but I still don't understand why?". Cheers, Dave. -- Dave Chinner da...@fromorbit.com ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [PATCH v3 2/6] fs, xfs: introduce FALLOC_FL_SEAL_BLOCK_MAP

2017-08-11 Thread Dave Chinner
just one thing - having the seal operation also modify the extent map means it's not useful for the use cases where we need the extent map to remain unmodified Thoughts? Cheers, Dave. -- Dave Chinner da...@fromorbit.com ___ Linux-nvdimm ma

Re: [PATCH v3 6/6] mm, xfs: protect swapfile contents with immutable + unwritten extents

2017-08-11 Thread Dave Chinner
e user downgrades their kernel the swapfile suddenly can not be used by the older kernel. Cheers, Dave. -- Dave Chinner da...@fromorbit.com ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [PATCH v3 2/6] fs, xfs: introduce FALLOC_FL_SEAL_BLOCK_MAP

2017-08-11 Thread Dave Chinner
On Fri, Aug 11, 2017 at 04:42:18PM -0700, Dan Williams wrote: > On Fri, Aug 11, 2017 at 4:27 PM, Dave Chinner wrote: > > On Thu, Aug 10, 2017 at 11:39:28PM -0700, Dan Williams wrote: > >> >From falloc.h: > >> > >> FALLOC_FL_SEAL_BLOCK_MAP is u

Re: [PATCH v3 2/6] fs, xfs: introduce FALLOC_FL_SEAL_BLOCK_MAP

2017-08-11 Thread Dave Chinner
On Fri, Aug 11, 2017 at 07:31:54PM -0700, Darrick J. Wong wrote: > On Sat, Aug 12, 2017 at 10:30:34AM +1000, Dave Chinner wrote: > > On Fri, Aug 11, 2017 at 04:42:18PM -0700, Dan Williams wrote: > > > On Fri, Aug 11, 2017 at 4:27 PM, Dave Chinner wrote: > > > > On T

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

2017-08-13 Thread Dave Chinner
e seal is going to be broken by the filesystem via the break_layouts() interface, and the break then blocks until the app releases the lease? So the seal lifetime is bounded by the lease? Cheers, Dave. -- Dave Chinner da...@fromorbit.com ___ Linux-

Re: [PATCH v4 0/3] MAP_DIRECT and block-map sealed files

2017-08-15 Thread Dave Chinner
d_create() to manage shared access to anonymous tmpfs files and will EINVAL on any fd that points to a real file. Oh, even more problematic: Seals are a property of an inode. [] Furthermore, seals can never be removed, only added. That seems somewhat difficult to reconcile with ho

Re: [PATCH 0/9] add ext4 per-inode DAX flag

2017-09-07 Thread Dave Chinner
then the only hammer we have is Brutus^Wdrop_caches. That's not an option for production machines. Neat idea, but one I'd already thought of and discarded as "not practical from an admin perspective". Cheers, Dave. -- Dave Chinner da...@fromorbit.com ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [PATCH 0/9] add ext4 per-inode DAX flag

2017-09-07 Thread Dave Chinner
On Thu, Sep 07, 2017 at 04:19:00PM -0600, Ross Zwisler wrote: > On Fri, Sep 08, 2017 at 08:12:01AM +1000, Dave Chinner wrote: > > On Thu, Sep 07, 2017 at 03:51:48PM -0600, Ross Zwisler wrote: > > > On Thu, Sep 07, 2017 at 03:26:10PM -0600, Andreas Dilger wrote: > > >

Re: [PATCH] xfs: add regression test for DAX mount option usage

2017-09-11 Thread Dave Chinner
cho 0 > /sys/kernel/debug/tracing/tracing_on So what happens when the user is already tracing the test to find a bug and the test turns all their tracing off? Regardless of this screwing up developer bug triage, do we really want to add a dependency on kernel tracing into the test harness? Cheers, Da

Re: [PATCH] xfs: add regression test for DAX mount option usage

2017-09-12 Thread Dave Chinner
On Tue, Sep 12, 2017 at 09:38:20AM -0600, Ross Zwisler wrote: > On Tue, Sep 12, 2017 at 04:44:11PM +1000, Dave Chinner wrote: > > On Fri, Sep 08, 2017 at 03:21:53PM -0600, Ross Zwisler wrote: > > > This adds a regression test for the following kernel patch: > > > >

Re: [PATCH] xfs: add regression test for DAX mount option usage

2017-09-13 Thread Dave Chinner
On Wed, Sep 13, 2017 at 08:42:15AM -0600, Ross Zwisler wrote: > On Wed, Sep 13, 2017 at 09:47:29AM +1000, Dave Chinner wrote: > > <> > > > I think similar concerns exist with using perf, too > > I though that using perf addressed both concerns? > > &g

Re: [PATCH] xfs: add regression test for DAX mount option usage

2017-09-13 Thread Dave Chinner
On Wed, Sep 13, 2017 at 03:23:39PM -0700, Dan Williams wrote: > On Wed, Sep 13, 2017 at 3:01 PM, Dave Chinner wrote: > > On Wed, Sep 13, 2017 at 08:42:15AM -0600, Ross Zwisler wrote: > >> On Wed, Sep 13, 2017 at 09:47:29AM +1000, Dave Chinner wrote: > >> > >

Re: [PATCH] xfs: add regression test for DAX mount option usage

2017-09-13 Thread Dave Chinner
On Wed, Sep 13, 2017 at 05:28:39PM -0700, Dan Williams wrote: > On Wed, Sep 13, 2017 at 4:34 PM, Dave Chinner wrote: > > /me shrugs > > > > I just don't like the concept of using tracepoints to as a > > definitive diagnostic test for something working because

Re: [fstests PATCH v2] xfs: add regression test for DAX mount option usage

2017-09-16 Thread Dave Chinner
l there, gets updated by chattr > and can be listed with lsattr. > > Actually, that feels like a really bad situation to be in - Christoph & Dave, > should we do more to remove the flag as long as it's not working? i.e. remove > it from the lsattr output and make "ch

Re: [PATCH 3/7] xfs: protect S_DAX transitions in XFS read path

2017-09-25 Thread Dave Chinner
; file_accessed(iocb->ki_filp); > - > - xfs_ilock(ip, XFS_IOLOCK_SHARED); > - ret = iomap_dio_rw(iocb, to, &xfs_iomap_ops, NULL); > - xfs_iunlock(ip, XFS_IOLOCK_SHARED); > - > - return ret; > + return iomap_dio_rw(iocb, to, &xfs_io

Re: [PATCH 4/7] xfs: protect S_DAX transitions in XFS write path

2017-09-25 Thread Dave Chinner
re lots of applications out there that rely on these semantics for performance. CHeers, Dave. -- Dave Chinner da...@fromorbit.com ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [PATCH 1/7] xfs: always use DAX if mount option is used

2017-09-25 Thread Dave Chinner
off/on dax for the things that didn't/did work with DAX correctly so they didn't need multiple filesystems on pmem to segregate the apps that did/didn't work with DAX... Cheers, Dave. -- Dave Chinner da...@fromorbit.com ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [PATCH 7/7] xfs: re-enable XFS per-inode DAX

2017-09-25 Thread Dave Chinner
sem, then we have a deadlock vector. Historically we've avoided any mm/ level interactions under the ILOCK_EXCL because of it's location in the page fault path locking order (e.g. lockdep will go nuts if we take a page fault with the ILOCK held). Hence I'm extremely wary of putting any

Re: [PATCH 1/7] xfs: always use DAX if mount option is used

2017-09-26 Thread Dave Chinner
On Tue, Sep 26, 2017 at 11:35:48AM +0200, Jan Kara wrote: > On Tue 26-09-17 09:38:12, Dave Chinner wrote: > > On Mon, Sep 25, 2017 at 05:13:58PM -0600, Ross Zwisler wrote: > > > Before support for the per-inode DAX flag was disabled the XFS the code > > > had &g

Re: [PATCH 1/7] xfs: always use DAX if mount option is used

2017-09-26 Thread Dave Chinner
e. What I'm advocating is a model DAX gets enabled automatically if the underlying device supports is using whatever the kernel thinks is optimal at the time the access is made, but the user can override/direct behvaiour on a case by case basis via persistent inode flags/xattrs/whatever. Chee

Re: [PATCH v2 0/4] dax: require 'struct page' and other fixups

2017-10-01 Thread Dave Chinner
ave struct pages for pmem, then we're essentially throwing away the ability to support the very systems the hardware vendors were telling us we needed to design the pmem infrastructure for. If that reality has changed, then I'd suggest that we need to determine what the long term replacement for pageless IO on large pmem systems will be before we throw what we have away. Cheers, Dave. -- Dave Chinner da...@fromorbit.com ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [PATCH v2 0/4] dax: require 'struct page' and other fixups

2017-10-01 Thread Dave Chinner
On Sun, Oct 01, 2017 at 02:22:08PM -0700, Dan Williams wrote: > On Sun, Oct 1, 2017 at 2:11 PM, Dave Chinner wrote: > > On Sun, Oct 01, 2017 at 10:58:06AM -0700, Dan Williams wrote: > >> On Sun, Oct 1, 2017 at 12:57 AM, Christoph Hellwig wrote: > >> > While this lo

Re: [PATCH v7 03/12] fs: introduce i_mapdcount

2017-10-08 Thread Dave Chinner
o > mix with the XFS_MMAPLOCK in the fault path. > > Cc: Jan Kara > Cc: Jeff Moyer > Cc: Christoph Hellwig > Cc: Dave Chinner > Cc: "Darrick J. Wong" > Cc: Ross Zwisler > Cc: Jeff Layton > Cc: "J. Bruce Fields" > Signed-off-by: Dan W

Re: [PATCH v7 06/12] xfs: wire up MAP_DIRECT

2017-10-08 Thread Dave Chinner
> kernel invalidated the mapping. > > Cc: Jan Kara > Cc: Arnd Bergmann > Cc: Jeff Moyer > Cc: Christoph Hellwig > Cc: Dave Chinner > Cc: Alexander Viro > Cc: "Darrick J. Wong" > Cc: Ross Zwisler &g

Re: [PATCH v7 09/12] xfs: wire up ->lease_direct()

2017-10-08 Thread Dave Chinner
ted. > > Cc: Jan Kara > Cc: Jeff Moyer > Cc: Christoph Hellwig > Cc: Dave Chinner > Cc: "Darrick J. Wong" > Cc: Ross Zwisler > Cc: Jeff Layton > Cc: "J. Bruce Fields" > Signed-off-by: Dan Williams > --- > fs/xfs/xfs_file.c | 28

Re: [PATCH v7 06/12] xfs: wire up MAP_DIRECT

2017-10-09 Thread Dave Chinner
On Mon, Oct 09, 2017 at 10:08:40AM -0700, Dan Williams wrote: > On Sun, Oct 8, 2017 at 8:40 PM, Dave Chinner wrote: > >> > >> /* > >> * Clear the specified ranges to zero through either the pagecache or DAX. > >> @@ -1008,6 +1018,26 @@ xfs_file_llseek( &g

Re: [PATCH v8 04/14] xfs: prepare xfs_break_layouts() for reuse with MAP_DIRECT

2017-10-10 Thread Dave Chinner
each C file has all the includes they require. Can you move this to all the C files that need layouts and remove the include of the xfs_pnfs.h include from them? Cheers, Dave. -- Dave Chinner da...@fromorbit.com ___ Linux-nvdimm mailing list Linux-nv

Re: [PATCH v8 06/14] xfs: wire up MAP_DIRECT

2017-10-10 Thread Dave Chinner
_has_direct_lease(vma)) { ret = VM_FAULT_SIGBUS; goto out_unlock; } Cheers, Dave. -- Dave Chinner da...@fromorbit.com ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: ffsb job does not exit on xfs 4.14-rc1+

2017-10-11 Thread Dave Chinner
yone bombarding them with subsystem specific issues - that's why we have subsystem specific lists in the first place. If it turns out to be a problem in some other subsystem, we'll add cc's to other subsystem or general lists as appropriate. Cheers, Dave. -- Dave Chinner da...@fromorbit.com ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [PATCH 17/17] xfs: support for synchronous DAX faults

2017-10-24 Thread Dave Chinner
i_fsync_fields & ~XFS_ILOG_TIMESTAMP)) > + iomap->flags |= IOMAP_F_DIRTY; This is the very definition of an inode that is "fdatasync dirty". H, shouldn't this also be set for read faults, too? Cheers, Dave. -- Dave Chinner da...@fromorbit.com ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [fstests PATCH v3] generic: add test for DAX MAP_SYNC support

2017-10-25 Thread Dave Chinner
logwrite tests without needing one-off test programs for them all... > +#! /bin/bash > +# FS QA Test No. 466 > +# > +# Use md_log_writes to verify that MAP_SYNC actually syncs metadata during dm_log_writes? > +# We should see $SCRATCH_MNT/test as having 1MiB in block allocations > +du -sh $SCRATCH_MNT/test | _filter_scratch | _filter_spaces Perhaps stat -c %b $SCRATCH_MNT/test ? Cheers, Dave. -- Dave Chinner da...@fromorbit.com ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [PATCH 17/17] xfs: support for synchronous DAX faults

2017-10-26 Thread Dave Chinner
On Thu, Oct 26, 2017 at 05:48:04PM +0200, Jan Kara wrote: > On Wed 25-10-17 09:23:22, Dave Chinner wrote: > > On Tue, Oct 24, 2017 at 05:24:14PM +0200, Jan Kara wrote: > > > From: Christoph Hellwig > > > > > > Return IOMAP_F_DIRTY from xfs_file_iomap_begin(

Re: [PATCH v3 00/13] dax: fix dma vs truncate and remove 'page-less' support

2017-10-26 Thread Dave Chinner
e refs to be dropped - so some form of busy extents. Am I > > missing something? > > > > No, that's a good summary of what we talked about. However, I did go > back and give the new lock approach a try and was able to get my test > to pass. The new locking is not pretty especially since you need to > drop and reacquire the lock so that get_user_pages() can finish > grabbing all the pages it needs. Here are the two primary patches in > the series, do you think the extent-busy approach would be cleaner? The XFS_DAXDMA $DEITY that patch is so ugly I can't even bring myself to type it. -Dave. -- Dave Chinner da...@fromorbit.com ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [PATCH v3 00/13] dax: fix dma vs truncate and remove 'page-less' support

2017-10-29 Thread Dave Chinner
On Fri, Oct 27, 2017 at 01:42:16PM +0200, Dan Williams wrote: > [replying from my phone, please forgive formatting] > > On Friday, October 27, 2017, Dave Chinner wrote: > > > > > Here are the two primary patches in > > > the series, do you think the exte

Re: [PATCH v3 00/13] dax: fix dma vs truncate and remove 'page-less' support

2017-10-29 Thread Dave Chinner
ree_extent -> xfs_extent_busy_insert(). That's probably the most complex part of the patch. This flag then prevents xfs_extent_busy_reuse() from allowing reuse of the extent. And in xfs_extent_busy_clear(), they need to be treated sort of like discarded extents. On transaction commit callb

Re: [PATCH v3 00/13] dax: fix dma vs truncate and remove 'page-less' support

2017-10-30 Thread Dave Chinner
On Mon, Oct 30, 2017 at 09:38:07AM +0100, Jan Kara wrote: > Hi, > > On Mon 30-10-17 13:00:23, Dave Chinner wrote: > > On Sun, Oct 29, 2017 at 04:46:44PM -0700, Dan Williams wrote: > > > Coming back to this since Dave has made clear that new locking to > > > coord

Re: [PATCH] fs, dax: unify IOMAP_F_DIRTY read vs write handling policy in the dax core

2017-11-13 Thread Dave Chinner
ol xfs_inode_need_fsync(struct xfs_inode *ip, bool datasync) { if (!xfs_ipincount(ip)) return false; if (xfs_inode_clean(ip)) return false; if (datasync && !(ip->i_itemp->ili_fsync_fields & ~XFS_ILOG_TIMESTA

Re: [xfsprogs PATCH v2 1/3] xfs_io: fix compiler warnings in getfsmap code

2017-12-05 Thread Dave Chinner
-off-by: Ross Zwisler > Cc: Darrick J. Wong > Fixes: 3fcab549a234 ("xfs_io: support the new getfsmap ioctl") FYI, I posted a fix for this weeks ago. I think Eric has already picked it up, but it hasn't been pushed out into the for-next branch yet. Cheers, Dave. -- Dave Chinner da...@fromorbit.com ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [xfsprogs PATCH v2 3/3] xfs_io: add a new 'log_writes' command

2017-12-05 Thread Dave Chinner
). This also allows users to insert > multiple marks between different xfs_io commands. > > Signed-off-by: Ross Zwisler > Suggested-by: Dave Chinner having just looked at the xfs_io mess, this new command needs to set "exitcode = 1" on failure. I haven't looked at

Re: [xfsprogs PATCH v2 3/3] xfs_io: add a new 'log_writes' command

2017-12-05 Thread Dave Chinner
On Tue, Dec 05, 2017 at 09:38:13PM -0700, Ross Zwisler wrote: > On Wed, Dec 06, 2017 at 11:29:46AM +1100, Dave Chinner wrote: > > On Tue, Dec 05, 2017 at 04:56:51PM -0700, Ross Zwisler wrote: > > > Add a new 'log_writes' command to xfs_io so that we can add dm-log-w

Re: [PATCH 04/18] dax: Introduce IOMAP_DAX_COW to CoW edges during writes

2019-05-22 Thread Dave Chinner
ad you quote was that using two iomaps looked to be the better, more general approach to solving the iomap read-modify-write issue at hand. Cheers, Dave. -- Dave Chinner da...@fromorbit.com ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [PATCH 04/18] dax: Introduce IOMAP_DAX_COW to CoW edges during writes

2019-05-28 Thread Dave Chinner
des the passed arguments but that does not > > seem to be your concern). So what do you exactly want to do? > > Hi Jan, > > Thanks for pointing out, and I'm sorry for my mistake. It's > ->dax_iomap_rw(), not ->dax_iomap_actor(). > > I want to call the callback function at the end of ->dax_iomap_rw(). > > Like this: > dax_iomap_rw(..., callback) { > > ... > while (...) { > iomap_apply(...); > } > > if (callback != null) { > callback(); > } > return ...; > } Why does this need to be in dax_iomap_rw()? We already do post-dax_iomap_rw() "io-end callbacks" directly in xfs_file_dax_write() to update the file size Cheers, Dave. -- Dave Chinner da...@fromorbit.com ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [PATCH 04/18] dax: Introduce IOMAP_DAX_COW to CoW edges during writes

2019-05-28 Thread Dave Chinner
On Tue, May 28, 2019 at 09:07:19PM -0700, Darrick J. Wong wrote: > On Wed, May 29, 2019 at 12:02:40PM +0800, Shiyang Ruan wrote: > > On 5/29/19 10:47 AM, Dave Chinner wrote: > > > On Wed, May 29, 2019 at 10:01:58AM +0800, Shiyang Ruan wrote: > > > > On 5

Re: [PATCH 04/18] dax: Introduce IOMAP_DAX_COW to CoW edges during writes

2019-05-29 Thread Dave Chinner
On Wed, May 29, 2019 at 03:46:29PM +0200, Jan Kara wrote: > On Wed 29-05-19 14:46:58, Dave Chinner wrote: > > iomap_apply() > > > > ->iomap_begin() > > map old data extent that we copy from > > > > alloca

Re: [PATCH 04/18] dax: Introduce IOMAP_DAX_COW to CoW edges during writes

2019-05-30 Thread Dave Chinner
On Thu, May 30, 2019 at 01:16:05PM +0200, Jan Kara wrote: > On Thu 30-05-19 08:14:45, Dave Chinner wrote: > > On Wed, May 29, 2019 at 03:46:29PM +0200, Jan Kara wrote: > > > On Wed 29-05-19 14:46:58, Dave Chinner wrote: > > > > iomap_apply() > >

Re: [PATCH RFC 00/10] RDMA/FS DAX truncate proposal

2019-06-06 Thread Dave Chinner
held" behaviour to be common across all filesystem/storage types, not be confined to DAX only. i.e. truncate should return ETXTBSY when an unbreakable layout lease is held by an application, not just when "DAX+gup-pinned" is triggered Whatever we de

Re: [PATCH RFC 00/10] RDMA/FS DAX truncate proposal

2019-06-07 Thread Dave Chinner
te elsewhere in this thread I think FL_LAYOUT name still makes > > sense and I'd add there FL_UNBREAKABLE to mark unusal behavior with > > truncate. > > Ok I want to make sure I understand what you and Dave are suggesting. > > Are you suggesting that we have someth

Re: [PATCH RFC 00/10] RDMA/FS DAX truncate proposal

2019-06-12 Thread Dave Chinner
On Wed, Jun 12, 2019 at 05:37:53AM -0700, Matthew Wilcox wrote: > On Sat, Jun 08, 2019 at 10:10:36AM +1000, Dave Chinner wrote: > > On Fri, Jun 07, 2019 at 11:25:35AM -0700, Ira Weiny wrote: > > > Are you suggesting that we have something like this from user space? >

Re: [PATCH RFC 00/10] RDMA/FS DAX truncate proposal

2019-06-12 Thread Dave Chinner
On Wed, Jun 12, 2019 at 04:30:24PM -0700, Ira Weiny wrote: > On Wed, Jun 12, 2019 at 05:37:53AM -0700, Matthew Wilcox wrote: > > On Sat, Jun 08, 2019 at 10:10:36AM +1000, Dave Chinner wrote: > > > On Fri, Jun 07, 2019 at 11:25:35AM -0700, Ira Weiny wrote: > > > > A

Re: [PATCH RFC 00/10] RDMA/FS DAX truncate proposal

2019-06-12 Thread Dave Chinner
On Wed, Jun 12, 2019 at 08:23:20PM -0700, Matthew Wilcox wrote: > On Thu, Jun 13, 2019 at 10:25:55AM +1000, Dave Chinner wrote: > > On Wed, Jun 12, 2019 at 05:37:53AM -0700, Matthew Wilcox wrote: > > > That's rather different from the normal meaning of 'exclusive&#x

Re: [PATCH RFC 00/10] RDMA/FS DAX truncate proposal

2019-06-13 Thread Dave Chinner
On Thu, Jun 13, 2019 at 08:45:30PM -0300, Jason Gunthorpe wrote: > On Thu, Jun 13, 2019 at 02:13:21PM -0700, Ira Weiny wrote: > > On Thu, Jun 13, 2019 at 08:27:55AM -0700, Matthew Wilcox wrote: > > > On Thu, Jun 13, 2019 at 10:25:55AM +1000, Dave Chinner wrote: > > &

Re: [PATCH RFC 00/10] RDMA/FS DAX truncate proposal

2019-06-13 Thread Dave Chinner
On Thu, Jun 13, 2019 at 01:34:05PM -0700, Ira Weiny wrote: > On Thu, Jun 13, 2019 at 10:25:55AM +1000, Dave Chinner wrote: > > On Wed, Jun 12, 2019 at 05:37:53AM -0700, Matthew Wilcox wrote: > > > On Sat, Jun 08, 2019 at 10:10:36AM +1000, Dave Chinner wrote: > > > >

Re: [PATCH RFC 00/10] RDMA/FS DAX truncate proposal

2019-06-13 Thread Dave Chinner
On Thu, Jun 13, 2019 at 07:31:07PM -0700, Matthew Wilcox wrote: > On Fri, Jun 14, 2019 at 12:09:21PM +1000, Dave Chinner wrote: > > If the lease holder modifies the mapping in a way that causes it's > > own internal state to screw up, then that's a bug in the lea

Re: [PATCH RFC 00/10] RDMA/FS DAX truncate proposal

2019-06-13 Thread Dave Chinner
On Thu, Jun 13, 2019 at 01:34:06PM -0700, Ira Weiny wrote: > On Thu, Jun 13, 2019 at 10:55:52AM +1000, Dave Chinner wrote: > > On Wed, Jun 12, 2019 at 04:30:24PM -0700, Ira Weiny wrote: > > > On Wed, Jun 12, 2019 at 05:37:53AM -0700, Matthew Wilcox wrote: > > > > On S

Re: xfs quota test xfs/050 fails with dax mount option and "-d su=2m,sw=1" mkfs option

2019-07-28 Thread Dave Chinner
s what we are seeing here - a 2MB allocation at offset 2MB is > 4096000 bytes, and so it gets EDQUOT at that point IOWs, this looks like a test problem, not a code failure... Cheers, Dave. -- Dave Chinner da...@fromorbit.com ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [RFC PATCH 0/7] xfs: add reflink & dedupe support for fsdax.

2019-08-04 Thread Dave Chinner
e changes which moves the iomap code to the different directory. > > I will build the dax patches on top of that. > > However, we are making a big dependency chain here > Don't worry. It's fine for me. I'll follow your updates. Hi Shiyang, I'll wait

Re: [RFC PATCH v2 08/19] fs/xfs: Fail truncate if page lease can't be broken

2019-08-09 Thread Dave Chinner
a file that is built in. It's only external dependency is on the break_layout() function, and XFS already has other unconditional direct calls to break_layout()... Cheers, Dave. -- Dave Chinner da...@fromorbit.com ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [RFC PATCH v2 07/19] fs/xfs: Teach xfs to use new dax_layout_busy_page()

2019-08-09 Thread Dave Chinner
fset" because we remove all extents beyond EOF on a truncate down. i.e. when we use preallocation, the extent map extends beyond EOF, and layout leases need to be able to extend beyond the current EOF to allow the lease owner to do extending writes, extending truncate, preallocati

Re: [RFC PATCH v2 01/19] fs/locks: Export F_LAYOUT lease to user space

2019-08-09 Thread Dave Chinner
ange the physical layout of the file if it so desires, this will block while F_RDLCK holders are notified and release their leases before the modification will take place. We need to define the semantics we expose to userspace first. Cheers, Dave. -- Dave Chinner da...@fromorbit.com ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [RFC PATCH v2 07/19] fs/xfs: Teach xfs to use new dax_layout_busy_page()

2019-08-14 Thread Dave Chinner
On Mon, Aug 12, 2019 at 11:05:51AM -0700, Ira Weiny wrote: > On Sat, Aug 10, 2019 at 09:30:37AM +1000, Dave Chinner wrote: > > On Fri, Aug 09, 2019 at 03:58:21PM -0700, ira.we...@intel.com wrote: > > > From: Ira Weiny > > > > > > dax_layout_busy_page() c

Re: [RFC PATCH v2 01/19] fs/locks: Export F_LAYOUT lease to user space

2019-08-14 Thread Dave Chinner
On Mon, Aug 12, 2019 at 10:36:26AM -0700, Ira Weiny wrote: > On Sat, Aug 10, 2019 at 09:52:31AM +1000, Dave Chinner wrote: > > On Fri, Aug 09, 2019 at 03:58:15PM -0700, ira.we...@intel.com wrote: > > > + /* > > > + * NOTE on F_LAYOUT lease > > > + * > &

Re: [RFC PATCH v2 01/19] fs/locks: Export F_LAYOUT lease to user space

2019-08-14 Thread Dave Chinner
On Wed, Aug 14, 2019 at 07:21:34AM -0400, Jeff Layton wrote: > On Wed, 2019-08-14 at 18:05 +1000, Dave Chinner wrote: > > On Mon, Aug 12, 2019 at 10:36:26AM -0700, Ira Weiny wrote: > > > On Sat, Aug 10, 2019 at 09:52:31AM +1000, Dave Chinner wrote: > > > > On Fri, Au

Re: [RFC PATCH v2 02/19] fs/locks: Add Exclusive flag to user Layout lease

2019-08-14 Thread Dave Chinner
these exclusive access semantics (i.e other ops fail rather than block waiting for lease recall) and hence the API shouldn't need a new flag to specify them. i.e. the primary difference between F_RDLCK and F_WRLCK layout leases is that the F_RDLCK is a shared, co-operative lease model

Re: [RFC PATCH v2 00/19] RDMA/FS DAX truncate proposal V1,000,002 ; -)

2019-08-16 Thread Dave Chinner
they do not need access to the file any more, and so the lease should be reclaimed at that point. I'm of a mind to make the last close() on a file block if there's an active layout lease to prevent processes from zombie-ing layout leases like this. i.e. you can't close th

Re: [RFC PATCH v2 00/19] RDMA/FS DAX truncate proposal V1,000,002 ; -)

2019-08-19 Thread Dave Chinner
On Mon, Aug 19, 2019 at 08:34:12AM +0200, Jan Kara wrote: > On Sat 17-08-19 12:26:03, Dave Chinner wrote: > > On Fri, Aug 16, 2019 at 12:05:28PM -0700, Ira Weiny wrote: > > > On Thu, Aug 15, 2019 at 03:05:58PM +0200, Jan Kara wrote: > > > > On Wed 14-08-19 11:08:49,

Re: [RFC PATCH v2 00/19] RDMA/FS DAX truncate proposal V1,000,002 ; -)

2019-08-19 Thread Dave Chinner
On Mon, Aug 19, 2019 at 09:38:41AM -0300, Jason Gunthorpe wrote: > On Mon, Aug 19, 2019 at 07:24:09PM +1000, Dave Chinner wrote: > > > So that leaves just the normal close() syscall exit case, where the > > application has full control of the order in which resources are &

Re: [RFC PATCH v2 00/19] RDMA/FS DAX truncate proposal V1,000,002 ; -)

2019-08-19 Thread Dave Chinner
On Mon, Aug 19, 2019 at 05:05:53PM -0700, John Hubbard wrote: > On 8/19/19 2:24 AM, Dave Chinner wrote: > > On Mon, Aug 19, 2019 at 08:34:12AM +0200, Jan Kara wrote: > > > On Sat 17-08-19 12:26:03, Dave Chinner wrote: > > > > On Fri, Aug 16, 2019 at 12:05:28PM -0700,

Re: [RFC PATCH v2 00/19] RDMA/FS DAX truncate proposal V1,000,002 ; -)

2019-08-19 Thread Dave Chinner
On Mon, Aug 19, 2019 at 08:09:33PM -0700, John Hubbard wrote: > On 8/19/19 6:20 PM, Dave Chinner wrote: > > On Mon, Aug 19, 2019 at 05:05:53PM -0700, John Hubbard wrote: > > > On 8/19/19 2:24 AM, Dave Chinner wrote: > > > > On Mon, Aug 19, 2019 at 08:34:12AM +0200, Ja

Re: [RFC PATCH v2 00/19] RDMA/FS DAX truncate proposal V1,000,002 ; -)

2019-08-22 Thread Dave Chinner
On Wed, Aug 21, 2019 at 11:02:00AM -0700, Ira Weiny wrote: > On Tue, Aug 20, 2019 at 08:55:15AM -0300, Jason Gunthorpe wrote: > > On Tue, Aug 20, 2019 at 11:12:10AM +1000, Dave Chinner wrote: > > > On Mon, Aug 19, 2019 at 09:38:41AM -0300, Jason Gunthorpe wrote: > > > &

Re: [RFC PATCH v2 00/19] RDMA/FS DAX truncate proposal V1,000,002 ; -)

2019-08-22 Thread Dave Chinner
ss. All the file layout lease requirements say is that if you are going to pass a resource for which the layout lease guarantees access for to another process, then the destination process already have a valid, active layout lease that covers the range of the pins being passed to it via the RDMA

Re: [RFC PATCH v2 00/19] RDMA/FS DAX truncate proposal V1,000,002 ; -)

2019-08-23 Thread Dave Chinner
On Fri, Aug 23, 2019 at 09:04:29AM -0300, Jason Gunthorpe wrote: > On Fri, Aug 23, 2019 at 01:23:45PM +1000, Dave Chinner wrote: > > > > But the fact that RDMA, and potentially others, can "pass the > > > pins" to other processes is something I spent a lot

Re: [RFC PATCH v2 00/19] RDMA/FS DAX truncate proposal V1,000,002 ; -)

2019-08-23 Thread Dave Chinner
On Fri, Aug 23, 2019 at 10:15:04AM -0700, Ira Weiny wrote: > On Fri, Aug 23, 2019 at 10:59:14AM +1000, Dave Chinner wrote: > > On Wed, Aug 21, 2019 at 11:02:00AM -0700, Ira Weiny wrote: > > > On Tue, Aug 20, 2019 at 08:55:15AM -0300, Jason Gunthorpe wrote: > > > >

Re: [RFC PATCH v2 00/19] RDMA/FS DAX truncate proposal V1,000,002 ; -)

2019-08-25 Thread Dave Chinner
On Fri, Aug 23, 2019 at 10:08:36PM -0700, Ira Weiny wrote: > On Sat, Aug 24, 2019 at 10:11:24AM +1000, Dave Chinner wrote: > > On Fri, Aug 23, 2019 at 09:04:29AM -0300, Jason Gunthorpe wrote: > > > On Fri, Aug 23, 2019 at 01:23:45PM +1000, Dave Chinner wrote: > > >

Re: [PATCH 01/19] dax: remove block device dependencies

2019-08-28 Thread Dave Chinner
ut of the iomap infrastructure, so on those grounds alone I'd suggest this is a dead end approach. Hence I think that if the dax device needs a physical offset from the start of the block device the filesystem sits on, it should be set up at dax device instantiation time and so the filesystem/bdev never needs to be queried again for this information. Cheers, Dave. -- Dave Chinner da...@fromorbit.com ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [RFC PATCH v2 00/19] RDMA/FS DAX truncate proposal V1,000,002 ; -)

2019-09-02 Thread Dave Chinner
On Wed, Aug 28, 2019 at 07:02:31PM -0700, Ira Weiny wrote: > On Mon, Aug 26, 2019 at 03:55:10PM +1000, Dave Chinner wrote: > > On Fri, Aug 23, 2019 at 10:08:36PM -0700, Ira Weiny wrote: > > > On Sat, Aug 24, 2019 at 10:11:24AM +1000, Dave Chinner wrote: > > > > On F

Re: Lease semantic proposal

2019-09-23 Thread Dave Chinner
K can only be used for O_RDONLY because write() requires breaking of leases - WRLCK is open to abuse simply by not using a layout lease to do a "no change" layout modification - RDLCK|F_UNBREAK is entirely unusable - WRLCK|F_UNBREAK will be what every application uses because everything else either doesn't work or is too easy to abuse. Cheers, Dave. -- Dave Chinner da...@fromorbit.com ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: Lease semantic proposal

2019-09-30 Thread Dave Chinner
On Wed, Sep 25, 2019 at 04:46:03PM -0700, Ira Weiny wrote: > On Tue, Sep 24, 2019 at 08:26:20AM +1000, Dave Chinner wrote: > > Hence, AFIACT, the above definition of a F_RDLCK|F_LAYOUT lease > > doesn't appear to be compatible with the semantics required by > > exist

Re: [RFC PATCH 0/7] xfs: add reflink & dedupe support for fsdax.

2019-10-10 Thread Dave Chinner
in it's buffer cache so it can find the cached page to link new reflink copies to the same page... ISTR a couple of other solutions were thrown around, but I don't think anyone came up with a simple solution... Cheers, Dave. -- Dave Chinner da...@fromorbit.com ___ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-le...@lists.01.org

Re: Lease semantic proposal

2019-10-10 Thread Dave Chinner
On Tue, Oct 01, 2019 at 02:01:57PM -0700, Ira Weiny wrote: > On Mon, Sep 30, 2019 at 06:42:33PM +1000, Dave Chinner wrote: > > On Wed, Sep 25, 2019 at 04:46:03PM -0700, Ira Weiny wrote: > > > On Tue, Sep 24, 2019 at 08:26:20AM +1000, Dave Chinner wrote: > > > > Hence

Re: [RFC PATCH v2 0/7] xfs: reflink & dedupe for fsdax (read/write path).

2019-11-14 Thread Dave Chinner
and we don't have to worry about subtly breaking random filesystems. Hence I'd suggest we sort out a solution for DAX first, then worry about page cache stuff. The shared page cache for reflink feature is not a show stopper - multiple references for DAX is a show stopper. Let's

Re: [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-23 Thread Dave Chinner
any bad blocks in the range > being zeroed, then they all should be cleared (and hence all I/O should > be aligned) otherwise error is returned. If yes, I could make that > change. > > Downside of current interface is that it will clear as many blocks as > possible in the given range and leave starting and end blocks poisoned > (if it is unaligned) and not return error. That means a reader will > get error on these blocks again and they will have to try to clear it > again. Which is solved by having partial page writes always EIO on poisoned memory. Cheers, Dave. -- Dave Chinner da...@fromorbit.com ___ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-le...@lists.01.org

Re: [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-26 Thread Dave Chinner
On Mon, Feb 24, 2020 at 10:38:44AM -0500, Vivek Goyal wrote: > On Mon, Feb 24, 2020 at 10:03:30AM +1100, Dave Chinner wrote: > > [..] > > > > > Hi Jeff, > > > > > > > > > > New dax zeroing interface (dax_zero_page_range()) can technically

Re: [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-26 Thread Dave Chinner
cation written since 1999. It predates unwritten extents (1998) and I don't think any native linux applications have ever used it. A newly written DAX aware application would almost certainly not use this interface. IOWs, I wouldn't use it as justification for some special case behaviour; I'm more likely to say "rip that ancient ioctl out" than to jump through hoops because it's implementation behaviour. Cheers, Dave. -- Dave Chinner da...@fromorbit.com ___ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-le...@lists.01.org

Re: [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-27 Thread Dave Chinner
On Wed, Feb 26, 2020 at 08:19:37PM -0800, Dan Williams wrote: > On Wed, Feb 26, 2020 at 7:03 PM Dave Chinner wrote: > > On Mon, Feb 24, 2020 at 10:38:44AM -0500, Vivek Goyal wrote: > > > Anyway, partial page truncate can't ensure that data in rest of the page >

  1   2   3   >