]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
kclient: move inode alloc/destroy into inode.c
authorSage Weil <sage@newdream.net>
Wed, 15 Oct 2008 23:46:18 +0000 (16:46 -0700)
committerSage Weil <sage@newdream.net>
Wed, 15 Oct 2008 23:46:18 +0000 (16:46 -0700)
15 files changed:
src/kernel/caps.c
src/kernel/ceph_debug.h
src/kernel/export.c
src/kernel/file.c
src/kernel/inode.c
src/kernel/mds_client.c
src/kernel/mds_client.h
src/kernel/mon_client.c
src/kernel/mon_client.h
src/kernel/osdmap.c
src/kernel/osdmap.h
src/kernel/proc.c
src/kernel/snap.c
src/kernel/super.c
src/kernel/super.h

index 5f75c8db53b1be679bc7b658c5a59a4ced7ee40c..9c1243964380223639cdb4127e449816a301716d 100644 (file)
@@ -555,7 +555,7 @@ first:
 
        if (!is_delayed)
                __cap_delay_requeue(mdsc, ci);
-       
+
        for (p = rb_first(&ci->i_caps); p; p = rb_next(p)) {
                cap = rb_entry(p, struct ceph_cap, ci_node);
 
@@ -699,7 +699,7 @@ int ceph_get_cap_refs(struct ceph_inode_info *ci, int need, int want, int *got,
        }
        have = __ceph_caps_issued(ci, &implemented);
        /* HACK: force sync writes...
-        have &= ~CEPH_CAP_WRBUFFER;
+       have &= ~CEPH_CAP_WRBUFFER;
        implemented &= ~CEPH_CAP_WRBUFFER;
        */
        if ((have & need) == need) {
@@ -801,7 +801,7 @@ void ceph_put_wrbuffer_cap_refs(struct ceph_inode_info *ci, int nr,
        if (snapc == ci->i_snap_realm->cached_context) {
                ci->i_wrbuffer_ref_head -= nr;
                dout(30, "put_wrbuffer_cap_refs on %p head %d/%d -> %d/%d %s\n",
-                    inode, 
+                    inode,
                     ci->i_wrbuffer_ref+nr, ci->i_wrbuffer_ref_head+nr,
                     ci->i_wrbuffer_ref, ci->i_wrbuffer_ref_head,
                     last ? " LAST":"");
index e8fe0e6c58d87817760f2ddcaad4fc547abe183d..00a7f66d98d69a132ac9082b3ce881fd942400a9 100644 (file)
@@ -61,7 +61,7 @@ static struct _debug_mask_name _debug_mask_names[] = {
                {DOUT_MASK_IOCTL, "ioctl"},
                {DOUT_MASK_MDSC, "mdsc"},
                {DOUT_MASK_MDSMAP, "mdsmap"},
-               {DOUT_MASK_MSGR, "msgr"},       
+               {DOUT_MASK_MSGR, "msgr"},
                {DOUT_MASK_MON, "mon"},
                {DOUT_MASK_OSDC, "osdc"},
                {DOUT_MASK_OSDMAP, "osdmap"},
@@ -69,7 +69,7 @@ static struct _debug_mask_name _debug_mask_names[] = {
                {DOUT_MASK_SUPER, "super"},
                {DOUT_MASK_PROTOCOL, "protocol"},
                {DOUT_MASK_PROC, "proc"},
-               {0, NULL}       
+               {0, NULL}
 };
 
 static inline int ceph_get_debug_mask(char *name)
index f595ae86ea746ede5c4c45ff435ae4c7b5a248a7..296d10daca957de7c41beb06d45c6518588a1874 100644 (file)
@@ -17,7 +17,7 @@ int ceph_debug_export = -1;
 
 #define IPSZ (sizeof(struct ceph_inopath_item) / sizeof(u32))
 
-static int ceph_encode_fh(struct dentry *dentry, __u32 *rawfh, int *max_len, 
+static int ceph_encode_fh(struct dentry *dentry, __u32 *rawfh, int *max_len,
                   int connectable)
 {
        int type = 1;
@@ -28,7 +28,7 @@ static int ceph_encode_fh(struct dentry *dentry, __u32 *rawfh, int *max_len,
 
        dout(10, "encode_fh %p max_len %d u32s (%d inopath items)%s\n", dentry,
             *max_len, max, connectable ? " connectable":"");
-       
+
        if (max < 1 || (connectable && max < 2))
                return -ENOSPC;
 
@@ -72,7 +72,7 @@ static struct dentry *__fh_to_dentry(struct super_block *sb,
        if (!inode) {
                struct ceph_mds_request *req;
                derr(10, "__fh_to_dentry %llx.%x -- no inode\n", vino.ino,hash);
-               
+
                req = ceph_mdsc_create_request(mdsc,
                                               CEPH_MDS_OP_FINDINODE,
                                               len, (char *)fh, 0, NULL,
@@ -81,7 +81,7 @@ static struct dentry *__fh_to_dentry(struct super_block *sb,
                        return ERR_PTR(PTR_ERR(req));
                err = ceph_mdsc_do_request(mdsc, req);
                ceph_mdsc_put_request(req);
-               
+
                inode = ceph_find_inode(sb, vino);
                if (!inode)
                        return ERR_PTR(err ? err : -ESTALE);
@@ -97,7 +97,7 @@ static struct dentry *__fh_to_dentry(struct super_block *sb,
        }
        dout(10, "__fh_to_dentry %llx.%x -- inode %p dentry %p\n", vino.ino,
             hash, inode, dentry);
-       return dentry;  
+       return dentry;
 
 }
 
index b56f08c1914e26b1eb73cfd4ae771b08d28b12f4..b92e27ba047c9826482447b2e801e498e39041f5 100644 (file)
@@ -328,7 +328,7 @@ static void check_max_size(struct inode *inode, loff_t endoff)
 {
        struct ceph_inode_info *ci = ceph_inode(inode);
        int check = 0;
-       
+
        /* do we need to explicitly request a larger max_size? */
        spin_lock(&inode->i_lock);
        if ((endoff >= ci->i_max_size ||
@@ -393,7 +393,7 @@ retry_snap:
                                      &iocb->ki_pos);
        else
                ret = generic_file_aio_write(iocb, iov, nr_segs, pos);
-       
+
 out:
        dout(10, "aio_write %p %llu~%u  dropping cap refs on %d\n",
             inode, pos, (unsigned)iov->iov_len, got);
index 66c907279f58d72c9111afe15844bb4ed9f56717..00ede8545c27c160d6fe06a92c7b7fdf50d180ff 100644 (file)
@@ -20,6 +20,7 @@ int ceph_debug_inode = -1;
 
 static const struct inode_operations ceph_symlink_iops;
 
+
 /*
  * find or create an inode, given the ceph ino number
  */
@@ -230,6 +231,86 @@ out:
        return err;
 }
 
+
+/*
+ * initialize a newly allocated inode.
+ */
+struct inode *ceph_alloc_inode(struct super_block *sb)
+{
+       struct ceph_inode_info *ci;
+       int i;
+
+       ci = kmem_cache_alloc(ceph_inode_cachep, GFP_NOFS);
+       if (!ci)
+               return NULL;
+
+       dout(10, "alloc_inode %p\n", &ci->vfs_inode);
+
+       ci->i_version = 0;
+       ci->i_truncate_seq = 0;
+       ci->i_time_warp_seq = 0;
+       ci->i_symlink = NULL;
+
+       ci->i_lease_session = NULL;
+       ci->i_lease_mask = 0;
+       ci->i_lease_ttl = 0;
+       INIT_LIST_HEAD(&ci->i_lease_item);
+
+       ci->i_fragtree = RB_ROOT;
+       mutex_init(&ci->i_fragtree_mutex);
+
+       ci->i_xattr_len = 0;
+       ci->i_xattr_data = NULL;
+
+       ci->i_caps = RB_ROOT;
+       for (i = 0; i < CEPH_FILE_MODE_NUM; i++)
+               ci->i_nr_by_mode[i] = 0;
+       init_waitqueue_head(&ci->i_cap_wq);
+       INIT_LIST_HEAD(&ci->i_cap_snaps);
+       ci->i_snap_caps = 0;
+
+       ci->i_wanted_max_size = 0;
+       ci->i_requested_max_size = 0;
+
+       ci->i_cap_exporting_mds = 0;
+       ci->i_cap_exporting_mseq = 0;
+       ci->i_cap_exporting_issued = 0;
+
+       ci->i_rd_ref = ci->i_rdcache_ref = 0;
+       ci->i_wr_ref = 0;
+       ci->i_wrbuffer_ref = 0;
+       ci->i_wrbuffer_ref_head = 0;
+       ci->i_hold_caps_until = 0;
+       INIT_LIST_HEAD(&ci->i_cap_delay_list);
+
+       ci->i_snap_realm = NULL;
+
+       INIT_WORK(&ci->i_wb_work, ceph_inode_writeback);
+
+       ci->i_vmtruncate_to = -1;
+       INIT_WORK(&ci->i_vmtruncate_work, ceph_vmtruncate_work);
+
+       return &ci->vfs_inode;
+}
+
+void ceph_destroy_inode(struct inode *inode)
+{
+       struct ceph_inode_info *ci = ceph_inode(inode);
+       struct ceph_inode_frag *frag;
+       struct rb_node *n;
+
+       dout(30, "destroy_inode %p ino %llx.%llx\n", inode, ceph_vinop(inode));
+       kfree(ci->i_symlink);
+       while ((n = rb_first(&ci->i_fragtree)) != NULL) {
+               frag = rb_entry(n, struct ceph_inode_frag, node);
+               rb_erase(n, &ci->i_fragtree);
+               kfree(frag);
+       }
+       kfree(ci->i_xattr_data);
+       kmem_cache_free(ceph_inode_cachep, ci);
+}
+
+
 /*
  * Helper to fill in size, ctime, mtime, and atime.  We have to be
  * careful because either the client or MDS may have more up to date
@@ -450,6 +531,8 @@ out:
        return err;
 }
 
+
+
 /*
  * caller must hold session s_mutex.
  */
@@ -1134,7 +1217,7 @@ out:
        if (snapdir) {
                iput(snapdir);
                dput(parent);
-       }               
+       }
        dout(10, "readdir_prepopulate done\n");
        return err;
 }
@@ -1629,7 +1712,7 @@ static size_t _ceph_vir_xattrcb_rctime(struct ceph_inode_info *ci, char *val,
                                       size_t size)
 {
        return snprintf(val, size, "%ld.%ld", (long)ci->i_rctime.tv_sec,
-                                (long)ci->i_rctime.tv_nsec);
+                               (long)ci->i_rctime.tv_nsec);
 }
 
 static struct _ceph_vir_xattr_cb _ceph_vir_xattr_recs[] = {
index 7dc9f3504e5d5acdbcb323b7d94da58d6fb6f278..9eda153943e243b79bc6710c4ed60e533f04ecb4 100644 (file)
@@ -2025,7 +2025,7 @@ void ceph_mdsc_handle_map(struct ceph_mds_client *mdsc, struct ceph_msg *msg)
                mdsc->mdsmap = newmap;
                check_new_map(mdsc, newmap, oldmap);
                ceph_mdsmap_destroy(oldmap);
-               
+
                /* reconnect? */
                if (from < newmap->m_max_mds) {
                        newstate = ceph_mdsmap_get_state(newmap, from);
index 4d1097e9e048401d982be7ab25aa089326120ac1..a7004653568ab1783b08b8ad1906c7500de4b7c4 100644 (file)
@@ -131,7 +131,7 @@ struct ceph_mds_client {
        int                     max_sessions;  /* len of s_mds_sessions */
        int                     stopping;      /* true if shutting down */
 
-       /* 
+       /*
         * snap_rwsem will cover cap linkage into snaprealms, and realm
         * snap contexts.  (later, we can do per-realm snap contexts locks..)
         */
index 1abd2f943dd0c1f4e87f51cbd387cee4e3355bda..f599d6879449d9f5ddbf88cbb4de9833757fa259 100644 (file)
@@ -87,7 +87,7 @@ static void delayed_work(struct delayed_work *dwork, unsigned long *delay)
 
 
 /*
- * mds map 
+ * mds map
  */
 static void do_request_mdsmap(struct work_struct *work)
 {
@@ -139,7 +139,7 @@ int ceph_monc_got_mdsmap(struct ceph_mon_client *monc, __u32 got)
                dout(5, "got_mdsmap got %u > wanted %u\n",
                     got, monc->want_mdsmap);
                monc->want_mdsmap = 0;
-               
+
                /* we got map so take map request out of queue */
                cancel_delayed_work_sync(&monc->mds_delayed_work);
                monc->mds_delay = BASE_DELAY_INTERVAL;
index 3d3f84916604ad9feb4c16baee8c96e1a679190b..b32f27abde3e333efc0066a0b27e63dc9a097b65 100644 (file)
@@ -45,7 +45,7 @@ struct ceph_mon_client {
 };
 
 extern struct ceph_monmap *ceph_monmap_decode(void *p, void *end);
-extern int ceph_monmap_contains(struct ceph_monmap *m, 
+extern int ceph_monmap_contains(struct ceph_monmap *m,
                                struct ceph_entity_addr *addr);
 
 extern int ceph_monc_init(struct ceph_mon_client *monc, struct ceph_client *cl);
@@ -58,16 +58,16 @@ extern void ceph_monc_request_osdmap(struct ceph_mon_client *monc, __u32 have);
 extern int ceph_monc_got_osdmap(struct ceph_mon_client *monc, __u32 have);
 
 extern void ceph_monc_request_umount(struct ceph_mon_client *monc);
-extern void ceph_monc_report_failure(struct ceph_mon_client *monc, 
+extern void ceph_monc_report_failure(struct ceph_mon_client *monc,
                                     struct ceph_entity_inst *who);
 
-extern int ceph_monc_do_statfs(struct ceph_mon_client *monc, 
+extern int ceph_monc_do_statfs(struct ceph_mon_client *monc,
                               struct ceph_statfs *buf);
-extern void ceph_monc_handle_statfs_reply(struct ceph_mon_client *monc, 
+extern void ceph_monc_handle_statfs_reply(struct ceph_mon_client *monc,
                                          struct ceph_msg *msg);
 
 extern void ceph_monc_request_umount(struct ceph_mon_client *monc);
-extern void ceph_monc_handle_umount(struct ceph_mon_client *monc, 
+extern void ceph_monc_handle_umount(struct ceph_mon_client *monc,
                                    struct ceph_msg *msg);
 
 #endif
index ec616f777b321552c1e4e97fdbb356618ca087d8..b37f771b057a6858f9088492164cf1cfb3ed3b32 100644 (file)
@@ -542,7 +542,7 @@ struct ceph_osdmap *apply_incremental(void **p, void *end,
        /* skip new_max_snap, removed_snaps */
        *p += sizeof(__u64);
        ceph_decode_32_safe(p, end, len, bad);
-       *p += len * 2 * sizeof(__u64);  
+       *p += len * 2 * sizeof(__u64);
 
        if (*p != end) {
                derr(10, "osdmap incremental has trailing gunk?\n");
@@ -593,7 +593,7 @@ void calc_file_object_mapping(struct ceph_file_layout *layout,
        do_div(t, su);
        bl = t;
        dout(80, "off %llu / su %u = bl %u\n", off, su, bl);
-       
+
        stripeno = bl / sc;
        stripepos = bl % sc;
        objsetno = stripeno / su_per_object;
index 41c5b0523ce9be63b75a2c9867bf02378f2f4dd8..45bad6ac400a100d79515814cd273461eecfe3b8 100644 (file)
@@ -37,7 +37,7 @@ static inline int ceph_osd_is_up(struct ceph_osdmap *map, int osd)
 }
 
 static inline struct ceph_entity_addr *
-ceph_osd_addr(struct ceph_osdmap *map, int osd) 
+ceph_osd_addr(struct ceph_osdmap *map, int osd)
 {
        if (osd >= map->max_osd)
                return 0;
index f9a26ecfc8ed352d973b6e211ed930602dbf3dff..217d44c07a7722d4a126aa13bfd6d73bc1fa2966 100644 (file)
@@ -131,7 +131,7 @@ static int ceph_debug_mask_write(struct file *file, const char __user *buffer,
                                *debug &= ~mask;
                        else
                                *debug |= mask;
-       
+
                }
        } while (mask_str);
 
index c022fe196f902c5c781587be6a9ed9a88195842a..a6776f89175ed0059d66e49910d45ec8aacae883 100644 (file)
@@ -105,7 +105,7 @@ static int build_snap_context(struct ceph_snap_realm *realm)
             realm->cached_context->seq <= parent->cached_context->seq)) {
                dout(10, "build_snap_context %llx %p: %p seq %lld (%d snaps)"
                     " (unchanged)\n",
-                    realm->ino, realm, realm->cached_context, 
+                    realm->ino, realm, realm->cached_context,
                     realm->cached_context->seq,
                     realm->cached_context->num_snaps);
                return 0;
@@ -241,7 +241,7 @@ void ceph_queue_cap_snap(struct ceph_inode_info *ci,
 
                if (used & CEPH_CAP_WR) {
                        dout(10, "queue_cap_snap %p cap_snap %p snapc %p"
-                            " seq %llu used WR, now pending\n", inode, 
+                            " seq %llu used WR, now pending\n", inode,
                             capsnap, snapc, snapc->seq);
                        capsnap->writing = 1;
                } else {
@@ -287,7 +287,7 @@ more:
                struct list_head *pi;
                dout(10, "update_snap_trace updating %llx %p %lld -> %lld\n",
                     realm->ino, realm, realm->seq, le64_to_cpu(ri->seq));
-               
+
                list_for_each(pi, &realm->inodes_with_caps) {
                        struct ceph_inode_info *ci =
                                list_entry(pi, struct ceph_inode_info,
@@ -302,7 +302,7 @@ more:
 
        invalidate += adjust_snap_realm_parent(mdsc, realm,
                                              le64_to_cpu(ri->parent));
-       
+
        if (le64_to_cpu(ri->seq) > realm->seq) {
                realm->seq = le64_to_cpu(ri->seq);
                realm->created = le64_to_cpu(ri->created);
@@ -311,7 +311,7 @@ more:
                realm->num_snaps = le32_to_cpu(ri->num_snaps);
                if (dup_array(&realm->snaps, snaps, realm->num_snaps) < 0)
                        goto fail;
-               
+
                realm->num_prior_parent_snaps =
                        le32_to_cpu(ri->num_prior_parent_snaps);
                if (dup_array(&realm->prior_parent_snaps, prior_parent_snaps,
@@ -337,7 +337,7 @@ bad:
        err = -EINVAL;
 fail:
        derr(10, "update_snap_trace error %d\n", err);
-       return ERR_PTR(err);    
+       return ERR_PTR(err);
 }
 
 
index 5e8e2805e92bfeebb1b9c1deadfc95445e5534fe..f1b8f43daed7c83e3e01cbfa2daa56d6dea03c70 100644 (file)
@@ -153,84 +153,9 @@ static int ceph_show_options(struct seq_file *m, struct vfsmount *mnt)
 /*
  * inode cache
  */
-static struct kmem_cache *ceph_inode_cachep;
+struct kmem_cache *ceph_inode_cachep;
 
-static struct inode *ceph_alloc_inode(struct super_block *sb)
-{
-       struct ceph_inode_info *ci;
-       int i;
-
-       ci = kmem_cache_alloc(ceph_inode_cachep, GFP_NOFS);
-       if (!ci)
-               return NULL;
-
-       dout(10, "alloc_inode %p vfsi %p\n", ci, &ci->vfs_inode);
-
-       ci->i_version = 0;
-       ci->i_truncate_seq = 0;
-       ci->i_time_warp_seq = 0;
-       ci->i_symlink = NULL;
-
-       ci->i_lease_session = NULL;
-       ci->i_lease_mask = 0;
-       ci->i_lease_ttl = 0;
-       INIT_LIST_HEAD(&ci->i_lease_item);
-
-       ci->i_fragtree = RB_ROOT;
-       mutex_init(&ci->i_fragtree_mutex);
-
-       ci->i_xattr_len = 0;
-       ci->i_xattr_data = NULL;
-
-       ci->i_caps = RB_ROOT;
-       for (i = 0; i < CEPH_FILE_MODE_NUM; i++)
-               ci->i_nr_by_mode[i] = 0;
-       init_waitqueue_head(&ci->i_cap_wq);
-       INIT_LIST_HEAD(&ci->i_cap_snaps);
-       ci->i_snap_caps = 0;
-
-       ci->i_wanted_max_size = 0;
-       ci->i_requested_max_size = 0;
-
-       ci->i_cap_exporting_mds = 0;
-       ci->i_cap_exporting_mseq = 0;
-       ci->i_cap_exporting_issued = 0;
-
-       ci->i_rd_ref = ci->i_rdcache_ref = 0;
-       ci->i_wr_ref = 0;
-       ci->i_wrbuffer_ref = 0;
-       ci->i_wrbuffer_ref_head = 0;
-       ci->i_hold_caps_until = 0;
-       INIT_LIST_HEAD(&ci->i_cap_delay_list);
-
-       ci->i_snap_realm = NULL;
-
-       INIT_WORK(&ci->i_wb_work, ceph_inode_writeback);
-
-       ci->i_vmtruncate_to = -1;
-       INIT_WORK(&ci->i_vmtruncate_work, ceph_vmtruncate_work);
-
-       return &ci->vfs_inode;
-}
-
-static void ceph_destroy_inode(struct inode *inode)
-{
-       struct ceph_inode_info *ci = ceph_inode(inode);
-       struct ceph_inode_frag *frag;
-       struct rb_node *n;
-       
-       dout(30, "destroy_inode %p ino %llx.%llx\n", inode, ceph_vinop(inode));
-       kfree(ci->i_symlink);
-       while ((n = rb_first(&ci->i_fragtree)) != NULL) {
-               frag = rb_entry(n, struct ceph_inode_frag, node);
-               rb_erase(n, &ci->i_fragtree);
-               kfree(frag);
-       }
-       kfree(ci->i_xattr_data);
-       kmem_cache_free(ceph_inode_cachep, ci);
-}
-
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
 static void init_once(void *foo)
 #else
 static void init_once(struct kmem_cache *cachep, void *foo)
@@ -331,14 +256,12 @@ static void handle_monmap(struct ceph_client *client, struct ceph_msg *msg)
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)
                client->client_kobj = kobject_create_and_add(name, ceph_kobj);
-               //client->fsid_kobj = kobject_create_and_add("fsid", 
+               //client->fsid_kobj = kobject_create_and_add("fsid",
                //client->client_kobj);
 #endif
        }
 }
 
-
-
 const char *ceph_msg_type_name(int type)
 {
        switch (type) {
@@ -391,7 +314,6 @@ void ceph_peer_reset(void *p, struct ceph_entity_addr *peer_addr,
 /*
  * mount options
  */
-
 enum {
        Opt_fsidmajor,
        Opt_fsidminor,
@@ -821,7 +743,7 @@ static int ceph_mount(struct ceph_client *client, struct vfsmount *mnt,
                client->msgr->prepare_pages = ceph_osdc_prepare_pages;
                client->msgr->peer_reset = ceph_peer_reset;
        }
-       
+
        while (!have_all_maps(client)) {
                err = -EIO;
                if (timeout && time_after_eq(jiffies, started + timeout))
@@ -1151,7 +1073,7 @@ static int __init init_ceph(void)
        return 0;
 
 out_icache:
-       destroy_inodecache();   
+       destroy_inodecache();
 out_msgr:
        ceph_msgr_exit();
 out_proc:
index 6b49ec4b816b9d415c9281ba896775a73cf04e5c..53603819ecbd11bb54d3bc1c1cb98f484c07d1fe 100644 (file)
@@ -143,7 +143,7 @@ struct ceph_client {
 
        struct super_block *sb;
 
-       unsigned long mount_state; 
+       unsigned long mount_state;
        wait_queue_head_t mount_wq;
 
        struct ceph_messenger *msgr;   /* messenger instance */
@@ -269,7 +269,7 @@ struct ceph_inode_info {
        unsigned i_cap_exporting_issued;
        struct list_head i_cap_snaps;   /* snapped state pending flush to mds */
        unsigned i_snap_caps;           /* cap bits for snapped files */
-       
+
        int i_nr_by_mode[CEPH_FILE_MODE_NUM];  /* open file counts */
 
        loff_t i_max_size;            /* max file size authorized by mds */
@@ -539,7 +539,7 @@ static inline void ceph_put_snap_context(struct ceph_snap_context *sc)
  * are organized into a hierarchy, such that children inherit (some of)
  * the snapshots of their parents.
  *
- * All inodes within the realm that have capabilities are linked into a 
+ * All inodes within the realm that have capabilities are linked into a
  * per-realm list.
  */
 struct ceph_snap_realm {
@@ -553,7 +553,7 @@ struct ceph_snap_realm {
        int num_prior_parent_snaps;   /*  had prior to parent_since */
        u64 *snaps;                   /* snaps specific to this realm */
        int num_snaps;
-       
+
        struct ceph_snap_realm *parent;
        struct list_head children;       /* list of child realms */
        struct list_head child_item;
@@ -608,6 +608,10 @@ extern const char *ceph_msg_type_name(int type);
 
 /* inode.c */
 extern const struct inode_operations ceph_file_iops;
+extern struct kmem_cache *ceph_inode_cachep;
+
+extern struct inode *ceph_alloc_inode(struct super_block *sb);
+extern void ceph_destroy_inode(struct inode *inode);
 
 extern struct inode *ceph_get_inode(struct super_block *sb,
                                    struct ceph_vino vino);
@@ -685,8 +689,8 @@ extern struct dentry_operations ceph_dentry_ops, ceph_snap_dentry_ops,
        ceph_snapdir_dentry_ops;
 
 extern char *ceph_build_path(struct dentry *dn, int *len, __u64 *base, int min);
-extern struct dentry *ceph_do_lookup(struct super_block *sb, 
-                                    struct dentry *dentry, 
+extern struct dentry *ceph_do_lookup(struct super_block *sb,
+                                    struct dentry *dentry,
                                     int mask, int on_inode, int locked_dir);
 extern struct dentry *ceph_finish_lookup(struct ceph_mds_request *req,
                                         struct dentry *dentry, int err);