From: Chuck Lever
[ Upstream commit ecba88a3b32d733d41e27973e25b2bc580f64281 ]
For simple filesystems that use directory offset mapping, rely
strictly on the directory offset map to tell when a directory has
no children.
After this patch is applied, the emptiness test holds only the RCU
read lo
From: Chuck Lever
[ Upstream commit 7beea725a8ca412c6190090ce7c3a13b169592a1 ]
This value is used in several places, so make it a symbolic
constant.
Reviewed-by: Jan Kara
Signed-off-by: Chuck Lever
Link:
https://lore.kernel.org/r/170820142741.6328.12428356024575347885.st...@91.116.238.104.ho
5c5f ("shmem: stable directory offsets")
Signed-off-by: yangerkun
Link: https://lore.kernel.org/r/20240731043835.1828697-1-yanger...@huawei.com
Reviewed-by: Chuck Lever
[brauner: only update last_index after seek when offset is zero like Jan
suggested]
Signed-off-by: Christian Brau
From: Chuck Lever
[ Upstream commit ad191eb6d6942bb835a0b20b647f7c53c1d99ca4 ]
When renaming onto an existing directory entry, user space expects
the replacement entry to have the same directory offset as the
original one.
Link: https://gitlab.alpinelinux.org/alpine/aports/-/issues/15966
Fixes:
ned-off-by: Chuck Lever
Link: https://lore.kernel.org/r/20240415152057.4605-2-...@kernel.org
Signed-off-by: Christian Brauner
[ cel: adjusted to apply to origin/linux-6.6.y ]
Signed-off-by: Chuck Lever
---
fs/libfs.c | 25 +++--
1 file changed, 19 insertions(+), 6 deletions(-)
r this
set looks stable. I'm interested in hearing review comments and test
results.
Branch for testing:
https://git.kernel.org/pub/scm/linux/kernel/git/cel/linux.git/log/?h=nfsd-6.6.y
Chuck Lever (5):
libfs: Define a minimum directory offset
libfs: Add simple_offset_empty
From: Chuck Lever
[ Upstream commit 5a1a25be995e1014abd01600479915683e356f5c ]
I'm about to fix a tmpfs rename bug that requires the use of
internal simple_offset helpers that are not available in mm/shmem.c
Signed-off-by: Chuck Lever
Link: https://lore.kernel.org/r/20240415152057.4605-3-...@k