]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
kclient: small inode cleanups
authorSage Weil <sage@newdream.net>
Mon, 20 Jul 2009 23:17:53 +0000 (16:17 -0700)
committerSage Weil <sage@newdream.net>
Mon, 20 Jul 2009 23:24:05 +0000 (16:24 -0700)
src/TODO
src/kernel/inode.c
src/kernel/super.h

index 5b88a29efe031cead05d1f5aeff781f91944c03f..dc2933433dd96773d195419737bbebdca07e2c70 100644 (file)
--- a/src/TODO
+++ b/src/TODO
@@ -35,7 +35,7 @@ kclient review
 - andi
 /  - server-specified max file size
 /  - pr_debug
-  - top of file comments
+/  - top of file comments
 - test nfs export
 
 bugs
index b81b7c45402d5286dcede9730bb1bd987c840a68..7a0c578f15aa9b3049b52e43d4f47696d5dc1e92 100644 (file)
@@ -27,7 +27,6 @@
 static const struct inode_operations ceph_symlink_iops;
 
 static void ceph_inode_invalidate_pages(struct work_struct *work);
-
 static void __destroy_xattrs(struct ceph_inode_info *ci);
 
 /*
@@ -75,7 +74,6 @@ struct inode *ceph_get_snapdir(struct inode *parent)
        return inode;
 }
 
-
 const struct inode_operations ceph_file_iops = {
        .permission = ceph_permission,
        .setattr = ceph_setattr,
@@ -88,10 +86,11 @@ const struct inode_operations ceph_file_iops = {
 
 
 /*
- * We use a 'frag tree' to keep track of the cluster's directory
- * fragments for a given inode.  We need to know when a child frag is
- * delegated to a new MDS, or when it is flagged as replicated, so we
- * can direct our requests accordingly.
+ * We use a 'frag tree' to keep track of the MDS's directory fragments
+ * for a given inode (usually there is just a single fragment).  We
+ * need to know when a child frag is delegated to a new MDS, or when
+ * it is flagged as replicated, so we can direct our requests
+ * accordingly.
  */
 
 /*
@@ -135,7 +134,6 @@ static struct ceph_inode_frag *__get_or_create_frag(struct ceph_inode_info *ci,
 
        dout("get_or_create_frag added %llx.%llx frag %x\n",
             ceph_vinop(&ci->vfs_inode), f);
-
        return frag;
 }
 
@@ -145,8 +143,8 @@ static struct ceph_inode_frag *__get_or_create_frag(struct ceph_inode_info *ci,
  * it is present.
  */
 u32 ceph_choose_frag(struct ceph_inode_info *ci, u32 v,
-                      struct ceph_inode_frag *pfrag,
-                      int *found)
+                    struct ceph_inode_frag *pfrag,
+                    int *found)
 {
        u32 t = frag_make(0, 0);
        struct ceph_inode_frag *frag;
@@ -368,9 +366,9 @@ void ceph_destroy_inode(struct inode *inode)
  * Helpers 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
  * info, depending on which capabilities are held, and whether
- * time_warp_seq or truncate_seq have increased.  Ordinarily, mtime
+ * time_warp_seq or truncate_seq have increased.  (Ordinarily, mtime
  * and size are monotonically increasing, except when utimes() or
- * truncate() increments the corresponding _seq values on the MDS.
+ * truncate() increments the corresponding _seq values.)
  */
 int ceph_fill_file_size(struct inode *inode, int issued,
                        u32 truncate_seq, u64 truncate_size, u64 size)
index 76275060ed34cdabe10e2e3c0bca2806ecba9027..bf5c6b245e1b6ffdba5c2847d2d12064f3fa48d7 100644 (file)
@@ -449,7 +449,7 @@ static inline loff_t ceph_make_fpos(unsigned frag, unsigned off)
 /*
  * ino_t is <64 bits on many architectures, blech.
  *
- * don't include snap in ino hash, at leaset for now.
+ * don't include snap in ino hash, at least for now.
  */
 static inline ino_t ceph_vino_to_ino(struct ceph_vino vino)
 {