opnsense-src/sys/fs
Jason A. Harmening 8fa5e0f21f tmpfs: Account for whiteouts during rename/rmdir
The existing tmpfs implementation will return ENOTEMPTY for VOP_RMDIR,
or for the destination directory of VOP_RENAME, for any case in which
the directory is non-empty, even if the directory only contains
whiteouts.

Fix this by tracking total whiteout dirent allocation separately for
each directory, and avoid returning ENOTEMPTY if IGNOREWHITEOUT has
been specified by the caller and the total allocation of dirents is not
greater than the total whiteout allocation.  This addresses "directory
not empty" failures seen on some recently-added unionfs stress2 tests
which use tmpfs as a base-layer filesystem.

A separate issue for independent consideration is that unionfs' default
behavior when deleting files or directories is to create whiteouts even
when it does not truly need to do so.

Differential Revision:  https://reviews.freebsd.org/D45987
Reviewed by:		kib (prior version), olce
Tested by:		pho
2024-09-08 18:34:15 -05:00
..
autofs Reduce reliance on sys/sysproto.h pollution 2024-04-15 21:35:40 +01:00
cd9660 cd9660: Add support for mask,dirmask,uid,gid options 2024-01-12 14:51:31 -08:00
cuse sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
deadfs sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
devfs devfs_allocv(): style 2024-05-12 04:13:00 +03:00
ext2fs ext4_ext_tree_init: correct memset initialization 2024-06-25 10:41:11 -07:00
fdescfs sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
fifofs sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
fuse fusefs: fix an uninitialized memory access in fuse_vnop_deallocate 2024-09-08 15:50:40 -06:00
mntfs sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
msdosfs msdosfs: return ENOENT if looking up invalid name for OPEN or DELETE 2024-08-25 17:50:53 +03:00
nfs nfscl: fix uninitialized memory in nfsv4_loadattr 2024-09-08 17:28:33 -06:00
nfsclient nfs: Add support for the NFSv4.2 mode_umask attribute 2024-08-20 18:48:19 -07:00
nfsserver nfsd: Fix handling of NFSv4 setable attributes 2024-08-27 14:19:33 -07:00
nullfs nullfs: Use an a_gen field to cast to vop_generic_args 2024-07-26 11:14:32 +00:00
p9fs p9fs: Properly handle paths containing "." 2024-08-26 18:24:59 +00:00
procfs proc: Remove kernel stack swapping support, part 6 2024-07-29 01:43:18 +00:00
pseudofs pseudofs: fix off by one in hash iteration in pfs_purge 2023-11-20 05:57:25 +00:00
smbfs Add vnode_pager_clean_{a,}sync(9) 2024-01-11 18:44:53 +02:00
tarfs tarfs(5): Grammar fix for a source code comment 2024-04-20 11:21:54 +02:00
tmpfs tmpfs: Account for whiteouts during rename/rmdir 2024-09-08 18:34:15 -05:00
udf udf: Stop checking for failures from malloc(M_WAITOK) 2024-09-03 18:25:18 +08:00
unionfs vfs: Add IGNOREWHITEOUT flag and adopt it in UFS/unionfs 2024-09-08 18:34:14 -05:00