Linux block layer
 help / color / mirror / Atom feed
* [PATCH 0/5] allow dma-buf-io ctx reuse across files
@ 2026-11-04  0:18 Pavel Begunkov
  2026-11-04  0:18 ` [PATCH 1/5] dma-buf-io: add tags for sharing ctx b/w files Pavel Begunkov
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Pavel Begunkov @ 2026-11-04  0:18 UTC (permalink / raw)
  To: linux-block, io-uring
  Cc: Sumit Semwal, Christian König, Philipp Stanner, linux-media,
	dri-devel, linaro-mm-sig, Pavel Begunkov, Jens Axboe,
	Alexander Viro, Christian Brauner, Jan Kara, linux-fsdevel,
	Nitesh Shetty, Kanchan Joshi, Anuj Gupta

Currently, dma-buf maps can only be used by the file they were
registered with. This means that we can't open a new file, even if it
comes from the same subsystem and point to the same block device and
use it with an old dma-buf registration. That would be too restrictive
for upcoming filsystem support, so lift it now and allow reusing
contexts between files pointing to the same NVMe, even if they refer
to different partitions.

To do that, we add a tag representing for each file, save it from
the file passed during registration and use it to reject files
which tags don't match it. Tags are set by subsystems creating
files, should be unique and represent the instance of the
subsystem.

Pavel Begunkov (5):
  dma-buf-io: add tags for sharing ctx b/w files
  block: set dma-buf-io tag to block files
  io_uring: add data to dma-buf convertion helpers
  io_uring/dma-buf: switch to tag file filtering
  io_uring/dma-buf: get rid of struct io_buf_dma

 block/fops.c                 |  1 +
 drivers/dma-buf/dma-buf-io.c |  3 +++
 include/linux/dma-buf-io.h   | 22 ++++++++++++++++++++++
 include/linux/fs.h           |  6 ++++++
 io_uring/dma-buf.c           | 19 +++++--------------
 io_uring/dma-buf.h           | 24 ++++++++++++++----------
 6 files changed, 51 insertions(+), 24 deletions(-)

-- 
2.54.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-11-04  1:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-04  0:18 [PATCH 0/5] allow dma-buf-io ctx reuse across files Pavel Begunkov
2026-11-04  0:18 ` [PATCH 1/5] dma-buf-io: add tags for sharing ctx b/w files Pavel Begunkov
2026-11-04  0:18 ` [PATCH 2/5] block: set dma-buf-io tag to block files Pavel Begunkov
2026-11-04  0:18 ` [PATCH 3/5] io_uring: add data to dma-buf convertion helpers Pavel Begunkov
2026-11-04  0:19 ` [PATCH 4/5] io_uring/dma-buf: switch to tag file filtering Pavel Begunkov
2026-11-04  0:19 ` [PATCH 5/5] io_uring/dma-buf: get rid of struct io_buf_dma Pavel Begunkov
2026-11-04  1:07 ` [PATCH 0/5] allow dma-buf-io ctx reuse across files Pavel Begunkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox