diff options
author | Amir Goldstein <amir73il@gmail.com> | 2023-05-02 15:48:14 +0300 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2023-05-22 19:08:37 +0300 |
commit | b52878275ce54b5d3a654ed24dfb169c1c501998 (patch) | |
tree | a494327692f37aad51321c8a0c5c0e18e76ea65e /include/linux/exportfs.h | |
parent | f1fcbaa18b28dec10281551dfe6ed3a3ed80e3d6 (diff) | |
download | linux-b52878275ce54b5d3a654ed24dfb169c1c501998.tar.xz |
exportfs: change connectable argument to bit flags
Convert the bool connectable arguemnt into a bit flags argument and
define the EXPORT_FS_CONNECTABLE flag as a requested property of the
file handle.
We are going to add a flag for requesting non-decodeable file handles.
Acked-by: Jeff Layton <jlayton@kernel.org>
Acked-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Message-Id: <20230502124817.3070545-2-amir73il@gmail.com>
Diffstat (limited to 'include/linux/exportfs.h')
-rw-r--r-- | include/linux/exportfs.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/exportfs.h b/include/linux/exportfs.h index 9edb29101ec8..fe4967ba61b2 100644 --- a/include/linux/exportfs.h +++ b/include/linux/exportfs.h @@ -135,6 +135,8 @@ struct fid { }; }; +#define EXPORT_FH_CONNECTABLE 0x1 /* Encode file handle with parent */ + /** * struct export_operations - for nfsd to communicate with file systems * @encode_fh: encode a file handle fragment from a dentry @@ -150,7 +152,7 @@ struct fid { * encode_fh: * @encode_fh should store in the file handle fragment @fh (using at most * @max_len bytes) information that can be used by @decode_fh to recover the - * file referred to by the &struct dentry @de. If the @connectable flag is + * file referred to by the &struct dentry @de. If @flag has CONNECTABLE bit * set, the encode_fh() should store sufficient information so that a good * attempt can be made to find not only the file but also it's place in the * filesystem. This typically means storing a reference to de->d_parent in @@ -227,7 +229,7 @@ struct export_operations { extern int exportfs_encode_inode_fh(struct inode *inode, struct fid *fid, int *max_len, struct inode *parent); extern int exportfs_encode_fh(struct dentry *dentry, struct fid *fid, - int *max_len, int connectable); + int *max_len, int flags); extern struct dentry *exportfs_decode_fh_raw(struct vfsmount *mnt, struct fid *fid, int fh_len, int fileid_type, |