erofs: make filesystem exportable
authorHongnan Li <hongnan.li@linux.alibaba.com>
Mon, 25 Apr 2022 04:07:12 +0000 (12:07 +0800)
committerGao Xiang <hsiangkao@linux.alibaba.com>
Tue, 17 May 2022 15:48:54 +0000 (23:48 +0800)
commit3e917cc305c6df350af5ad5c40d56e3e48b42281
tree191163e829aa121d9097c19eb7f2018bd9d791ed
parentdcbe6803fffd387f72b48c2373b5f5ed12a5804b
erofs: make filesystem exportable

Implement export operations in order to make EROFS support accessing
inodes with filehandles so that it can be exported via NFS and used
by overlayfs.

Without this patch, 'exportfs -rv' will report:
exportfs: /root/erofs_mp does not support NFS export

Also tested with unionmount-testsuite and the testcase below passes now:
./run --ov --erofs --verify hard-link

For more details about the testcase, see:
https://github.com/amir73il/unionmount-testsuite/pull/6

Signed-off-by: Hongnan Li <hongnan.li@linux.alibaba.com>
Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Link: https://lore.kernel.org/r/20220425040712.91685-1-hongnan.li@linux.alibaba.com
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
fs/erofs/internal.h
fs/erofs/namei.c
fs/erofs/super.c