[RFC v2 2/2] pmem: Enable pmem_submit_bio for asynchronous flush

2021-07-26 Thread Pankaj Gupta
From: Pankaj Gupta Return from "pmem_submit_bio" when asynchronous flush is in process in other context. Signed-off-by: Pankaj Gupta --- drivers/nvdimm/pmem.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c

[RFC v2 0/2] virtio-pmem: Asynchronous flush

2021-07-26 Thread Pankaj Gupta
From: Pankaj Gupta Jeff reported preflush order issue with the existing implementation of virtio pmem preflush. Dan suggested[1] to implement asynchronous flush for virtio pmem using work queue as done in md/RAID. This patch series intends to solve the preflush ordering issue and also makes

[RFC v2 1/2] virtio-pmem: Async virtio-pmem flush

2021-07-26 Thread Pankaj Gupta
From: Pankaj Gupta Implement asynchronous flush for virtio pmem using work queue to solve the preflush ordering issue. Also, coalesce the flush requests when a flush is already in process. Signed-off-by: Pankaj Gupta --- drivers/nvdimm/nd_virtio.c | 72

Re: [PATCH 03/27] iomap: mark the iomap argument to iomap_sector const

2021-07-26 Thread Christoph Hellwig
On Mon, Jul 19, 2021 at 09:08:20AM -0700, Darrick J. Wong wrote: > IMHO, constifiying functions is a good way to signal to /programmers/ > that they're not intended to touch the arguments, so Yes, that is the point here. Basically the iomap and iter should be pretty much const, and we almost get

Re: [PATCH 08/27] iomap: add the new iomap_iter model

2021-07-26 Thread Christoph Hellwig
On Tue, Jul 20, 2021 at 07:48:38AM +1000, Dave Chinner wrote: > We should avoid namespace conflicts where function names shadow > object types. iomap_iterate() is fine as the function name - there's > no need for abbreviation here because it's not an overly long name. > This will makes it clearly

Re: [PATCH 08/27] iomap: add the new iomap_iter model

2021-07-26 Thread Christoph Hellwig
On Mon, Jul 19, 2021 at 09:56:00AM -0700, Darrick J. Wong wrote: > Linus previously complained to me about filesystem code (especially > iomap since it was "newer") (ab)using loff_t variables to store the > lengths of byte ranges. It was "loff_t length;" (or so willy > recollects) that tripped

Re: [PATCH 20/27] fsdax: switch dax_iomap_rw to use iomap_iter

2021-07-26 Thread Christoph Hellwig
On Tue, Jul 20, 2021 at 08:10:05AM +1000, Dave Chinner wrote: > At first I wondered "iomi? Strange name, why is this one-off name > used?" and then I realised it's because this function also takes an > struct iov_iter named "iter". > > That's going to cause confusion in the long run - iov_iter

Re: [PATCH 17/27] iomap: switch iomap_seek_hole to use iomap_iter

2021-07-26 Thread Darrick J. Wong
On Mon, Jul 26, 2021 at 10:22:36AM +0200, Christoph Hellwig wrote: > On Mon, Jul 19, 2021 at 10:22:47AM -0700, Darrick J. Wong wrote: > > > -static loff_t > > > -iomap_seek_hole_actor(struct inode *inode, loff_t start, loff_t length, > > > - void *data, struct iomap *iomap, struct

Re: [PATCH 16/27] iomap: switch iomap_bmap to use iomap_iter

2021-07-26 Thread Christoph Hellwig
On Mon, Jul 19, 2021 at 10:05:45AM -0700, Darrick J. Wong wrote: > > bno = 0; > > - ret = iomap_apply(inode, pos, blocksize, 0, ops, , > > - iomap_bmap_actor); > > + while ((ret = iomap_iter(, ops)) > 0) { > > + if (iter.iomap.type != IOMAP_MAPPED) > > +

Re: [PATCH 16/27] iomap: switch iomap_bmap to use iomap_iter

2021-07-26 Thread Darrick J. Wong
On Mon, Jul 26, 2021 at 10:19:42AM +0200, Christoph Hellwig wrote: > On Mon, Jul 19, 2021 at 10:05:45AM -0700, Darrick J. Wong wrote: > > > bno = 0; > > > - ret = iomap_apply(inode, pos, blocksize, 0, ops, , > > > - iomap_bmap_actor); > > > + while ((ret = iomap_iter(, ops)) >