Skip to contentSkip to conversation

man: document XFS_XFLAG_APPEND behavior for directories

PATCH In review Darrick J. Wong 3 participants 3 messages Feb 24, 2021 – Feb 25, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 man: document XFS_XFLAG_APPEND behavior for directories

From: Darrick J. Wong <[email protected]>

For directories, the APPEND flag means that files cannot be unlinked from the directory. Files can be linked in or created, just not unlinked. Document this behavior, since it's been in the VFS for years though not explicitly mentioned. This patch is in preparation for trying to hoist the fsgetxattr ioctl documentation to the man-pages project.

---
 man/man2/ioctl_xfs_fsgetxattr.2 |    1 +
 1 file changed, 1 insertion(+)
man/man2/ioctl_xfs_fsgetxattr.2 +1 -0
index e2cbfca3..2c626a7e 100644
@@ -104,6 +104,7 @@ will be returned.
 .B XFS_XFLAG_APPEND
 The file is append-only - it can only be opened in append mode for
 writing.
+For directories, this means that files cannot be unlinked from this directory.
 Only the superuser or a process possessing the CAP_LINUX_IMMUTABLE
 capability can set or clear this flag.
 .TP
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Darrick J. Wong

From: Darrick J. Wong <[email protected]>

For directories, the APPEND flag means that files cannot be unlinked from the directory. Files can be linked in or created, just not unlinked. Document this behavior, since it's been in the VFS for years though not explicitly mentioned. This patch is in preparation for trying to hoist the fsgetxattr ioctl documentation to the man-pages project.

sounds good.

Quoted 2 lines
Quoted 17 lines
---
 man/man2/ioctl_xfs_fsgetxattr.2 |    1 +
 1 file changed, 1 insertion(+)
man/man2/ioctl_xfs_fsgetxattr.2 +1 -0
index e2cbfca3..2c626a7e 100644
@@ -104,6 +104,7 @@ will be returned.
 .B XFS_XFLAG_APPEND
 The file is append-only - it can only be opened in append mode for
 writing.
+For directories, this means that files cannot be unlinked from this directory.
 Only the superuser or a process possessing the CAP_LINUX_IMMUTABLE
 capability can set or clear this flag.
 .TP