#include <linux/ceph/ceph_debug.h>
#include <linux/exportfs.h>
#include <asm/unaligned.h>
} __attribute__ ((packed));
} __attribute__ ((packed));
static int ceph_encode_fh(struct inode *inode, u32 *rawfh, int *max_len,
struct inode *parent_inode)
struct ceph_nfs_fh *fh = (void *)rawfh;
struct ceph_nfs_confh *cfh = (void *)rawfh;
int connected_handle_length = sizeof(*cfh)/4;
int handle_length = sizeof(*fh)/4;
if (ceph_snap(inode) != CEPH_NOSNAP)
if (parent_inode && (*max_len < connected_handle_length)) {
*max_len = connected_handle_length;
} else if (*max_len < handle_length) {
*max_len = handle_length;
dout("encode_fh %llx with parent %llx\n",
ceph_ino(inode), ceph_ino(parent_inode));
cfh->ino = ceph_ino(inode);
cfh->parent_ino = ceph_ino(parent_inode);
*max_len = connected_handle_length;
type = FILEID_INO32_GEN_PARENT;
dout("encode_fh %llx\n", ceph_ino(inode));
fh->ino = ceph_ino(inode);
*max_len = handle_length;
static struct dentry *__fh_to_dentry(struct super_block *sb, u64 ino)