cephfs linux kernel client针对export的操作
const struct export_operations ceph_export_ops = { .encode_fh = ceph_encode_fh, .fh_to_dentry = ceph_fh_to_dentry, .fh_to_parent = ceph_fh_to_parent, .get_parent = ceph_get_parent, .get_name = ceph_get_name, }; ceph_encode_fh(struct inode *inode, u32 *rawfh, int *max_len, struct inode *parent_inode) |__调用ceph_snap(inode)函数检查inode是否包含snap信息,若包含snap则直接返回 |__输入参数校验 |__若parent_inode不为空且max_len小于sizeof(struct ceph_nfs_confh)/4 |__设置max_len=sizeof(struct ceph_nfs_confh)/4 |__直接返回 |__若parent_inode为空且max_len小于sizeof(struct ceph_nfs_fh)/4 |__设置max_len=sizeof(struct ceph_nfs_fh)/4 |__直接返回 |__若parent