diff options
author | Hongnan Li <hongnan.li@linux.alibaba.com> | 2022-04-25 07:07:12 +0300 |
---|---|---|
committer | Gao Xiang <hsiangkao@linux.alibaba.com> | 2022-05-17 18:48:54 +0300 |
commit | 3e917cc305c6df350af5ad5c40d56e3e48b42281 (patch) | |
tree | 191163e829aa121d9097c19eb7f2018bd9d791ed /fs/erofs/namei.c | |
parent | dcbe6803fffd387f72b48c2373b5f5ed12a5804b (diff) | |
download | linux-3e917cc305c6df350af5ad5c40d56e3e48b42281.tar.xz |
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>
Diffstat (limited to 'fs/erofs/namei.c')
-rw-r--r-- | fs/erofs/namei.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/erofs/namei.c b/fs/erofs/namei.c index 554efa363317..fd75506799c4 100644 --- a/fs/erofs/namei.c +++ b/fs/erofs/namei.c @@ -165,9 +165,8 @@ out: /* free if the candidate is valid */ return candidate; } -int erofs_namei(struct inode *dir, - struct qstr *name, - erofs_nid_t *nid, unsigned int *d_type) +int erofs_namei(struct inode *dir, const struct qstr *name, erofs_nid_t *nid, + unsigned int *d_type) { int ndirents; struct erofs_buf buf = __EROFS_BUF_INITIALIZER; |