]> git.ipfire.org Git - thirdparty/man-pages.git/blobdiff - man2/rename.2
prctl.2: Add health warning
[thirdparty/man-pages.git] / man2 / rename.2
index 0710357ef99f2ff85ad3a126b73040688397c46a..9faa92260eabf10bf76495565f0e227b4f65dbae 100644 (file)
@@ -30,7 +30,7 @@
 .\" Modified Thu Mar  3 09:49:35 2005 by Michael Haardt <michael@moria.de>
 .\" 2007-03-25, mtk, added various text to DESCRIPTION.
 .\"
-.TH RENAME 2 2017-09-15 "Linux" "Linux Programmer's Manual"
+.TH RENAME 2 2019-03-06 "Linux" "Linux Programmer's Manual"
 .SH NAME
 rename, renameat, renameat2 \- change the name or location of a file
 .SH SYNOPSIS
@@ -65,7 +65,12 @@ _POSIX_C_SOURCE\ >=\ 200809L
 .TP
 Before glibc 2.10:
 _ATFILE_SOURCE
-.\" FIXME . need to define FTMs for renameat2(), once it hits glibc
+.RE
+.PP
+.BR renameat2 ():
+.RS 4
+.TP
+_GNU_SOURCE
 .RE
 .ad
 .PD
@@ -204,6 +209,32 @@ already exists.
 .B RENAME_NOREPLACE
 can't be employed together with
 .BR RENAME_EXCHANGE .
+.IP
+.B RENAME_NOREPLACE
+requires support from the underlying filesystem.
+Support for various filesystems was added as follows:
+.RS
+.IP * 3
+ext4 (Linux 3.15);
+.\" ext4: commit 0a7c3937a1f23f8cb5fc77ae01661e9968a51d0c
+.IP *
+btrfs, shmem, and cifs (Linux 3.17);
+.IP *
+xfs (Linux 4.0);
+.\" btrfs: commit 80ace85c915d0f41016f82917218997b72431258
+.\" shmem: commit 3b69ff51d087d265aa4af3a532fc4f20bf33e718
+.\" cifs: commit 7c33d5972ce382bcc506d16235f1e9b7d22cbef8
+.\"
+.\" gfs2 in 4.2?
+.IP *
+Support for many other filesystems was added in Linux 4.9, including
+ext2, minix, reiserfs, jfs, vfat, and bpf.
+.\" Also affs, bfs, exofs, hfs, hfsplus, jffs2, logfs, msdos,
+.\" nilfs2, omfs, sysvfs, ubifs, udf, ufs
+.\" hugetlbfs, ramfs
+.\" local filesystems: commit f03b8ad8d38634d13e802165cc15917481b47835
+.\" libfs: commit e0e0be8a835520e2f7c89f214dfda570922a1b90
+.RE
 .TP
 .BR RENAME_WHITEOUT " (since Linux 3.18)"
 .\" commit 0d7a855526dd672e114aff2ac22b60fc6f155b08
@@ -236,6 +267,14 @@ The whole operation needs to be done atomically.
 .IP
 When not part of a union/overlay,
 the whiteout appears as a character device with a {0,0} device number.
+.\" https://www.freebsd.org/cgi/man.cgi?query=mount_unionfs&manpath=FreeBSD+11.0-RELEASE
+(Note that other union/overlay implementations may employ different methods
+for storing whiteout entries; specifically, BSD union mount employs
+a separate inode type,
+.BR DT_WHT ,
+which, while supported by some filesystems available in Linux,
+such as CODA and XFS, is ignored by the kernel's whiteout support code,
+as of Linux 4.19, at least.)
 .IP
 .B RENAME_WHITEOUT
 requires the same privileges as creating a device node (i.e., the
@@ -249,12 +288,18 @@ can't be employed together with
 .B RENAME_WHITEOUT
 requires support from the underlying filesystem.
 Among the filesystems that provide that support are
-shmem (since Linux 3.18),
-.\" shmem: commit 46fdb794e3f52ef18b859ebc92f0a9d7db21c5df
+tmpfs (since Linux 3.18),
+.\" tmpfs: commit 46fdb794e3f52ef18b859ebc92f0a9d7db21c5df
 ext4 (since Linux 3.18),
 .\" ext4: commit cd808deced431b66b5fa4e5c193cb7ec0059eaff
-and XFS (since Linux 4.1).
+XFS (since Linux 4.1),
 .\" XFS: commit 7dcf5c3e4527cfa2807567b00387cf2ed5e07f00
+f2fs (since Linux 4.2),
+.\" f2fs: commit 7e01e7ad746bc8198a8b46163ddc73a1c7d22339
+btrfs (since Linux 4.7),
+.\" btrfs: commit cdd1fedf8261cd7a73c0596298902ff4f0f04492
+and ubifs (since Linux 4.9).
+.\" ubifs: commit 9e0a1fff8db56eaaebb74b4a3ef65f86811c4798
 .SH RETURN VALUE
 On success, zero is returned.
 On error, \-1 is returned, and