@@ -110,11 +110,6 @@ struct inode *search_inode_for_lustre(struct super_block *sb,
return inode;
}
-struct lustre_nfs_fid {
- struct lu_fid lnf_child;
- struct lu_fid lnf_parent;
-};
-
static struct dentry *
ll_iget_for_nfs(struct super_block *sb,
struct lu_fid *fid, struct lu_fid *parent)
@@ -177,8 +172,8 @@ struct lustre_nfs_fid {
static int ll_encode_fh(struct inode *inode, u32 *fh, int *plen,
struct inode *parent)
{
- int fileid_len = sizeof(struct lustre_nfs_fid) / 4;
- struct lustre_nfs_fid *nfs_fid = (void *)fh;
+ int fileid_len = sizeof(struct lustre_file_handle) / 4;
+ struct lustre_file_handle *lfh = (void *)fh;
CDEBUG(D_INFO, "%s: encoding for (" DFID ") maxlen=%d minlen=%d\n",
ll_i2sbi(inode)->ll_fsname,
@@ -189,11 +184,11 @@ static int ll_encode_fh(struct inode *inode, u32 *fh, int *plen,
return FILEID_INVALID;
}
- nfs_fid->lnf_child = *ll_inode2fid(inode);
+ lfh->lfh_child = *ll_inode2fid(inode);
if (parent)
- nfs_fid->lnf_parent = *ll_inode2fid(parent);
+ lfh->lfh_parent = *ll_inode2fid(parent);
else
- fid_zero(&nfs_fid->lnf_parent);
+ fid_zero(&lfh->lfh_parent);
*plen = fileid_len;
return FILEID_LUSTRE;
@@ -264,23 +259,23 @@ static int ll_get_name(struct dentry *dentry, char *name,
static struct dentry *ll_fh_to_dentry(struct super_block *sb, struct fid *fid,
int fh_len, int fh_type)
{
- struct lustre_nfs_fid *nfs_fid = (struct lustre_nfs_fid *)fid;
+ struct lustre_file_handle *lfh = (struct lustre_file_handle *)fid;
if (fh_type != FILEID_LUSTRE)
return ERR_PTR(-EPROTO);
- return ll_iget_for_nfs(sb, &nfs_fid->lnf_child, &nfs_fid->lnf_parent);
+ return ll_iget_for_nfs(sb, &lfh->lfh_child, &lfh->lfh_parent);
}
static struct dentry *ll_fh_to_parent(struct super_block *sb, struct fid *fid,
int fh_len, int fh_type)
{
- struct lustre_nfs_fid *nfs_fid = (struct lustre_nfs_fid *)fid;
+ struct lustre_file_handle *lfh = (struct lustre_file_handle *)fid;
if (fh_type != FILEID_LUSTRE)
return ERR_PTR(-EPROTO);
- return ll_iget_for_nfs(sb, &nfs_fid->lnf_parent, NULL);
+ return ll_iget_for_nfs(sb, &lfh->lfh_parent, NULL);
}
int ll_dir_get_parent_fid(struct inode *dir, struct lu_fid *parent_fid)
@@ -164,6 +164,12 @@ static inline bool fid_is_zero(const struct lu_fid *fid)
return !fid->f_seq && !fid->f_oid;
}
+/* The data name_to_handle_at() places in a struct file_handle (at f_handle) */
+struct lustre_file_handle {
+ struct lu_fid lfh_child;
+ struct lu_fid lfh_parent;
+};
+
struct ost_layout {
__u32 ol_stripe_size;
__u32 ol_stripe_count;