From: Omar Sandoval <osandov@osandov.com> To: linux-fsdevel@vger.kernel.org, Al Viro <viro@zeniv.linux.org.uk> Cc: kernel-team@fb.com, linux-api@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-xfs@vger.kernel.org Subject: [RFC PATCH 0/6] Allow setting file birth time with utimensat() Date: Thu, 14 Feb 2019 02:00:07 -0800 [thread overview] Message-ID: <cover.1550136164.git.osandov@fb.com> (raw) From: Omar Sandoval <osandov@fb.com> Hi, Since statx was added in 4.11, userspace has had an interface for reading btime (file creation time), but no way to set it. This RFC patch series adds support for changing btime with utimensat(). Patch 1 adds the VFS infrastructure, patch 2 adds the support to utimensat() with a new flag, and the rest of the patches add filesystem support; I excluded CIFS for now because I don't have a CIFS setup to test it on. Updating btime is useful for at least a couple of use cases: - Backup/restore programs (my motivation for this feature is btrfs send) - File servers which interoperate with operating systems that allow updating file creation time, including Mac OS [1] and Windows [2] I've also included a man page patch, xfs_io support, and an xfstest. Thoughts on the implementation or the interface? Thanks! 1: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/setattrlist.2.html 2: https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-setfiletime Omar Sandoval (6): fs: add btime to struct iattr fs: add AT_UTIME_BTIME for utimensat() Btrfs: add support for setting btime ext4: add support for setting btime f2fs: add support for setting btime xfs: add support for setting btime fs/attr.c | 6 +++ fs/btrfs/inode.c | 2 + fs/btrfs/super.c | 4 +- fs/ext4/inode.c | 15 +++++- fs/ext4/super.c | 2 +- fs/f2fs/file.c | 19 ++++++-- fs/f2fs/super.c | 2 +- fs/utimes.c | 86 +++++++++++++++++++++------------- fs/xfs/libxfs/xfs_format.h | 2 +- fs/xfs/libxfs/xfs_log_format.h | 2 +- fs/xfs/xfs_iops.c | 11 ++++- fs/xfs/xfs_super.c | 2 +- include/linux/fs.h | 4 ++ include/uapi/linux/fcntl.h | 2 + 14 files changed, 111 insertions(+), 48 deletions(-) -- 2.20.1
next reply other threads:[~2019-02-14 10:01 UTC|newest] Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-02-14 10:00 Omar Sandoval [this message] 2019-02-14 10:00 ` [RFC PATCH 1/6] fs: add btime to struct iattr Omar Sandoval 2019-02-14 10:00 ` [RFC PATCH 2/6] fs: add AT_UTIME_BTIME for utimensat() Omar Sandoval 2019-02-14 10:00 ` [RFC PATCH 3/6] Btrfs: add support for setting btime Omar Sandoval 2019-02-14 10:00 ` [RFC PATCH 4/6] ext4: " Omar Sandoval 2019-02-14 10:00 ` [RFC PATCH 5/6] f2fs: " Omar Sandoval 2019-02-14 10:00 ` [RFC PATCH 6/6] xfs: " Omar Sandoval 2019-02-14 10:00 ` [PATCH] generic: add a test for AT_UTIME_BTIME Omar Sandoval 2019-02-14 10:00 ` [PATCH] utimensat2: document AT_UTIME_BTIME Omar Sandoval 2019-02-14 10:00 ` [PATCH] xfs_io: add AT_UTIME_BTIME support Omar Sandoval 2019-02-14 22:06 ` [RFC PATCH 0/6] Allow setting file birth time with utimensat() Dave Chinner 2019-02-14 23:14 ` Omar Sandoval 2019-02-15 0:16 ` Dave Chinner 2019-02-15 6:59 ` Omar Sandoval 2019-02-15 13:57 ` David Disseldorp 2019-02-17 1:57 ` Andreas Dilger 2019-02-18 22:18 ` Dave Chinner 2019-02-22 19:00 ` Omar Sandoval 2019-02-23 18:32 ` Andreas Dilger 2019-02-17 16:35 ` Boaz Harrosh 2019-02-17 17:54 ` Adam Borowski 2019-02-17 20:40 ` Andy Lutomirski 2019-02-19 4:04 ` Matthew Wilcox 2019-02-19 4:28 ` Dave Chinner 2019-02-20 7:47 ` Andreas Dilger 2019-02-15 1:57 ` Hans van Kranenburg 2019-02-15 5:39 ` Omar Sandoval 2019-02-15 18:25 ` Hans van Kranenburg 2019-02-22 15:02 ` David Sterba
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=cover.1550136164.git.osandov@fb.com \ --to=osandov@osandov.com \ --cc=kernel-team@fb.com \ --cc=linux-api@vger.kernel.org \ --cc=linux-btrfs@vger.kernel.org \ --cc=linux-ext4@vger.kernel.org \ --cc=linux-f2fs-devel@lists.sourceforge.net \ --cc=linux-fsdevel@vger.kernel.org \ --cc=linux-xfs@vger.kernel.org \ --cc=viro@zeniv.linux.org.uk \ --subject='Re: [RFC PATCH 0/6] Allow setting file birth time with utimensat()' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).