linux/fs/f2fs
Chao Yu 7e01e7ad74 f2fs: support RENAME_WHITEOUT
As the description of rename in manual, RENAME_WHITEOUT is a special operation
that only makes sense for overlay/union type filesystem.

When performing rename with RENAME_WHITEOUT, dst will be replace with src, and
meanwhile, a 'whiteout' will be create with name of src.

A "whiteout" is designed to be a char device with 0,0 device number, it has
specially meaning for stackable filesystem. In these filesystems, there are
multiple layers exist, and only top of these can be modified. So a whiteout
in top layer is used to hide a corresponding file in lower layer, as well
removal of whiteout will make the file appear.

Now in overlayfs, when we rename a file which is exist in lower layer, it
will be copied up to upper if it is not on upper layer yet, and then rename
it on upper layer, source file will be whiteouted to hide corresponding file
in lower layer at the same time.

So in upper layer filesystem, implementation of RENAME_WHITEOUT provide a
atomic operation for stackable filesystem to support rename operation.

There are multiple ways to implement RENAME_WHITEOUT in log of this commit:
7dcf5c3e45 ("xfs: add RENAME_WHITEOUT support") which pointed out by
Dave Chinner.

For now, we just try to follow the way that xfs/ext4 use.

Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2015-06-01 16:21:01 -07:00
..
Kconfig f2fs crypto: add f2fs encryption Kconfig 2015-05-28 15:41:46 -07:00
Makefile f2fs crypto: filename encryption facilities 2015-05-28 15:41:50 -07:00
acl.c f2fs: make posix_acl_create() safer and cleaner 2015-05-07 11:38:31 -07:00
acl.h f2fs: avoid deadlock on init_inode_metadata 2014-11-03 16:07:33 -08:00
checkpoint.c f2fs: introduce update_meta_page 2015-06-01 16:21:00 -07:00
crypto.c f2fs crypto: split f2fs_crypto_init/exit with two parts 2015-06-01 16:20:59 -07:00
crypto_fname.c f2fs crypto: fix to release buffer for fname crypto 2015-06-01 16:20:57 -07:00
crypto_key.c f2fs crypto: split f2fs_crypto_init/exit with two parts 2015-06-01 16:20:59 -07:00
crypto_policy.c f2fs crypto: add encryption policy and password salt support 2015-05-28 15:41:48 -07:00
data.c f2fs crypto: add encryption support in read/write paths 2015-05-28 15:41:52 -07:00
debug.c f2fs: fix building on 32-bit architectures 2015-06-01 16:20:53 -07:00
dir.c f2fs: add compat_ioctl to provide backward compatability 2015-06-01 16:20:51 -07:00
f2fs.h f2fs: introduce update_meta_page 2015-06-01 16:21:00 -07:00
f2fs_crypto.h f2fs crypto: shrink size of the f2fs_crypto_ctx structure 2015-06-01 16:20:57 -07:00
file.c f2fs crypto: add filename encryption for roll-forward recovery 2015-05-28 15:41:55 -07:00
gc.c f2fs crypto: add encryption support in read/write paths 2015-05-28 15:41:52 -07:00
gc.h f2fs: fix sparse warnings 2015-02-11 17:04:49 -08:00
hash.c f2fs: introduce dot and dotdot name check 2015-05-28 15:41:34 -07:00
inline.c f2fs crypto: add filename encryption for f2fs_lookup 2015-05-28 15:41:54 -07:00
inode.c f2fs crypto: add symlink encryption 2015-05-28 15:41:55 -07:00
namei.c f2fs: support RENAME_WHITEOUT 2015-06-01 16:21:01 -07:00
node.c f2fs crypto: add encryption support in read/write paths 2015-05-28 15:41:52 -07:00
node.h f2fs: move existing definitions into f2fs.h 2015-05-28 15:41:27 -07:00
recovery.c f2fs crypto: add filename encryption for roll-forward recovery 2015-05-28 15:41:55 -07:00
segment.c f2fs: introduce update_meta_page 2015-06-01 16:21:00 -07:00
segment.h f2fs: introduce discard_map for f2fs_trim_fs 2015-05-28 15:41:39 -07:00
super.c f2fs crypto: split f2fs_crypto_init/exit with two parts 2015-06-01 16:20:59 -07:00
trace.c f2fs: add sbi and page pointer in f2fs_io_info 2015-05-28 15:41:32 -07:00
trace.h f2fs: add sbi and page pointer in f2fs_io_info 2015-05-28 15:41:32 -07:00
xattr.c f2fs crypto: add encryption policy and password salt support 2015-05-28 15:41:48 -07:00
xattr.h f2fs crypto: add encryption xattr support 2015-05-28 15:41:47 -07:00