struct inode *inode;
struct dentry *dentry;
- inode = ceph_get_inode(sb, ino);
+ inode = ceph_find_inode(sb, ino);
if (!inode) {
- dout(10, "fh_to_dentry %llx.%d -- no inode\n", ino, gen);
+ derr(10, "fh_to_dentry %llx.%d -- no inode\n", ino, gen);
return ERR_PTR(-ESTALE);
}
if (inode->i_generation != fh[2]) {
- dout(10, "fh_to_dentry %llx.%d -- %p bad gen %d\n", ino, gen,
+ derr(10, "fh_to_dentry %llx.%d -- %p gen is %d\n", ino, gen,
inode, inode->i_generation);
iput(inode);
return ERR_PTR(-ESTALE);
dentry = d_alloc_anon(inode);
if (!dentry) {
- dout(10, "fh_to_dentry %llx.%d -- inode %p but ENOMEM\n",
+ derr(10, "fh_to_dentry %llx.%d -- inode %p but ENOMEM\n",
ino, gen, inode);
iput(inode);
return ERR_PTR(-ENOMEM);
return ERR_PTR(-ESTALE);
gen = fh[5];
- inode = ceph_get_inode(sb, ino);
+ inode = ceph_find_inode(sb, ino);
if (!inode) {
- dout(10, "fh_to_parent %llx.%d -- no inode\n", ino, gen);
+ derr(10, "fh_to_parent %llx.%d -- no inode\n", ino, gen);
return ERR_PTR(-ESTALE);
}
if (inode->i_generation != gen) {
- dout(10, "fh_to_parent %llx.%d -- %p bad gen %d\n", ino, gen,
+ derr(10, "fh_to_parent %llx.%d -- %p gen is %d\n", ino, gen,
inode, inode->i_generation);
iput(inode);
return ERR_PTR(-ESTALE);
dentry = d_alloc_anon(inode);
if (!dentry) {
- dout(10, "fh_to_parent %llx.%d -- inode %p but ENOMEM\n",
+ derr(10, "fh_to_parent %llx.%d -- inode %p but ENOMEM\n",
ino, gen, inode);
iput(inode);
return ERR_PTR(-ENOMEM);
return (ci->i_ceph_ino == ino);
}
+static inline struct inode *ceph_find_inode(struct super_block *sb, __u64 ino)
+{
+ ino_t inot = ceph_ino_to_ino(ino);
+ return ilookup5(sb, inot, ceph_ino_compare, &ino);
+}
+
+
/*
* caps helpers
*/
/* inode.c */
extern const struct inode_operations ceph_file_iops;
extern const struct inode_operations ceph_special_iops;
+extern struct inode *ceph_get_inode(struct super_block *sb, __u64 ino);
extern struct inode *ceph_get_inode(struct super_block *sb, u64 ino);
extern int ceph_fill_inode(struct inode *inode,
struct ceph_mds_reply_inode *info);