[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1906905099.29162562.1557988100975.JavaMail.zimbra@redhat.com>
Date: Thu, 16 May 2019 02:28:20 -0400 (EDT)
From: Pankaj Gupta <pagupta@...hat.com>
To: Dan Williams <dan.j.williams@...el.com>
Cc: linux-nvdimm <linux-nvdimm@...ts.01.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
virtualization@...ts.linux-foundation.org,
KVM list <kvm@...r.kernel.org>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
Linux ACPI <linux-acpi@...r.kernel.org>,
Qemu Developers <qemu-devel@...gnu.org>,
linux-ext4 <linux-ext4@...r.kernel.org>,
linux-xfs <linux-xfs@...r.kernel.org>,
Ross Zwisler <zwisler@...nel.org>,
Vishal L Verma <vishal.l.verma@...el.com>,
Dave Jiang <dave.jiang@...el.com>,
"Michael S. Tsirkin" <mst@...hat.com>,
Jason Wang <jasowang@...hat.com>,
Matthew Wilcox <willy@...radead.org>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Christoph Hellwig <hch@...radead.org>,
Len Brown <lenb@...nel.org>, Jan Kara <jack@...e.cz>,
Theodore Ts'o <tytso@....edu>,
Andreas Dilger <adilger.kernel@...ger.ca>,
"Darrick J. Wong" <darrick.wong@...cle.com>,
lcapitulino@...hat.com, Kevin Wolf <kwolf@...hat.com>,
Igor Mammedov <imammedo@...hat.com>,
jmoyer <jmoyer@...hat.com>,
Nitesh Narayan Lal <nilal@...hat.com>,
Rik van Riel <riel@...riel.com>,
Stefan Hajnoczi <stefanha@...hat.com>,
Andrea Arcangeli <aarcange@...hat.com>,
David Hildenbrand <david@...hat.com>,
david <david@...morbit.com>, cohuck@...hat.com,
Xiao Guangrong <xiaoguangrong.eric@...il.com>,
Paolo Bonzini <pbonzini@...hat.com>,
Adam Borowski <kilobyte@...band.pl>,
yuval shaia <yuval.shaia@...cle.com>, jstaron@...gle.com
Subject: Re: [PATCH v9 1/7] libnvdimm: nd_region flush callback support
> >
> > This patch adds functionality to perform flush from guest
> > to host over VIRTIO. We are registering a callback based
> > on 'nd_region' type. virtio_pmem driver requires this special
> > flush function. For rest of the region types we are registering
> > existing flush function. Report error returned by host fsync
> > failure to userspace.
> >
> > Signed-off-by: Pankaj Gupta <pagupta@...hat.com>
> > ---
> > drivers/acpi/nfit/core.c | 4 ++--
> > drivers/nvdimm/claim.c | 6 ++++--
> > drivers/nvdimm/nd.h | 1 +
> > drivers/nvdimm/pmem.c | 13 ++++++++-----
> > drivers/nvdimm/region_devs.c | 26 ++++++++++++++++++++++++--
> > include/linux/libnvdimm.h | 8 +++++++-
> > 6 files changed, 46 insertions(+), 12 deletions(-)
> >
> > diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c
> > index 5a389a4f4f65..08dde76cf459 100644
> > --- a/drivers/acpi/nfit/core.c
> > +++ b/drivers/acpi/nfit/core.c
> > @@ -2434,7 +2434,7 @@ static void write_blk_ctl(struct nfit_blk *nfit_blk,
> > unsigned int bw,
> > offset = to_interleave_offset(offset, mmio);
> >
> > writeq(cmd, mmio->addr.base + offset);
> > - nvdimm_flush(nfit_blk->nd_region);
> > + nvdimm_flush(nfit_blk->nd_region, NULL);
> >
> > if (nfit_blk->dimm_flags & NFIT_BLK_DCR_LATCH)
> > readq(mmio->addr.base + offset);
> > @@ -2483,7 +2483,7 @@ static int acpi_nfit_blk_single_io(struct nfit_blk
> > *nfit_blk,
> > }
> >
> > if (rw)
> > - nvdimm_flush(nfit_blk->nd_region);
> > + nvdimm_flush(nfit_blk->nd_region, NULL);
> >
> > rc = read_blk_stat(nfit_blk, lane) ? -EIO : 0;
> > return rc;
> > diff --git a/drivers/nvdimm/claim.c b/drivers/nvdimm/claim.c
> > index fb667bf469c7..13510bae1e6f 100644
> > --- a/drivers/nvdimm/claim.c
> > +++ b/drivers/nvdimm/claim.c
> > @@ -263,7 +263,7 @@ static int nsio_rw_bytes(struct nd_namespace_common
> > *ndns,
> > struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev);
> > unsigned int sz_align = ALIGN(size + (offset & (512 - 1)), 512);
> > sector_t sector = offset >> 9;
> > - int rc = 0;
> > + int rc = 0, ret = 0;
> >
> > if (unlikely(!size))
> > return 0;
> > @@ -301,7 +301,9 @@ static int nsio_rw_bytes(struct nd_namespace_common
> > *ndns,
> > }
> >
> > memcpy_flushcache(nsio->addr + offset, buf, size);
> > - nvdimm_flush(to_nd_region(ndns->dev.parent));
> > + ret = nvdimm_flush(to_nd_region(ndns->dev.parent), NULL);
> > + if (ret)
> > + rc = ret;
> >
> > return rc;
> > }
> > diff --git a/drivers/nvdimm/nd.h b/drivers/nvdimm/nd.h
> > index a5ac3b240293..0c74d2428bd7 100644
> > --- a/drivers/nvdimm/nd.h
> > +++ b/drivers/nvdimm/nd.h
> > @@ -159,6 +159,7 @@ struct nd_region {
> > struct badblocks bb;
> > struct nd_interleave_set *nd_set;
> > struct nd_percpu_lane __percpu *lane;
> > + int (*flush)(struct nd_region *nd_region, struct bio *bio);
>
> So this triggers:
>
> In file included from drivers/nvdimm/e820.c:7:
> ./include/linux/libnvdimm.h:140:51: warning: ‘struct bio’ declared
> inside parameter list will not be visible outside of this definition
> or declaration
> int (*flush)(struct nd_region *nd_region, struct bio *bio);
> ^~~
Sorry! for this. Fixed now.
> I was already feeling uneasy about trying to squeeze this into v5.2,
> but this warning and the continued drip of comments leads me to
> conclude that this driver would do well to wait one more development
> cycle. Lets close out the final fixups and let this driver soak in
> -next. Then for the v5.3 cycle I'll redouble my efforts towards the
> goal of closing patch acceptance at the -rc6 / -rc7 development
> milestone.
o.k. Will wait for Mike's ACK on device mapper patch and send the v10
with final fix-ups. Thank you for your help.
Best regards,
Pankaj
>
Powered by blists - more mailing lists