Whamcloud - gitweb
rename create_data_object to something less ugly
authornikita <nikita>
Sat, 5 Aug 2006 10:08:19 +0000 (10:08 +0000)
committernikita <nikita>
Sat, 5 Aug 2006 10:08:19 +0000 (10:08 +0000)
lustre/cmm/cmm_object.c
lustre/include/md_object.h
lustre/kernel_patches/patches/ext3-iam-separate.patch
lustre/kernel_patches/patches/ext3-iam-uapi.patch
lustre/mdd/mdd_handler.c
lustre/mdt/mdt_open.c
lustre/tests/sanity.sh

index 54aa5db..60811cc 100644 (file)
@@ -365,15 +365,15 @@ static int cml_create(const struct lu_context *ctx, struct md_object *mo_p,
         RETURN(rc);
 }
 
-static int cml_create_data_object(const struct lu_context *ctx,
-                                  struct md_object *p, struct md_object *o,
-                                  const void *eadata, int eadatalen,
-                                  struct md_attr *ma)
+static int cml_create_data(const struct lu_context *ctx,
+                           struct md_object *p, struct md_object *o,
+                           const void *eadata, int eadatalen,
+                           struct md_attr *ma)
 {
         int rc;
         ENTRY;
-        rc = mdo_create_data_object(ctx, md_object_next(p), md_object_next(o),
-                                    eadata, eadatalen, ma);
+        rc = mdo_create_data(ctx, md_object_next(p), md_object_next(o),
+                             eadata, eadatalen, ma);
         RETURN(rc);
 }
 
@@ -454,7 +454,7 @@ static struct md_dir_operations cml_dir_ops = {
         .mdo_name_insert = cml_name_insert,
         .mdo_rename      = cml_rename,
         .mdo_rename_tgt  = cml_rename_tgt,
-        .mdo_create_data_object = cml_create_data_object,
+        .mdo_create_data = cml_create_data
 };
 
 /* -------------------------------------------------------------------
index 3c30766..9bb8c01 100644 (file)
@@ -114,10 +114,9 @@ struct md_dir_operations {
                           const char *target_name, const void *eadata,
                           int eadatalen, struct md_attr *);
         /* This method is used for creating data object for this meta object*/
-        int (*mdo_create_data_object)(const struct lu_context *cx, 
-                                      struct md_object *p, struct md_object *o,
-                                       const void *eadata, int eadatalen,
-                                       struct md_attr *ma);
+        int (*mdo_create_data)(const struct lu_context *cx, struct md_object *p,
+                               struct md_object *o, const void *eadata,
+                               int eadatalen, struct md_attr *ma);
         int (*mdo_rename)(const struct lu_context *ctxt,
                           struct md_object *spobj, struct md_object *tpobj,
                           const struct lu_fid *lf, const char *sname,
@@ -157,7 +156,7 @@ enum md_upcall_event {
 
 struct md_upcall {
         struct md_device            *mu_upcall_dev;
-        int (*mu_upcall)(const struct lu_context *ctxt, struct md_device *md, 
+        int (*mu_upcall)(const struct lu_context *ctxt, struct md_device *md,
                          enum md_upcall_event ev);
 };
 
@@ -319,21 +318,20 @@ static inline int mdo_lookup(const struct lu_context *cx, struct md_object *p,
 
 static inline int mdo_create(const struct lu_context *cx, struct md_object *p,
                              const char *child_name, struct md_object *c,
-                             const char *target_name, const void *eadata, 
+                             const char *target_name, const void *eadata,
                              int eadatalen, struct md_attr *at)
 {
         LASSERT(c->mo_dir_ops->mdo_create);
-        return c->mo_dir_ops->mdo_create(cx, p, child_name, c, target_name, 
+        return c->mo_dir_ops->mdo_create(cx, p, child_name, c, target_name,
                                          eadata, eadatalen, at);
 }
-static inline int mdo_create_data_object(const struct lu_context *cx, 
-                                       struct md_object *p, struct md_object *c,
-                                       const void *eadata, int eadatalen,
-                                       struct md_attr *ma)
+static inline int mdo_create_data(const struct lu_context *cx,
+                                  struct md_object *p, struct md_object *c,
+                                  const void *eadata, int eadatalen,
+                                  struct md_attr *ma)
 {
-        LASSERT(c->mo_dir_ops->mdo_create_data_object);
-        return c->mo_dir_ops->mdo_create_data_object(cx, p, c, eadata, 
-                                                     eadatalen, ma);
+        LASSERT(c->mo_dir_ops->mdo_create_data);
+        return c->mo_dir_ops->mdo_create_data(cx, p, c, eadata, eadatalen, ma);
 }
 
 static inline int mdo_rename(const struct lu_context *cx,
index f89ab7a..614df00 100644 (file)
@@ -1,7 +1,7 @@
 Index: iam/fs/ext3/Makefile
 ===================================================================
 --- iam.orig/fs/ext3/Makefile  2006-05-31 20:24:32.000000000 +0400
-+++ iam/fs/ext3/Makefile       2006-07-28 20:55:09.000000000 +0400
++++ iam/fs/ext3/Makefile       2006-08-05 13:57:49.000000000 +0400
 @@ -6,7 +6,7 @@ obj-$(CONFIG_EXT3_FS) += ext3.o
  
  ext3-y        := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o iopen.o \
@@ -5461,7 +5461,7 @@ Index: iam/fs/ext3/namei.c
 Index: iam/include/linux/lustre_iam.h
 ===================================================================
 --- iam.orig/include/linux/lustre_iam.h        2006-05-31 20:24:32.000000000 +0400
-+++ iam/include/linux/lustre_iam.h     2006-07-28 20:55:09.000000000 +0400
++++ iam/include/linux/lustre_iam.h     2006-08-05 13:57:49.000000000 +0400
 @@ -1,9 +1,68 @@
 +/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
 + * vim:expandtab:shiftwidth=8:tabstop=8:
index ad82ce0..dd25554 100644 (file)
@@ -1,7 +1,7 @@
 Index: iam/fs/ext3/Makefile
 ===================================================================
---- iam.orig/fs/ext3/Makefile  2006-07-28 20:55:09.000000000 +0400
-+++ iam/fs/ext3/Makefile       2006-07-28 20:55:10.000000000 +0400
+--- iam.orig/fs/ext3/Makefile  2006-08-05 13:57:49.000000000 +0400
++++ iam/fs/ext3/Makefile       2006-08-05 13:57:50.000000000 +0400
 @@ -6,7 +6,7 @@ obj-$(CONFIG_EXT3_FS) += ext3.o
  
  ext3-y        := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o iopen.o \
@@ -13,8 +13,8 @@ Index: iam/fs/ext3/Makefile
  ext3-$(CONFIG_EXT3_FS_POSIX_ACL) += acl.o
 Index: iam/fs/ext3/dir.c
 ===================================================================
---- iam.orig/fs/ext3/dir.c     2006-07-28 20:55:09.000000000 +0400
-+++ iam/fs/ext3/dir.c  2006-07-28 20:55:10.000000000 +0400
+--- iam.orig/fs/ext3/dir.c     2006-08-05 13:57:49.000000000 +0400
++++ iam/fs/ext3/dir.c  2006-08-05 13:57:50.000000000 +0400
 @@ -28,6 +28,7 @@
  #include <linux/smp_lock.h>
  #include <linux/slab.h>
@@ -112,8 +112,8 @@ Index: iam/fs/ext3/dir.c
                    (filp->f_version != inode->i_version)) {
 Index: iam/fs/ext3/file.c
 ===================================================================
---- iam.orig/fs/ext3/file.c    2006-07-28 20:55:09.000000000 +0400
-+++ iam/fs/ext3/file.c 2006-07-28 20:55:10.000000000 +0400
+--- iam.orig/fs/ext3/file.c    2006-08-05 13:57:49.000000000 +0400
++++ iam/fs/ext3/file.c 2006-08-05 13:57:50.000000000 +0400
 @@ -23,6 +23,7 @@
  #include <linux/jbd.h>
  #include <linux/ext3_fs.h>
@@ -149,7 +149,7 @@ Index: iam/fs/ext3/file.c
 Index: iam/fs/ext3/iam-uapi.c
 ===================================================================
 --- iam.orig/fs/ext3/iam-uapi.c        2004-04-06 17:27:52.000000000 +0400
-+++ iam/fs/ext3/iam-uapi.c     2006-07-28 20:55:10.000000000 +0400
++++ iam/fs/ext3/iam-uapi.c     2006-08-05 13:57:50.000000000 +0400
 @@ -0,0 +1,361 @@
 +/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
 + * vim:expandtab:shiftwidth=8:tabstop=8:
@@ -514,8 +514,8 @@ Index: iam/fs/ext3/iam-uapi.c
 +}
 Index: iam/fs/ext3/ioctl.c
 ===================================================================
---- iam.orig/fs/ext3/ioctl.c   2006-07-28 20:55:09.000000000 +0400
-+++ iam/fs/ext3/ioctl.c        2006-07-28 20:55:10.000000000 +0400
+--- iam.orig/fs/ext3/ioctl.c   2006-08-05 13:57:49.000000000 +0400
++++ iam/fs/ext3/ioctl.c        2006-08-05 13:57:50.000000000 +0400
 @@ -250,6 +250,6 @@ flags_err:
  
  
@@ -526,8 +526,8 @@ Index: iam/fs/ext3/ioctl.c
  }
 Index: iam/include/linux/lustre_iam.h
 ===================================================================
---- iam.orig/include/linux/lustre_iam.h        2006-07-28 20:55:09.000000000 +0400
-+++ iam/include/linux/lustre_iam.h     2006-07-28 20:55:10.000000000 +0400
+--- iam.orig/include/linux/lustre_iam.h        2006-08-05 13:57:49.000000000 +0400
++++ iam/include/linux/lustre_iam.h     2006-08-05 13:57:50.000000000 +0400
 @@ -30,9 +30,6 @@
  #ifndef __LINUX_LUSTRE_IAM_H__
  #define __LINUX_LUSTRE_IAM_H__
index ce8c1a5..a53a440 100644 (file)
@@ -940,10 +940,10 @@ static int __mdd_object_initialize(const struct lu_context *ctxt,
         return rc;
 }
 
-static int mdd_create_data_object(const struct lu_context *ctxt,
-                                 struct md_object *pobj, struct md_object *cobj,
-                                 const void *eadata, int eadatasize,
-                                 struct md_attr *ma)
+static int mdd_create_data(const struct lu_context *ctxt,
+                           struct md_object *pobj, struct md_object *cobj,
+                           const void *eadata, int eadatasize,
+                           struct md_attr *ma)
 {
         struct mdd_device *mdd = mdo2mdd(pobj);
         struct mdd_object *mdo = md2mdd_obj(pobj);
@@ -1370,7 +1370,7 @@ static struct md_dir_operations mdd_dir_ops = {
         .mdo_name_insert   = mdd_mkname,
         .mdo_name_remove   = mdd_name_remove,
         .mdo_rename_tgt    = mdd_rename_tgt,
-        .mdo_create_data_object = mdd_create_data_object
+        .mdo_create_data   = mdd_create_data
 };
 
 
index e61fbe1..397c78b 100644 (file)
@@ -78,9 +78,9 @@ static int mdt_create_data_obj(struct mdt_thread_info *info,
         struct md_attr   *ma = &info->mti_attr;
         struct mdt_reint_record *mrr = &info->mti_rr;
 
-        return mdo_create_data_object(info->mti_ctxt, mdt_object_child(p),
-                                 mdt_object_child(o), mrr->rr_eadata,
-                                 mrr->rr_eadatalen, ma);
+        return mdo_create_data(info->mti_ctxt, mdt_object_child(p),
+                               mdt_object_child(o), mrr->rr_eadata,
+                               mrr->rr_eadatalen, ma);
 }
 
 static int mdt_mfd_open(struct mdt_thread_info *info,
index 7a026b0..bbe88b9 100644 (file)
@@ -213,7 +213,7 @@ pass() {
 }
 
 mounted_lustre_filesystems() {
-       awk '($3 ~ "lustre" && $1 ~ ":") { print $2 }' /proc/mounts
+    awk '($3 ~ "lustre" && $1 ~ ":") { print $2 }' /proc/mounts
 }
 
 MOUNTED="`mounted_lustre_filesystems`"