eed to check it and remove the iommu parameter everywhere.
Yes, that's much better than exposing the iommu ops to a place that
should not care about them:
Acked-by: Christoph Hellwig
___
Virtualization mailing list
Virtualization@lists.linux-foundati
On Wed, Oct 11, 2023 at 10:57:09AM -0300, Jason Gunthorpe wrote:
> > Independent of my above points on the doubts on VF-controlled live
> > migration for PCe device I absolutely agree with your that the Linux
> > abstraction and user interface should be VF based. Which further
> > reinforeces my
On Wed, Oct 11, 2023 at 02:43:37AM -0400, Michael S. Tsirkin wrote:
> > Btw, what is that intel thing everyone is talking about? And why
> > would the virtio core support vendor specific behavior like that?
>
> It's not a thing it's Zhu Lingshan :) intel is just one of the vendors
> that
On Tue, Oct 10, 2023 at 10:10:31AM -0300, Jason Gunthorpe wrote:
> We've talked around ideas like allowing the VF config space to do some
> of the work. For simple devices we could get away with 1 VF config
> space register. (VF config space is owned by the hypervisor, not the
> guest)
Which
On Tue, Oct 10, 2023 at 12:59:37PM -0300, Jason Gunthorpe wrote:
> On Tue, Oct 10, 2023 at 11:14:56AM -0400, Michael S. Tsirkin wrote:
>
> > I suggest 3 but call it on the VF. commands will switch to PF
> > internally as needed. For example, intel might be interested in exposing
> > admin
On Tue, Oct 10, 2023 at 06:43:32PM +0300, Yishai Hadas wrote:
> > I suggest 3 but call it on the VF. commands will switch to PF
> > internally as needed. For example, intel might be interested in exposing
> > admin commands through a memory BAR of VF itself.
> >
> The driver who owns the VF is
On Thu, Oct 05, 2023 at 08:10:04AM -0300, Jason Gunthorpe wrote:
> > But for all the augmented vfio use cases it doesn't, for them the
> > augmented vfio functionality is an integral part of the core driver.
> > That is true for nvme, virtio and I'd argue mlx5 as well.
>
> I don't agree with
On Mon, Oct 02, 2023 at 12:13:20PM -0300, Jason Gunthorpe wrote:
> ??? This patch series is an implementation of changes that OASIS
> approved.
I think you are fundamentally missing my point. This is not about
who publish a spec, but how we struture Linux code.
And the problem is that we trea
On Tue, Sep 26, 2023 at 07:41:44AM -0400, Michael S. Tsirkin wrote:
>
> Except, there's no reasonable way for virtio to know what is done with
> the device then. You are not using just 2 symbols at all, instead you
> are using the rich vq API which was explicitly designed for the driver
> running
On Thu, Jul 20, 2023 at 01:21:07PM -0400, Michael S. Tsirkin wrote:
> Well I think we can add wrappers like virtio_dma_sync and so on.
> There are NOP for non-dma so passing the dma device is harmless.
Yes, please.
___
Virtualization mailing list
On Thu, Jul 20, 2023 at 03:41:56PM +0800, Jason Wang wrote:
> > Did you actually check that it works though?
> > Looks like with swiotlb you need to synch to trigger a copy
> > before unmap, and I don't see where it's done in the current
> > patch.
>
> And this is needed for XDP_REDIRECT as well.
On Thu, Jul 20, 2023 at 02:45:14PM +0800, Xuan Zhuo wrote:
> virtqueue_dma_dev() return the device that working with the DMA APIs.
> Then that can be used like other devices. So what is the problem.
>
> I always think the code path without the DMA APIs is the trouble for you.
Because we now
On Thu, Jul 13, 2023 at 10:51:59AM -0400, Michael S. Tsirkin wrote:
> On Thu, Jul 13, 2023 at 04:15:16AM -0700, Christoph Hellwig wrote:
> > On Mon, Jul 10, 2023 at 11:42:32AM +0800, Xuan Zhuo wrote:
> > > Added virtqueue_dma_dev() to get DMA device for virtio. Then the
>
Hi Jason,
can you please resend your reply with proper quoting? I had to give
up after multiple pages of scrolling without finding anything that
you added to the full quote.
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
On Thu, Jul 13, 2023 at 10:47:23AM -0400, Michael S. Tsirkin wrote:
> There are a gazillion virtio drivers and most of them just use the
> virtio API, without bothering with these micro-optimizations. virtio
> already tracks addresses so mapping/unmapping them for DMA is easier
> done in the
On Mon, Jul 10, 2023 at 11:42:32AM +0800, Xuan Zhuo wrote:
> Added virtqueue_dma_dev() to get DMA device for virtio. Then the
> caller can do dma operation in advance. The purpose is to keep memory
> mapped across multiple add/get buf operations.
This is just poking holes into the abstraction..
On Mon, Jul 10, 2023 at 11:42:30AM +0800, Xuan Zhuo wrote:
> This helper allows the driver change the dma mode to premapped mode.
> Under the premapped mode, the virtio core do not do dma mapping
> internally.
>
> This just work when the use_dma_api is true. If the use_dma_api is false,
> the dma
On Wed, Jul 12, 2023 at 10:28:00AM +0200, Stefano Garzarella wrote:
> The problem is that the SCSI stack does not send this command, so we
> should do it in the driver. In fact we do it for
> VIRTIO_SCSI_EVT_RESET_RESCAN (hotplug), but not for
> VIRTIO_SCSI_EVT_RESET_REMOVED (hotunplug).
No, you
Looks good:
Reviewed-by: Christoph Hellwig
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Please avoid the overly long line. With that fixe this looks good
to me.
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
I think the proper minimal fix is to pass in a REQ_WRITE in addition to
REQ_PREFLUSH. We can than have a discussion on the merits of this
weird async pmem flush scheme separately.
___
Virtualization mailing list
On Mon, Jun 05, 2023 at 09:58:21AM +0800, Xuan Zhuo wrote:
> On Fri, 2 Jun 2023 23:29:02 -0700, Jakub Kicinski wrote:
> > On Fri, 2 Jun 2023 17:21:56 +0800 Xuan Zhuo wrote:
> > > Thanks for the help from Christoph.
> >
> > That said you haven't CCed him on the series, isn't the general rule to
>
On Wed, May 17, 2023 at 10:22:41AM +0800, Xuan Zhuo wrote:
> virtuque_add() adds parameter premapped.
Well, I can see that. But why?
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
On Wed, May 17, 2023 at 10:22:38AM +0800, Xuan Zhuo wrote:
> -static dma_addr_t vring_map_one_sg(const struct vring_virtqueue *vq,
> -struct scatterlist *sg,
> -enum dma_data_direction direction)
> +static int vring_map_one_sg(const
On Wed, May 17, 2023 at 03:43:03PM +0800, zhenwei pi wrote:
> I have a plan to introduce 'Virtio Over Fabrics'(TCP) as Virtio
> transport, as mentioned in cover letter of this series:
> 3 weeks ago, I posted a proposal 'Virtio Over Fabrics':
>
On Wed, May 17, 2023 at 10:54:23AM +0800, zhenwei pi wrote:
> All the vring based virtqueue methods could be abstratct in theory,
> MST suggested that add/get bufs and kick functions are quite perfmance
> sensitive, so export these functions from virtio_ring.ko, drivers
> still call them in a fast
ameter from GUP altogether.
>
> Acked-by: David Hildenbrand
> Acked-by: Dennis Dalessandro (for
> qib)
> Signed-off-by: Lorenzo Stoakes
Looks good:
Reviewed-by: Christoph Hellwig
___
Virtualization mailing list
Virtualization@li
As said before, please don't try to do weird runtime checks based
on the scatterlist. What you have works for now, but there are
plans to repalce the page + offset tuple in the scatterlist with
just a phys_addr_t. And with that your "clever" scheme will break
instantly.
On Thu, Apr 20, 2023 at 06:42:17PM +0200, Alexander Lobakin wrote:
> When there's no recycling of pages, then yes. And since recycling is
> done asynchronously, sometimes new allocations happen either way.
> Anyways, that was roughly a couple years ago right when you introduced
>
> +static dma_addr_t vring_sg_address(struct scatterlist *sg)
> +{
> + if (sg->dma_address)
> + return sg->dma_address;
0 is a perfectly valid DMA address. So I have no idea how this is
even supposed to work.
___
Virtualization mailing
On Tue, Apr 25, 2023 at 04:12:05AM -0400, Michael S. Tsirkin wrote:
> In theory, absolutely. In practice modern virtio devices are ok,
> the reason we are stuck supporting old legacy ones is because legacy
> devices are needed to run old guests. And then people turn
> around and run a new guest on
On Thu, Apr 20, 2023 at 05:11:48PM +0800, Xuan Zhuo wrote:
> I know that the current design of DMA API only supports some physical
> hardware,
> but can it be modified or expanded?
I think the important point is that for some cases there is no need
to dma map at all, and upper layers should be
On Thu, Apr 20, 2023 at 03:59:39PM +0200, Alexander Lobakin wrote:
> Hmm, currently almost all Ethernet drivers map Rx pages once and then
> just recycle them, keeping the original DMA mapping. Which means pages
> can have the same first mapping for very long time, often even for the
> lifetime of
On Wed, Apr 19, 2023 at 09:45:06AM -0700, Jakub Kicinski wrote:
> > Can you explain what the actual use case is?
> >
> > From the original patchset I suspect it is dma mapping something very
> > long term and then maybe doing syncs on it as needed?
>
> In this case yes, pinned user memory, it
On Wed, Apr 19, 2023 at 03:14:48PM +0200, Alexander Lobakin wrote:
> >>> dma addresses and thus dma mappings are completely driver specific.
> >>> Upper layers have no business looking at them.
>
> Here it's not an "upper layer". XSk core doesn't look at them or pass
> them between several
On Wed, Apr 19, 2023 at 03:22:39PM +0200, Alexander Lobakin wrote:
> If DMA syncs are not needed on your x86_64 DMA-coherent system, it
> doesn't mean we all don't need it.
If the DMA isn't actually a DMA (as in the virtio case, or other
cases that instead have to do their own dma mapping at much
On Mon, Apr 17, 2023 at 11:19:47PM -0700, Jakub Kicinski wrote:
> > You can't just do dma mapping outside the driver, because there are
> > drivers that do not require DMA mapping at all. virtio is an example,
> > but all the classic s390 drivers and some other odd virtualization
> > ones are
On Tue, Apr 18, 2023 at 02:18:52PM +0800, Xuan Zhuo wrote:
> Sorry, rethink about this, I think we maybe misunderstand something.
>
> First of all, let me give you a brief introduce of virtio device and pci
> device.
> If I make mistake, please point out.
>
>
> First, when one virtio pci
On Mon, Apr 17, 2023 at 07:54:00PM -0700, Jakub Kicinski wrote:
> AF_XDP, io_uring, and increasing number of pinned memory / zero copy
> implementations need to do DMA mapping outside the drivers.
You can't just do dma mapping outside the driver, because there are
drivers that do not require DMA
On Mon, Apr 17, 2023 at 11:27:50AM +0800, Xuan Zhuo wrote:
> The purpose of this patch is to allow driver pass the own dma_ops to
> xsk.
Drivers have no business passing around dma_ops, or even knowing about
them.
___
Virtualization mailing list
On Wed, Apr 12, 2023 at 10:03:46AM +0800, Xuan Zhuo wrote:
> We discusses this question last at [1]. We planned to pass one device to xsk.
> Then xsk can use the DMA API on this device. The device can be one hw
> device(such as PCI, mmio) or virtio device. If it is one hw device, no
> problem.
On Tue, Apr 11, 2023 at 03:12:13PM +0800, Xuan Zhuo wrote:
>
> Hi Jason
>
> Can we force virtio core to use dma api without VIRTIO_F_ACCESS_PLATFORM?
So in your last mail you asked for it to be the other way around?
But, no you can't do this either unless you control the platform as
in the Xen
On Tue, Apr 11, 2023 at 03:23:43PM +0800, Xuan Zhuo wrote:
> > If a direct map or not is used is a decision done by the platform code,
> > often based on firmware tables. You can't just override that.
>
>
> Can Virtio Device set its own dma_ops? It is a device on the virtual bus. It
> sets its
On Tue, Apr 11, 2023 at 02:28:00PM +0800, Xuan Zhuo wrote:
> > That is just completely broken, virtio or not. Highlevel code like
> > sockets must never do dma mappings themselves.
>
> AF_XDP provides some API for net driver. This API will do dma map or dma sync.
>
> cc AF_XDP maintainers.
So
On Tue, Apr 11, 2023 at 02:33:29PM +0800, Xuan Zhuo wrote:
> Do you mean my idea is wrong, right?
>
> Can you explain it? Why can't we support a device that uses only dirct map?
If a direct map or not is used is a decision done by the platform code,
often based on firmware tables. You can't
> > Can you please explain what you're even trying to do?
>
> I want to force a device use direct dma map.
You fundamentally can't do that. It can't work.
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
On Tue, Apr 11, 2023 at 02:11:17PM +0800, Xuan Zhuo wrote:
> NO, all dma maping is done inside xdp socket. That is done
> when setup.
That is just completely broken, virtio or not. Highlevel code like
sockets must never do dma mappings themselves.
___
On Tue, Apr 11, 2023 at 12:54:46PM +0800, Jason Wang wrote:
> Ok, just to clarify, I meant there could be a case where the virtqueue
> is emulated by software, in this case we need check whether the
> virtqueue has a dma device or not in vring_use_dma_api(). If not we
> need return false.
Well,
On Tue, Apr 11, 2023 at 11:56:47AM +0800, Jason Wang wrote:
> > The DMA device for virtio_pci is the underlying PCI device, always.
> > !VIRTIO_F_ACCESS_PLATFORM means there is no dma device at all. Because
> > of all these things you can't just expose a pointer to the dma_device
> > as that is
On Tue, Apr 11, 2023 at 10:09:40AM +0800, Jason Wang wrote:
> We want to support AF_XDP for virtio-net. It means AF_XDP needs to
> know the dma device to perform DMA mapping. So we introduce a helper
> to expose the dma dev of the virtio device.
The whole virtio architecture is based around the
On Tue, Apr 11, 2023 at 09:56:19AM +0800, Xuan Zhuo wrote:
> Do you mean we should not change the dma_ops from the outside of the core
> kernel/dma/?
Basically, yes. That plus probing for the IOMMU drivers.
> How about adding one new "dma_direct" to struct devive?
Why would we?
Can you please
On Mon, Apr 10, 2023 at 01:14:13PM +0800, Jason Wang wrote:
> > But rethink, this is unreliable. Some platforms have returned their own ops,
> > including X86.
> >
> > Because the priority of dev->dma_ops is higher than get_arch_dma_ops(), we
> > should not let dev->dma_ops be null. We should
What is "migrate to the latest patchset version" even supposed to mean?
I don't think that belongs into a kernel commit description.
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
On Sat, Feb 18, 2023 at 08:53:56AM +0800, Li zeming wrote:
> The inq_result pointer must be allocated successfully; otherwise,
> subsequent function execution may crash.
The error needs to be handled. Or in fact this LLDD needs to stop
breaking layering and issuing it's own INQUIRY commands.
Use the bvec_set_page helper to initialize bvecs.
Signed-off-by: Christoph Hellwig
---
mm/page_io.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/mm/page_io.c b/mm/page_io.c
index 3a5f921b932e82..233f6e6eb1c508 100644
--- a/mm/page_io.c
+++ b/mm/page_io.c
@@ -318,9
Use the bvec_set_page helper to initialize bvecs.
Signed-off-by: Christoph Hellwig
Reviewed-by: Ilya Dryomov
---
net/ceph/messenger_v1.c | 7 ++-
net/ceph/messenger_v2.c | 28 +++-
2 files changed, 13 insertions(+), 22 deletions(-)
diff --git a/net/ceph
Use the bvec_set_page helper to initialize a bvec.
Signed-off-by: Christoph Hellwig
Acked-by: Jason Wang
---
drivers/vhost/vringh.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/vhost/vringh.c b/drivers/vhost/vringh.c
index 33eb941fcf1546..a1e27da544814a
Use the bvec_set_page helper to initialize bvecs.
Signed-off-by: Christoph Hellwig
Acked-by: Chuck Lever
Acked-by: Trond Myklebust
---
net/sunrpc/svcsock.c | 7 ++-
net/sunrpc/xdr.c | 5 ++---
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/net/sunrpc/svcsock.c b/net
Use the bvec_set_page helper to initialize bvecs.
Signed-off-by: Christoph Hellwig
Acked-by: Trond Myklebust
---
fs/nfs/fscache.c | 16 ++--
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/fs/nfs/fscache.c b/fs/nfs/fscache.c
index e731c00a9fcbc3..ea5f2976dfaba4
Use the bvec_set_page helper to initialize a bvec.
Signed-off-by: Christoph Hellwig
Reviewed-by: Chaitanya Kulkarni
---
io_uring/rsrc.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/io_uring/rsrc.c b/io_uring/rsrc.c
index 18de10c68a151b..a59fc02de5983c 100644
Use the bvec_set_page helper to initialize a bvec.
Signed-off-by: Christoph Hellwig
Acked-by: David Howells
---
net/rxrpc/rxperf.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/net/rxrpc/rxperf.c b/net/rxrpc/rxperf.c
index 16dcabb71ebe16..4a2e90015ca72c 100644
Use the bvec_set_page helper to initialize a bvec.
Signed-off-by: Christoph Hellwig
---
fs/coredump.c | 7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/fs/coredump.c b/fs/coredump.c
index de78bde2991beb..0a6873a9c4d0cd 100644
--- a/fs/coredump.c
+++ b/fs/coredump.c
Use the bvec_set_page helper to initialize a bvec.
Signed-off-by: Christoph Hellwig
---
fs/splice.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/fs/splice.c b/fs/splice.c
index 5969b7a1d353a8..87d9b19349de63 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -675,9 +675,8
Use the bvec_set_page and bvec_set_folio helpers to initialize bvecs.
Signed-off-by: Christoph Hellwig
---
fs/orangefs/inode.c | 22 +++---
1 file changed, 7 insertions(+), 15 deletions(-)
diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c
index 4df56089438664
Use the bvec_set_page helper to initialize bvecs.
Signed-off-by: Christoph Hellwig
Acked-by: Paulo Alcantara (SUSE)
---
fs/cifs/connect.c | 5 +++--
fs/cifs/fscache.c | 16 ++--
fs/cifs/misc.c| 5 ++---
fs/cifs/smb2ops.c | 6 +++---
4 files changed, 14 insertions(+), 18
Use the bvec_set_page helper to initialize a bvec.
Signed-off-by: Christoph Hellwig
---
fs/ceph/file.c | 12
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index 764598e1efd91f..90b2aa7963bf29 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph
Use the bvec_set_folio helper to initialize a bvec.
Signed-off-by: Christoph Hellwig
Acked-by: David Howells
---
fs/afs/write.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/fs/afs/write.c b/fs/afs/write.c
index 19df10d63323d8..2d17891b618e6e 100644
--- a/fs/afs
Use the bvec_set_page helper to initialize bvecs.
Signed-off-by: Christoph Hellwig
Reviewed-by: Sergey Senozhatsky
Reviewed-by: Johannes Thumshirn
---
drivers/block/zram/zram_drv.c | 15 ---
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/drivers/block/zram
Use the bvec_set_virt helper to initialize the special_vec.
Signed-off-by: Christoph Hellwig
Reviewed-by: Chaitanya Kulkarni
Acked-by: Michael S. Tsirkin
Acked-by: Jason Wang
---
drivers/block/virtio_blk.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/block
Use the bvec_set_virt helper to initialize the special_vec.
Signed-off-by: Christoph Hellwig
Reviewed-by: Chaitanya Kulkarni
Reviewed-by: Johannes Thumshirn
---
drivers/nvme/host/core.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/nvme/host/core.c b/drivers
Use the bvec_set_page helper to initialize the copy up bvec.
Signed-off-by: Christoph Hellwig
Reviewed-by: Ilya Dryomov
---
drivers/block/rbd.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 04453f4a319cb4
Use the bvec_set_page helper to initialize bvecs.
Signed-off-by: Christoph Hellwig
Reviewed-by: Chaitanya Kulkarni
---
drivers/target/target_core_file.c | 18 ++
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/drivers/target/target_core_file.c
b/drivers/target
Add a helper to initialize a bvec based of a page pointer. This will help
removing various open code bvec initializations.
Signed-off-by: Christoph Hellwig
Reviewed-by: Chaitanya Kulkarni
Reviewed-by: Johannes Thumshirn
---
block/bio-integrity.c | 7 +--
block/bio.c | 12
Use the bvec_set_page helper to initialize bvecs.
Signed-off-by: Christoph Hellwig
Reviewed-by: Chaitanya Kulkarni
Reviewed-by: Johannes Thumshirn
---
drivers/nvme/target/io-cmd-file.c | 10 ++
drivers/nvme/target/tcp.c | 5 ++---
2 files changed, 4 insertions(+), 11
Hi all,
this series adds the helpers to initalize a bvec. These remove open coding of
bvec internals and help with experimenting with other representations like
a phys_addr_t instead of page + offset.
Changes since v1:
- fix a typo
- simplify the code in ceph's __iter_get_bvecs a little bit
A smaller wrapper around bvec_set_page that takes a folio instead.
There are only two potential users for this in the tree, but the number
will grow in the future.
Signed-off-by: Christoph Hellwig
Reviewed-by: Chaitanya Kulkarni
Reviewed-by: Johannes Thumshirn
---
include/linux/bvec.h | 13
Add a helper for setting up the special_bvec instead of open coding it
in three place, and use the new bvec_set_page helper to initialize
special_vec.
Signed-off-by: Christoph Hellwig
Reviewed-by: Chaitanya Kulkarni
---
drivers/scsi/sd.c | 36 +---
1 file
A small wrapper around bvec_set_page for callers that have a virtual
address.
Signed-off-by: Christoph Hellwig
Reviewed-by: Chaitanya Kulkarni
Reviewed-by: Johannes Thumshirn
---
include/linux/bvec.h | 12
1 file changed, 12 insertions(+)
diff --git a/include/linux/bvec.h b
On Mon, Jan 30, 2023 at 09:09:23AM -0800, Bart Van Assche wrote:
> Has it been considered to use structure assignment instead of introducing
> bvec_set_page(), e.g. as follows?
>
> bip->bip_vec[bip->bip_vcnt] = (struct bio_vec) {
> .bv_page = page, .bv_len = len, .bv_offset = offset };
On Mon, Jan 30, 2023 at 11:24:15AM +, David Howells wrote:
> Seems to be something people want to do quite a lot and don't know about.
Hmm. Right now there is one case where it would be used, and there's
about three that are and should be using bio_add_page.
> I've seen places where someone
On Mon, Jan 30, 2023 at 10:33:36AM +, David Howells wrote:
> Christoph Hellwig wrote:
>
> > +static inline void bvec_set_page(struct bio_vec *bv, struct page *page,
> > + unsigned int len, unsigned int offset)
>
> Could you swap len and offset around? It r
On Mon, Jan 30, 2023 at 10:31:23AM +, David Howells wrote:
> Christoph Hellwig wrote:
>
> > + bvec_set_page(, ZERO_PAGE(0), len, 0);
>
> Maybe bvec_set_zero_page()?
Why?
___
Virtualization mailing list
Virtuali
Use the bvec_set_page helper to initialize a bvec.
Signed-off-by: Christoph Hellwig
---
net/rxrpc/rxperf.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/net/rxrpc/rxperf.c b/net/rxrpc/rxperf.c
index 16dcabb71ebe16..4a2e90015ca72c 100644
--- a/net/rxrpc/rxperf.c
Use the bvec_set_page helper to initialize bvecs.
Signed-off-by: Christoph Hellwig
---
net/ceph/messenger_v1.c | 7 ++-
net/ceph/messenger_v2.c | 28 +++-
2 files changed, 13 insertions(+), 22 deletions(-)
diff --git a/net/ceph/messenger_v1.c b/net/ceph
Use the bvec_set_page helper to initialize a bvec.
Signed-off-by: Christoph Hellwig
---
drivers/vhost/vringh.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/vhost/vringh.c b/drivers/vhost/vringh.c
index 33eb941fcf1546..a1e27da544814a 100644
--- a/drivers/vhost
Use the bvec_set_page helper to initialize a bvec.
Signed-off-by: Christoph Hellwig
---
fs/ceph/file.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index 764598e1efd91f..6419dce7c57987 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph
Use the bvec_set_page helper to initialize bvecs.
Signed-off-by: Christoph Hellwig
---
net/sunrpc/svcsock.c | 7 ++-
net/sunrpc/xdr.c | 5 ++---
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index 815baf308236a9
Use the bvec_set_page helper to initialize a bvec.
Signed-off-by: Christoph Hellwig
---
fs/coredump.c | 7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/fs/coredump.c b/fs/coredump.c
index de78bde2991beb..0a6873a9c4d0cd 100644
--- a/fs/coredump.c
+++ b/fs/coredump.c
Use the bvec_set_page helper to initialize bvecs.
Signed-off-by: Christoph Hellwig
---
mm/page_io.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/mm/page_io.c b/mm/page_io.c
index 3a5f921b932e82..233f6e6eb1c508 100644
--- a/mm/page_io.c
+++ b/mm/page_io.c
@@ -318,9
Use the bvec_set_page and bvec_set_folio helpers to initialize bvecs.
Signed-off-by: Christoph Hellwig
---
fs/orangefs/inode.c | 22 +++---
1 file changed, 7 insertions(+), 15 deletions(-)
diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c
index 4df56089438664
Use the bvec_set_page helper to initialize bvecs.
Signed-off-by: Christoph Hellwig
---
fs/nfs/fscache.c | 16 ++--
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/fs/nfs/fscache.c b/fs/nfs/fscache.c
index e731c00a9fcbc3..ea5f2976dfaba4 100644
--- a/fs/nfs/fscache.c
Use the bvec_set_page helper to initialize a bvec.
Signed-off-by: Christoph Hellwig
---
fs/splice.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/fs/splice.c b/fs/splice.c
index 5969b7a1d353a8..87d9b19349de63 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -675,9 +675,8
Use the bvec_set_page helper to initialize a bvec.
Signed-off-by: Christoph Hellwig
---
io_uring/rsrc.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/io_uring/rsrc.c b/io_uring/rsrc.c
index 18de10c68a151b..a59fc02de5983c 100644
--- a/io_uring/rsrc.c
+++ b/io_uring
Use the bvec_set_page helper to initialize bvecs.
Signed-off-by: Christoph Hellwig
---
fs/cifs/connect.c | 5 +++--
fs/cifs/fscache.c | 16 ++--
fs/cifs/misc.c| 5 ++---
fs/cifs/smb2ops.c | 6 +++---
4 files changed, 14 insertions(+), 18 deletions(-)
diff --git a/fs/cifs
Use the bvec_set_page helper to initialize bvecs.
Signed-off-by: Christoph Hellwig
---
drivers/block/zram/zram_drv.c | 15 ---
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index e290d6d970474e
Use the bvec_set_folio helper to initialize a bvec.
Signed-off-by: Christoph Hellwig
---
fs/afs/write.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/fs/afs/write.c b/fs/afs/write.c
index 19df10d63323d8..2d17891b618e6e 100644
--- a/fs/afs/write.c
+++ b/fs/afs
Use the bvec_set_page helper to initialize bvecs.
Signed-off-by: Christoph Hellwig
---
drivers/target/target_core_file.c | 18 ++
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/drivers/target/target_core_file.c
b/drivers/target/target_core_file.c
index
Use the bvec_set_virt helper to initialize the special_vec.
Signed-off-by: Christoph Hellwig
---
drivers/block/virtio_blk.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index 6a77fa91742880..dc6e9b989910b0 100644
Add a helper for setting up the special_bvec instead of open coding it
in three place, and use the new bvec_set_page helper to initialize
special_vec.
Signed-off-by: Christoph Hellwig
---
drivers/scsi/sd.c | 36 +---
1 file changed, 17 insertions(+), 19 deletions
Use the bvec_set_page helper to initialize the copy up bvec.
Signed-off-by: Christoph Hellwig
---
drivers/block/rbd.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 04453f4a319cb4..1faca7e07a4d52 100644
--- a/drivers
1 - 100 of 910 matches
Mail list logo