From 04fbee092075dc2086bb8f4525a8687ebe10ac78 Mon Sep 17 00:00:00 2001 From: nikita Date: Sat, 5 Aug 2006 10:08:19 +0000 Subject: [PATCH] rename create_data_object to something less ugly --- lustre/cmm/cmm_object.c | 14 ++++++------ lustre/include/md_object.h | 26 ++++++++++------------ .../kernel_patches/patches/ext3-iam-separate.patch | 4 ++-- lustre/kernel_patches/patches/ext3-iam-uapi.patch | 22 +++++++++--------- lustre/mdd/mdd_handler.c | 10 ++++----- lustre/mdt/mdt_open.c | 6 ++--- lustre/tests/sanity.sh | 2 +- 7 files changed, 41 insertions(+), 43 deletions(-) diff --git a/lustre/cmm/cmm_object.c b/lustre/cmm/cmm_object.c index 54aa5db..60811cc 100644 --- a/lustre/cmm/cmm_object.c +++ b/lustre/cmm/cmm_object.c @@ -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 }; /* ------------------------------------------------------------------- diff --git a/lustre/include/md_object.h b/lustre/include/md_object.h index 3c30766..9bb8c01 100644 --- a/lustre/include/md_object.h +++ b/lustre/include/md_object.h @@ -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, diff --git a/lustre/kernel_patches/patches/ext3-iam-separate.patch b/lustre/kernel_patches/patches/ext3-iam-separate.patch index f89ab7a..614df00 100644 --- a/lustre/kernel_patches/patches/ext3-iam-separate.patch +++ b/lustre/kernel_patches/patches/ext3-iam-separate.patch @@ -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: diff --git a/lustre/kernel_patches/patches/ext3-iam-uapi.patch b/lustre/kernel_patches/patches/ext3-iam-uapi.patch index ad82ce0..dd25554 100644 --- a/lustre/kernel_patches/patches/ext3-iam-uapi.patch +++ b/lustre/kernel_patches/patches/ext3-iam-uapi.patch @@ -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 #include @@ -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 #include @@ -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__ diff --git a/lustre/mdd/mdd_handler.c b/lustre/mdd/mdd_handler.c index ce8c1a5..a53a440 100644 --- a/lustre/mdd/mdd_handler.c +++ b/lustre/mdd/mdd_handler.c @@ -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 }; diff --git a/lustre/mdt/mdt_open.c b/lustre/mdt/mdt_open.c index e61fbe1..397c78b 100644 --- a/lustre/mdt/mdt_open.c +++ b/lustre/mdt/mdt_open.c @@ -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, diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 7a026b0..bbe88b9 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -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`" -- 1.8.3.1