Add -P option to preserve file owner
authorDaniel Abrecht <linux-f2fs-devel@nodmarc.danielabrecht.ch>
Mon, 15 Mar 2021 22:08:53 +0000 (22:08 +0000)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 18 Mar 2021 16:55:14 +0000 (09:55 -0700)
commit80dba0f97549d5fc45ea1530a02da51c5908082c
tree243bfd1a5b64fb390f39a8ccf8693d9538a505b8
parentf0fda11925abef7fd2525a4324cd10d97ee7da4d
Add -P option to preserve file owner

I use user namespaces & debootstrap to bootstrap a system, and then
copy that into an image using sload.f2fs. However, without an option to
preserve the owner user & group of files, some files end up being owned
by the wrong user / group (0:0), which causes all kinds of other issues

This patch adds an option -P to preserve the user and group of files.

Signed-off-by: Daniel Abrecht <public@danielabrecht.ch>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fsck/main.c
fsck/sload.c
include/f2fs_fs.h
man/sload.f2fs.8