All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] eventfd: add a uapi header for eventfd userspace APIs
@ 2023-06-14 18:40 wenyang.linux
  2023-06-14 18:42 ` Matthew Wilcox
  2023-06-15 12:56 ` Christian Brauner
  0 siblings, 2 replies; 3+ messages in thread
From: wenyang.linux @ 2023-06-14 18:40 UTC (permalink / raw)
  To: Alexander Viro, Jens Axboe, Christian Brauner
  Cc: Wen Yang, Christoph Hellwig, Dylan Yudaken, David Woodhouse,
	Matthew Wilcox, Eric Biggers, linux-fsdevel, linux-kernel

From: Wen Yang <wenyang.linux@foxmail.com>

Create a uapi header include/uapi/linux/eventfd.h, move the associated
flags to the uapi header, and include it from linux/eventfd.h.

Suggested-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Wen Yang <wenyang.linux@foxmail.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Dylan Yudaken <dylany@fb.com>
Cc: David Woodhouse <dwmw@amazon.co.uk>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Eric Biggers <ebiggers@google.com>
Cc: linux-fsdevel@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
v3: remove types.h that is not needed now
v2: improve the code based on Christian's suggestions

 include/linux/eventfd.h      |  6 +-----
 include/uapi/linux/eventfd.h | 11 +++++++++++
 2 files changed, 12 insertions(+), 5 deletions(-)
 create mode 100644 include/uapi/linux/eventfd.h

diff --git a/include/linux/eventfd.h b/include/linux/eventfd.h
index 98d31cdaca40..b9d83652c097 100644
--- a/include/linux/eventfd.h
+++ b/include/linux/eventfd.h
@@ -9,12 +9,12 @@
 #ifndef _LINUX_EVENTFD_H
 #define _LINUX_EVENTFD_H
 
-#include <linux/fcntl.h>
 #include <linux/wait.h>
 #include <linux/err.h>
 #include <linux/percpu-defs.h>
 #include <linux/percpu.h>
 #include <linux/sched.h>
+#include <uapi/linux/eventfd.h>
 
 /*
  * CAREFUL: Check include/uapi/asm-generic/fcntl.h when defining
@@ -23,10 +23,6 @@
  * from eventfd, in order to leave a free define-space for
  * shared O_* flags.
  */
-#define EFD_SEMAPHORE (1 << 0)
-#define EFD_CLOEXEC O_CLOEXEC
-#define EFD_NONBLOCK O_NONBLOCK
-
 #define EFD_SHARED_FCNTL_FLAGS (O_CLOEXEC | O_NONBLOCK)
 #define EFD_FLAGS_SET (EFD_SHARED_FCNTL_FLAGS | EFD_SEMAPHORE)
 
diff --git a/include/uapi/linux/eventfd.h b/include/uapi/linux/eventfd.h
new file mode 100644
index 000000000000..2eb9ab6c32f3
--- /dev/null
+++ b/include/uapi/linux/eventfd.h
@@ -0,0 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+#ifndef _UAPI_LINUX_EVENTFD_H
+#define _UAPI_LINUX_EVENTFD_H
+
+#include <linux/fcntl.h>
+
+#define EFD_SEMAPHORE (1 << 0)
+#define EFD_CLOEXEC O_CLOEXEC
+#define EFD_NONBLOCK O_NONBLOCK
+
+#endif /* _UAPI_LINUX_EVENTFD_H */
-- 
2.25.1


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

* Re: [PATCH v3] eventfd: add a uapi header for eventfd userspace APIs
  2023-06-14 18:40 [PATCH v3] eventfd: add a uapi header for eventfd userspace APIs wenyang.linux
@ 2023-06-14 18:42 ` Matthew Wilcox
  2023-06-15 12:56 ` Christian Brauner
  1 sibling, 0 replies; 3+ messages in thread
From: Matthew Wilcox @ 2023-06-14 18:42 UTC (permalink / raw)
  To: wenyang.linux
  Cc: Alexander Viro, Jens Axboe, Christian Brauner, Christoph Hellwig,
	Dylan Yudaken, David Woodhouse, Eric Biggers, linux-fsdevel,
	linux-kernel

On Thu, Jun 15, 2023 at 02:40:28AM +0800, wenyang.linux@foxmail.com wrote:
> From: Wen Yang <wenyang.linux@foxmail.com>
> 
> Create a uapi header include/uapi/linux/eventfd.h, move the associated
> flags to the uapi header, and include it from linux/eventfd.h.
> 
> Suggested-by: Christian Brauner <brauner@kernel.org>
> Signed-off-by: Wen Yang <wenyang.linux@foxmail.com>

Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>

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

* Re: [PATCH v3] eventfd: add a uapi header for eventfd userspace APIs
  2023-06-14 18:40 [PATCH v3] eventfd: add a uapi header for eventfd userspace APIs wenyang.linux
  2023-06-14 18:42 ` Matthew Wilcox
@ 2023-06-15 12:56 ` Christian Brauner
  1 sibling, 0 replies; 3+ messages in thread
From: Christian Brauner @ 2023-06-15 12:56 UTC (permalink / raw)
  To: wenyang.linux
  Cc: Christian Brauner, Christoph Hellwig, Dylan Yudaken,
	David Woodhouse, Matthew Wilcox, Eric Biggers, linux-fsdevel,
	linux-kernel, Alexander Viro, Jens Axboe

On Thu, 15 Jun 2023 02:40:28 +0800, wenyang.linux@foxmail.com wrote:
> Create a uapi header include/uapi/linux/eventfd.h, move the associated
> flags to the uapi header, and include it from linux/eventfd.h.
> 
> 

Applied to the vfs.misc branch of the vfs/vfs.git tree.
Patches in the vfs.misc branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.misc

[1/1] eventfd: add a uapi header for eventfd userspace APIs
      https://git.kernel.org/vfs/vfs/c/3e3a566392e2

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

end of thread, other threads:[~2023-06-15 12:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-14 18:40 [PATCH v3] eventfd: add a uapi header for eventfd userspace APIs wenyang.linux
2023-06-14 18:42 ` Matthew Wilcox
2023-06-15 12:56 ` 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.