All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] pipe: Trivial cleanups
@ 2025-03-07  5:29 K Prateek Nayak
  2025-03-07  5:29 ` [PATCH v2 1/4] fs/pipe: Limit the slots in pipe_resize_ring() K Prateek Nayak
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: K Prateek Nayak @ 2025-03-07  5:29 UTC (permalink / raw)
  To: Linus Torvalds, Oleg Nesterov, Alexander Viro, Christian Brauner,
	linux-fsdevel, linux-kernel
  Cc: Jan Kara, Matthew Wilcox (Oracle), Mateusz Guzik,
	Rasmus Villemoes, Gautham R. Shenoy, Neeraj.Upadhyay,
	Ananth.narayan, Swapnil Sapkal, K Prateek Nayak

Hello folks,

Based on the suggestion on the RFC, the treewide conversion of
references to pipe->{head,tail} from unsigned int to pipe_index_t has
been dropped for now. The series contains trivial cleanup suggested to
limit the nr_slots in pipe_resize_ring() to be covered between
pipe_index_t limits of pipe->{head,tail} and using pipe_buf() to remove
the open-coded usage of masks to access pipe buffer building on Linus'
cleanup of fs/fuse/dev.c in commit ebb0f38bb47f ("fs/pipe: fix pipe
buffer index use in FUSE")

If folks are interested in converting a selective subset of references
to pipe->{head,tail} from unsigned int to pipe_index_t, please comment
on
https://lore.kernel.org/all/20250306113924.20004-4-kprateek.nayak@amd.com/
and I can send out a patch or you can go ahead and send one out yourself
too :)

Changes are based on Linus' tree at commit 00a7d39898c8 ("fs/pipe: add
simpler helpers for common cases")

---
Changelog:

RFC v1..v2:

o Dropped the RFC tag.

o Use (piep_index_t)-1u as the upper limit for nr_slots replacing the
  BITS_PER_TYPE() hackery to get the limits (Oleg; Patch 1)

o Patch 2 from the RFC v1 was dropped as it became redundand after the
  introduction of pipe_is_full() helper.

o Patch 2-4 are additional cleanups introduced in this version to use
  pipe_buf() replacing all the open-coded logic in various subsystems.
  (Oleg; Patch 2-4)

RFC: https://lore.kernel.org/all/20250306113924.20004-1-kprateek.nayak@amd.com/
---
K Prateek Nayak (4):
  fs/pipe: Limit the slots in pipe_resize_ring()
  kernel/watch_queue: Use pipe_buf() to retrieve the pipe buffer
  fs/pipe: Use pipe_buf() helper to retrieve pipe buffer
  fs/splice: Use pipe_buf() helper to retrieve pipe buffer

 fs/pipe.c            | 13 +++++++------
 fs/splice.c          | 40 ++++++++++++++--------------------------
 kernel/watch_queue.c |  7 +++----
 3 files changed, 24 insertions(+), 36 deletions(-)


base-commit: 00a7d39898c8010bfd5ff62af31ca5db34421b38
-- 
2.43.0


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

end of thread, other threads:[~2025-03-10  7:59 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-07  5:29 [PATCH v2 0/4] pipe: Trivial cleanups K Prateek Nayak
2025-03-07  5:29 ` [PATCH v2 1/4] fs/pipe: Limit the slots in pipe_resize_ring() K Prateek Nayak
2025-03-07 14:51   ` Oleg Nesterov
2025-03-07 16:16     ` K Prateek Nayak
2025-03-07 22:30       ` Oleg Nesterov
2025-03-07  5:29 ` [PATCH v2 2/4] kernel/watch_queue: Use pipe_buf() to retrieve the pipe buffer K Prateek Nayak
2025-03-07  5:29 ` [PATCH v2 3/4] fs/pipe: Use pipe_buf() helper to retrieve " K Prateek Nayak
2025-03-07  5:29 ` [PATCH v2 4/4] fs/splice: " K Prateek Nayak
2025-03-10  7:59 ` [PATCH v2 0/4] pipe: Trivial cleanups Christian Brauner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.