mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 06:01:57 +00:00
8f72c31f45
-----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRAhzRXHqcMeLMyaSiRxhvAZXjcogUCZuQEGwAKCRCRxhvAZXjc ojIuAQC433+hBkvjvmQ7H0r5rgZSjUuCTG3bSmdU7RJmPHUHhwEA85v/NGq53f+W IhandK6t+Cf0JYpFZ3N0bT88hDYVhQQ= =9zGL -----END PGP SIGNATURE----- Merge tag 'vfs-6.12.misc' of gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs Pull misc vfs updates from Christian Brauner: "This contains the usual pile of misc updates: Features: - Add F_CREATED_QUERY fcntl() that allows userspace to query whether a file was actually created. Often userspace wants to know whether an O_CREATE request did actually create a file without using O_EXCL. The current logic is that to first attempts to open the file without O_CREAT | O_EXCL and if ENOENT is returned userspace tries again with both flags. If that succeeds all is well. If it now reports EEXIST it retries. That works fairly well but some corner cases make this more involved. If this operates on a dangling symlink the first openat() without O_CREAT | O_EXCL will return ENOENT but the second openat() with O_CREAT | O_EXCL will fail with EEXIST. The reason is that openat() without O_CREAT | O_EXCL follows the symlink while O_CREAT | O_EXCL doesn't for security reasons. So it's not something we can really change unless we add an explicit opt-in via O_FOLLOW which seems really ugly. All available workarounds are really nasty (fanotify, bpf lsm etc) so add a simple fcntl(). - Try an opportunistic lookup for O_CREAT. Today, when opening a file we'll typically do a fast lookup, but if O_CREAT is set, the kernel always takes the exclusive inode lock. This was likely done with the expectation that O_CREAT means that we always expect to do the create, but that's often not the case. Many programs set O_CREAT even in scenarios where the file already exists (see related F_CREATED_QUERY patch motivation above). The series contained in the pr rearranges the pathwalk-for-open code to also attempt a fast_lookup in certain O_CREAT cases. If a positive dentry is found, the inode_lock can be avoided altogether and it can stay in rcuwalk mode for the last step_into. - Expose the 64 bit mount id via name_to_handle_at() Now that we provide a unique 64-bit mount ID interface in statx(2), we can now provide a race-free way for name_to_handle_at(2) to provide a file handle and corresponding mount without needing to worry about racing with /proc/mountinfo parsing or having to open a file just to do statx(2). While this is not necessary if you are using AT_EMPTY_PATH and don't care about an extra statx(2) call, users that pass full paths into name_to_handle_at(2) need to know which mount the file handle comes from (to make sure they don't try to open_by_handle_at a file handle from a different filesystem) and switching to AT_EMPTY_PATH would require allocating a file for every name_to_handle_at(2) call - Add a per dentry expire timeout to autofs There are two fairly well known automounter map formats, the autofs format and the amd format (more or less System V and Berkley). Some time ago Linux autofs added an amd map format parser that implemented a fair amount of the amd functionality. This was done within the autofs infrastructure and some functionality wasn't implemented because it either didn't make sense or required extra kernel changes. The idea was to restrict changes to be within the existing autofs functionality as much as possible and leave changes with a wider scope to be considered later. One of these changes is implementing the amd options: 1) "unmount", expire this mount according to a timeout (same as the current autofs default). 2) "nounmount", don't expire this mount (same as setting the autofs timeout to 0 except only for this specific mount) . 3) "utimeout=<seconds>", expire this mount using the specified timeout (again same as setting the autofs timeout but only for this mount) To implement these options per-dentry expire timeouts need to be implemented for autofs indirect mounts. This is because all map keys (mounts) for autofs indirect mounts use an expire timeout stored in the autofs mount super block info. structure and all indirect mounts use the same expire timeout. Fixes: - Fix missing fput for FSCONFIG_SET_FD in autofs - Use param->file for FSCONFIG_SET_FD in coda - Delete the 'fs/netfs' proc subtreee when netfs module exits - Make sure that struct uid_gid_map fits into a single cacheline - Don't flush in-flight wb switches for superblocks without cgroup writeback - Correcting the idmapping mount example in the idmapping documentation - Fix a race between evice_inodes() and find_inode() and iput() - Refine the show_inode_state() macro definition in writeback code - Prevent dump_mapping() from accessing invalid dentry.d_name.name - Show actual source for debugfs in /proc/mounts - Annotate data-race of busy_poll_usecs in eventpoll - Don't WARN for racy path_noexec check in exec code - Handle OOM on mnt_warn_timestamp_expiry() - Fix some spelling in the iomap design documentation - Fix typo in procfs comment - Fix typo in fs/namespace.c comment Cleanups: - Add the VFS git tree to the MAINTAINERS file - Move FMODE_UNSIGNED_OFFSET to fop_flags freeing up another f_mode bit in struct file bringing us to 5 free f_mode bits - Remove the __I_DIO_WAKEUP bit from i_state flags as we can simplify the wait mechanism - Remove the unused path_put_init() helper - Replace a __u32 with u32 for s_fsnotify_mask as __u32 is uapi specific - Replace the unsigned long i_state member with a u32 i_state member in struct inode freeing up 4 bytes in struct inode. Instead of using the bit based wait apis we're now using the var event apis and using the individual bytes of the i_state member to wait on state changes - Explain how per-syscall AT_* flags should be allocated - Use in_group_or_capable() helper to simplify the posix acl mode update code - Switch to LIST_HEAD() in fsync_buffers_list() to simplify the code - Removed comment about d_rcu_to_refcount() as that function doesn't exist anymore - Add kernel documentation for lookup_fast() - Don't re-zero evenpoll fields - Remove outdated comment after close_fd() - Fix imprecise wording in comment about the pipe filesystem - Drop GFP_NOFAIL mode from alloc_page_buffers - Missing blank line warnings and struct declaration improved in file_table - Annotate struct poll_list with __counted_by() - Remove the unused read parameter in percpu-rwsem - Remove linux/prefetch.h include from direct-io code - Use kmemdup_array instead of kmemdup for multiple allocation in mnt_idmapping code - Remove unused mnt_cursor_del() declaration Performance tweaks: - Dodge smp_mb in break_lease and break_deleg in the common case - Only read fops once in fops_{get,put}() - Use RCU in ilookup() - Elide smp_mb in iversion handling in the common case - Drop one lock trip in evict()" * tag 'vfs-6.12.misc' of gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs: (58 commits) uidgid: make sure we fit into one cacheline proc: Fix typo in the comment fs/pipe: Correct imprecise wording in comment fhandle: expose u64 mount id to name_to_handle_at(2) uapi: explain how per-syscall AT_* flags should be allocated fs: drop GFP_NOFAIL mode from alloc_page_buffers writeback: Refine the show_inode_state() macro definition fs/inode: Prevent dump_mapping() accessing invalid dentry.d_name.name mnt_idmapping: Use kmemdup_array instead of kmemdup for multiple allocation netfs: Delete subtree of 'fs/netfs' when netfs module exits fs: use LIST_HEAD() to simplify code inode: make i_state a u32 inode: port __I_LRU_ISOLATING to var event vfs: fix race between evice_inodes() and find_inode()&iput() inode: port __I_NEW to var event inode: port __I_SYNC to var event fs: reorder i_state bits fs: add i_state helpers MAINTAINERS: add the VFS git tree fs: s/__u32/u32/ for s_fsnotify_mask ... |
||
---|---|---|
.. | ||
acl.c | ||
acl.h | ||
alloc_background_format.h | ||
alloc_background.c | ||
alloc_background.h | ||
alloc_foreground.c | ||
alloc_foreground.h | ||
alloc_types.h | ||
backpointers.c | ||
backpointers.h | ||
bbpos_types.h | ||
bbpos.h | ||
bcachefs_format.h | ||
bcachefs_ioctl.h | ||
bcachefs.h | ||
bkey_buf.h | ||
bkey_cmp.h | ||
bkey_methods.c | ||
bkey_methods.h | ||
bkey_sort.c | ||
bkey_sort.h | ||
bkey_types.h | ||
bkey.c | ||
bkey.h | ||
bset.c | ||
bset.h | ||
btree_cache.c | ||
btree_cache.h | ||
btree_gc_types.h | ||
btree_gc.c | ||
btree_gc.h | ||
btree_io.c | ||
btree_io.h | ||
btree_iter.c | ||
btree_iter.h | ||
btree_journal_iter.c | ||
btree_journal_iter.h | ||
btree_key_cache_types.h | ||
btree_key_cache.c | ||
btree_key_cache.h | ||
btree_locking.c | ||
btree_locking.h | ||
btree_node_scan_types.h | ||
btree_node_scan.c | ||
btree_node_scan.h | ||
btree_trans_commit.c | ||
btree_types.h | ||
btree_update_interior.c | ||
btree_update_interior.h | ||
btree_update.c | ||
btree_update.h | ||
btree_write_buffer_types.h | ||
btree_write_buffer.c | ||
btree_write_buffer.h | ||
buckets_types.h | ||
buckets_waiting_for_journal_types.h | ||
buckets_waiting_for_journal.c | ||
buckets_waiting_for_journal.h | ||
buckets.c | ||
buckets.h | ||
chardev.c | ||
chardev.h | ||
checksum.c | ||
checksum.h | ||
clock_types.h | ||
clock.c | ||
clock.h | ||
compress.c | ||
compress.h | ||
darray.c | ||
darray.h | ||
data_update.c | ||
data_update.h | ||
debug.c | ||
debug.h | ||
dirent_format.h | ||
dirent.c | ||
dirent.h | ||
disk_accounting_format.h | ||
disk_accounting_types.h | ||
disk_accounting.c | ||
disk_accounting.h | ||
disk_groups_format.h | ||
disk_groups_types.h | ||
disk_groups.c | ||
disk_groups.h | ||
ec_format.h | ||
ec_types.h | ||
ec.c | ||
ec.h | ||
errcode.c | ||
errcode.h | ||
error.c | ||
error.h | ||
extent_update.c | ||
extent_update.h | ||
extents_format.h | ||
extents_types.h | ||
extents.c | ||
extents.h | ||
eytzinger.c | ||
eytzinger.h | ||
fifo.h | ||
fs-common.c | ||
fs-common.h | ||
fs-io-buffered.c | ||
fs-io-buffered.h | ||
fs-io-direct.c | ||
fs-io-direct.h | ||
fs-io-pagecache.c | ||
fs-io-pagecache.h | ||
fs-io.c | ||
fs-io.h | ||
fs-ioctl.c | ||
fs-ioctl.h | ||
fs.c | ||
fs.h | ||
fsck.c | ||
fsck.h | ||
inode_format.h | ||
inode.c | ||
inode.h | ||
io_misc.c | ||
io_misc.h | ||
io_read.c | ||
io_read.h | ||
io_write_types.h | ||
io_write.c | ||
io_write.h | ||
journal_io.c | ||
journal_io.h | ||
journal_reclaim.c | ||
journal_reclaim.h | ||
journal_sb.c | ||
journal_sb.h | ||
journal_seq_blacklist_format.h | ||
journal_seq_blacklist.c | ||
journal_seq_blacklist.h | ||
journal_types.h | ||
journal.c | ||
journal.h | ||
Kconfig | ||
keylist_types.h | ||
keylist.c | ||
keylist.h | ||
logged_ops_format.h | ||
logged_ops.c | ||
logged_ops.h | ||
lru_format.h | ||
lru.c | ||
lru.h | ||
Makefile | ||
mean_and_variance_test.c | ||
mean_and_variance.c | ||
mean_and_variance.h | ||
migrate.c | ||
migrate.h | ||
move_types.h | ||
move.c | ||
move.h | ||
movinggc.c | ||
movinggc.h | ||
nocow_locking_types.h | ||
nocow_locking.c | ||
nocow_locking.h | ||
opts.c | ||
opts.h | ||
printbuf.c | ||
printbuf.h | ||
quota_format.h | ||
quota_types.h | ||
quota.c | ||
quota.h | ||
rebalance_types.h | ||
rebalance.c | ||
rebalance.h | ||
recovery_passes_types.h | ||
recovery_passes.c | ||
recovery_passes.h | ||
recovery.c | ||
recovery.h | ||
reflink_format.h | ||
reflink.c | ||
reflink.h | ||
replicas_format.h | ||
replicas_types.h | ||
replicas.c | ||
replicas.h | ||
sb-clean.c | ||
sb-clean.h | ||
sb-counters_format.h | ||
sb-counters.c | ||
sb-counters.h | ||
sb-downgrade_format.h | ||
sb-downgrade.c | ||
sb-downgrade.h | ||
sb-errors_format.h | ||
sb-errors_types.h | ||
sb-errors.c | ||
sb-errors.h | ||
sb-members_format.h | ||
sb-members_types.h | ||
sb-members.c | ||
sb-members.h | ||
seqmutex.h | ||
siphash.c | ||
siphash.h | ||
six.c | ||
six.h | ||
snapshot_format.h | ||
snapshot.c | ||
snapshot.h | ||
str_hash.h | ||
subvolume_format.h | ||
subvolume_types.h | ||
subvolume.c | ||
subvolume.h | ||
super_types.h | ||
super-io.c | ||
super-io.h | ||
super.c | ||
super.h | ||
sysfs.c | ||
sysfs.h | ||
tests.c | ||
tests.h | ||
thread_with_file_types.h | ||
thread_with_file.c | ||
thread_with_file.h | ||
time_stats.c | ||
time_stats.h | ||
trace.c | ||
trace.h | ||
two_state_shared_lock.c | ||
two_state_shared_lock.h | ||
util.c | ||
util.h | ||
varint.c | ||
varint.h | ||
vstructs.h | ||
xattr_format.h | ||
xattr.c | ||
xattr.h |