f2fs: introduce F2FS_IOC_START_ATOMIC_REPLACE
authorDaeho Jeong <daehojeong@google.com>
Fri, 11 Nov 2022 17:04:06 +0000 (09:04 -0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 28 Nov 2022 20:46:23 +0000 (12:46 -0800)
commit41e8f85a75fc60e1543e4903428a1b481b672a17
tree73ce84c5a51dc782dafce31c222c0eed27cba7be
parent967eaad1fed5f6335ea97a47d45214744dc57925
f2fs: introduce F2FS_IOC_START_ATOMIC_REPLACE

introduce a new ioctl to replace the whole content of a file atomically,
which means it induces truncate and content update at the same time.
We can start it with F2FS_IOC_START_ATOMIC_REPLACE and complete it with
F2FS_IOC_COMMIT_ATOMIC_WRITE. Or abort it with
F2FS_IOC_ABORT_ATOMIC_WRITE.

Signed-off-by: Daeho Jeong <daehojeong@google.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/data.c
fs/f2fs/f2fs.h
fs/f2fs/file.c
fs/f2fs/segment.c
include/uapi/linux/f2fs.h