History

Merge tag 'vfs-6.14-rc1.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs

Pull misc vfs updates from Christian Brauner: "Features: - Support caching symlink lengths in inodes The size is stored in a new union utilizing the same space as i_devices, thus avoiding growing the struct or taking up any more space When utilized it dodges strlen() in vfs_readlink(), giving about 1.5% speed up when issuing readlink on /initrd.img on ext4 - Add RWF_DONTCACHE iocb and FOP_DONTCACHE file_operations flag If a file system supports uncached buffered IO, it may set FOP_DONTCACHE and enable support for RWF_DONTCACHE. If RWF_DONTCACHE is attempted without the file system supporting it, it'll get errored with -EOPNOTSUPP - Enable VBOXGUEST and VBOXSF_FS on ARM64 Now that VirtualBox is able to run as a host on arm64 (e.g. the Apple M3 processors) we can enable VBOXSF_FS (and in turn VBOXGUEST) for this architecture. Tested with various runs of bonnie++ and dbench on an Apple MacBook Pro with the latest Virtualbox 7.1.4 r165100 installed Cleanups: - Delay sysctl_nr_open check in expand_files() - Use kernel-doc includes in fiemap docbook - Use page->private instead of page->index in watch_queue - Use a consume fence in mnt_idmap() as it's heavily used in link_path_walk() - Replace magic number 7 with ARRAY_SIZE() in fc_log - Sort out a stale comment about races between fd alloc and dup2() - Fix return type of do_mount() from long to int - Various cosmetic cleanups for the lockref code Fixes: - Annotate spinning as unlikely() in __read_seqcount_begin The annotation already used to be there, but got lost in commit 52ac39e5db51 ("seqlock: seqcount_t: Implement all read APIs as statement expressions") - Fix proc_handler for sysctl_nr_open - Flush delayed work in delayed fput() - Fix grammar and spelling in propagate_umount() - Fix ESP not readable during coredump In /proc/PID/stat, there is the kstkesp field which is the stack pointer of a thread. While the thread is active, this field reads zero. But during a coredump, it should have a valid value However, at the moment, kstkesp is zero even during coredump - Don't wake up the writer if the pipe is still full - Fix unbalanced user_access_end() in select code" * tag 'vfs-6.14-rc1.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: (28 commits) gfs2: use lockref_init for qd_lockref erofs: use lockref_init for pcl->lockref dcache: use lockref_init for d_lockref lockref: add a lockref_init helper lockref: drop superfluous externs lockref: use bool for false/true returns lockref: improve the lockref_get_not_zero description lockref: remove lockref_put_not_zero fs: Fix return type of do_mount() from long to int select: Fix unbalanced user_access_end() vbox: Enable VBOXGUEST and VBOXSF_FS on ARM64 pipe_read: don't wake up the writer if the pipe is still full selftests: coredump: Add stackdump test fs/proc: do_task_stat: Fix ESP not readable during coredump fs: add RWF_DONTCACHE iocb and FOP_DONTCACHE file_operations flag fs: sort out a stale comment about races between fd alloc and dup2 fs: Fix grammar and spelling in propagate_umount() fs: fc_log replace magic number 7 with ARRAY_SIZE() fs: use a consume fence in mnt_idmap() file: flush delayed work in delayed fput() ...

Linus Torvalds committed 1 year ago

Commit 4b84a4c2 parents d582952 c859df533 files · +415 −180Browse files

Showing the changes to include/uapi (2 of 33 files). Show all

Unified · Split

2 files
  1. include/uapi/linux/fiemap.h +33 −14
  2. include/uapi/linux/fs.h +5 −1
include/uapi/linux/fiemap.h+33−14
@@ -14,37 +14,56 @@ · 13 unmodified lines
1414
1515 #include <linux/types.h>
1616
17+/**
18+ * struct fiemap_extent - description of one fiemap extent
19+ * @fe_logical: byte offset of the extent in the file
20+ * @fe_physical: byte offset of extent on disk
21+ * @fe_length: length in bytes for this extent
22+ * @fe_flags: FIEMAP_EXTENT_* flags for this extent
23+ */
1724 struct fiemap_extent {
18− __u64 fe_logical; /* logical offset in bytes for the start of
19− * the extent from the beginning of the file */
20− __u64 fe_physical; /* physical offset in bytes for the start
21− * of the extent from the beginning of the disk */
22− __u64 fe_length; /* length in bytes for this extent */
25+ __u64 fe_logical;
26+ __u64 fe_physical;
27+ __u64 fe_length;
28+ /* private: */
2329 __u64 fe_reserved64[2];
24− __u32 fe_flags; /* FIEMAP_EXTENT_* flags for this extent */
30+ /* public: */
31+ __u32 fe_flags;
32+ /* private: */
2533 __u32 fe_reserved[3];
2634 };
2735
36+/**
37+ * struct fiemap - file extent mappings
38+ * @fm_start: byte offset (inclusive) at which to start mapping (in)
39+ * @fm_length: logical length of mapping which userspace wants (in)
40+ * @fm_flags: FIEMAP_FLAG_* flags for request (in/out)
41+ * @fm_mapped_extents: number of extents that were mapped (out)
42+ * @fm_extent_count: size of fm_extents array (in)
43+ * @fm_extents: array of mapped extents (out)
44+ */
2845 struct fiemap {
29− __u64 fm_start; /* logical offset (inclusive) at
30− * which to start mapping (in) */
31− __u64 fm_length; /* logical length of mapping which
32− * userspace wants (in) */
33− __u32 fm_flags; /* FIEMAP_FLAG_* flags for request (in/out) */
34− __u32 fm_mapped_extents;/* number of extents that were mapped (out) */
35− __u32 fm_extent_count; /* size of fm_extents array (in) */
46+ __u64 fm_start;
47+ __u64 fm_length;
48+ __u32 fm_flags;
49+ __u32 fm_mapped_extents;
50+ __u32 fm_extent_count;
51+ /* private: */
3652 __u32 fm_reserved;
37− struct fiemap_extent fm_extents[]; /* array of mapped extents (out) */
53+ /* public: */
54+ struct fiemap_extent fm_extents[];
3855 };
3956
4057 #define FIEMAP_MAX_OFFSET (~0ULL)
4158
59+/* flags used in fm_flags: */
4260 #define FIEMAP_FLAG_SYNC 0x00000001 /* sync file data before map */
4361 #define FIEMAP_FLAG_XATTR 0x00000002 /* map extended attribute tree */
4462 #define FIEMAP_FLAG_CACHE 0x00000004 /* request caching of the extents */
4563
4664 #define FIEMAP_FLAGS_COMPAT (FIEMAP_FLAG_SYNC | FIEMAP_FLAG_XATTR)
4765
66+/* flags used in fe_flags: */
4867 #define FIEMAP_EXTENT_LAST 0x00000001 /* Last extent in file. */
4968 #define FIEMAP_EXTENT_UNKNOWN 0x00000002 /* Data location unknown. */
5069 #define FIEMAP_EXTENT_DELALLOC 0x00000004 /* Location still pending.
include/uapi/linux/fs.h+5−1
@@ -332,9 +332,13 @@ typedef int __bitwise __kernel_rwf_t; · 331 unmodified lines
332332 /* Atomic Write */
333333 #define RWF_ATOMIC ((__force __kernel_rwf_t)0x00000040)
334334
335+/* buffered IO that drops the cache after reading or writing data */
336+#define RWF_DONTCACHE ((__force __kernel_rwf_t)0x00000080)
337+
335338 /* mask of flags supported by the kernel */
336339 #define RWF_SUPPORTED (RWF_HIPRI | RWF_DSYNC | RWF_SYNC | RWF_NOWAIT |\
337− RWF_APPEND | RWF_NOAPPEND | RWF_ATOMIC)
340+ RWF_APPEND | RWF_NOAPPEND | RWF_ATOMIC |\
341+ RWF_DONTCACHE)
338342
339343 #define PROCFS_IOCTL_MAGIC 'f'
340344

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t