Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Apr 2026 22:27:15 +0000
From:      Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron <dumbbell@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: a5ae030d9f8f - main - linuxkpi: Add `fop_flags` to `struct file_operations`
Message-ID:  <69e7f9c3.36f67.5d0fc486@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by dumbbell:

URL: https://cgit.FreeBSD.org/src/commit/?id=a5ae030d9f8f5557502c4e51d2a083a70c513379

commit a5ae030d9f8f5557502c4e51d2a083a70c513379
Author:     Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
AuthorDate: 2026-04-13 23:12:18 +0000
Commit:     Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
CommitDate: 2026-04-21 22:18:26 +0000

    linuxkpi: Add `fop_flags` to `struct file_operations`
    
    ... along with the `FOP_*` flag constants.
    
    Note that this `fop_flags` field is not used on FreeBSD. It is added to
    make the DRM drivers compile out of the box.
    
    The DRM generic code and drivers started this in Linux 6.12.
    
    Reviewed by:    bz
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D56450
---
 sys/compat/linuxkpi/common/include/linux/fs.h | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/sys/compat/linuxkpi/common/include/linux/fs.h b/sys/compat/linuxkpi/common/include/linux/fs.h
index 7e28be070850..749a9fd22d3d 100644
--- a/sys/compat/linuxkpi/common/include/linux/fs.h
+++ b/sys/compat/linuxkpi/common/include/linux/fs.h
@@ -133,8 +133,11 @@ do {									\
 
 typedef int (*filldir_t)(void *, const char *, int, off_t, u64, unsigned);
 
+typedef unsigned int fop_flags_t;
+
 struct file_operations {
 	struct module *owner;
+	fop_flags_t fop_flags; /* Unused on FreeBSD. */
 	ssize_t (*read)(struct linux_file *, char __user *, size_t, off_t *);
 	ssize_t (*write)(struct linux_file *, const char __user *, size_t, off_t *);
 	unsigned int (*poll) (struct linux_file *, struct poll_table_struct *);
@@ -182,6 +185,14 @@ struct file_operations {
 	int (*setlease)(struct file *, long, struct file_lock **);
 #endif
 };
+
+#define	FOP_BUFFER_RASYNC	(1 << 0)
+#define	FOP_BUFFER_WASYNC	(1 << 1)
+#define	FOP_MMAP_SYNC		(1 << 2)
+#define	FOP_DIO_PARALLEL_WRITE	(1 << 3)
+#define	FOP_HUGE_PAGES		(1 << 4)
+#define	FOP_UNSIGNED_OFFSET	(1 << 5)
+
 #define	fops_get(fops)		(fops)
 #define	replace_fops(f, fops)	((f)->f_op = (fops))
 


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69e7f9c3.36f67.5d0fc486>