Whamcloud - gitweb
consity mdo_attr_set() argument
authornikita <nikita>
Fri, 11 Aug 2006 17:12:29 +0000 (17:12 +0000)
committernikita <nikita>
Fri, 11 Aug 2006 17:12:29 +0000 (17:12 +0000)
lustre/cmm/cmm_object.c
lustre/fld/fld_request.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

index 14af9d1..0bfcab6 100644 (file)
@@ -231,7 +231,7 @@ static int cml_attr_get(const struct lu_context *ctx, struct md_object *mo,
 }
 
 static int cml_attr_set(const struct lu_context *ctx, struct md_object *mo,
-                        struct md_attr *attr)
+                        const struct md_attr *attr)
 {
         int rc;
         ENTRY;
@@ -561,7 +561,7 @@ static int cmr_attr_get(const struct lu_context *ctx, struct md_object *mo,
 }
 
 static int cmr_attr_set(const struct lu_context *ctx, struct md_object *mo,
-                        struct md_attr *attr)
+                        const struct md_attr *attr)
 {
         RETURN(-EFAULT);
 }
index 90b7888..3fd83c8 100644 (file)
@@ -121,7 +121,7 @@ fld_client_get_target(struct lu_client_fld *fld,
         spin_lock(&fld->fld_lock);
         target = fld->fld_hash->fh_scan_func(fld, seq);
         spin_unlock(&fld->fld_lock);
-        
+
         RETURN(target);
 }
 
@@ -417,7 +417,7 @@ int fld_client_delete(struct lu_client_fld *fld,
 
         rc = fld_client_rpc(target->fldt_exp,
                             &md_fld, FLD_DELETE);
-        
+
         RETURN(rc);
 }
 EXPORT_SYMBOL(fld_client_delete);
index b14881b..64e8ce6 100644 (file)
@@ -85,7 +85,7 @@ struct md_object_operations {
         int (*moo_attr_get)(const struct lu_context *ctxt, struct md_object *dt,
                             struct md_attr *attr);
         int (*moo_attr_set)(const struct lu_context *ctxt, struct md_object *dt,
-                            struct md_attr *attr);
+                            const struct md_attr *attr);
 
         int (*moo_xattr_get)(const struct lu_context *ctxt,
                              struct md_object *obj,
@@ -109,8 +109,8 @@ struct md_object_operations {
 
         /* part of cross-ref operation */
         int (*moo_object_create)(const struct lu_context *,
-                                 struct md_object *, 
-                                 const struct md_create_spec *spec, 
+                                 struct md_object *,
+                                 const struct md_create_spec *spec,
                                  struct md_attr *);
         int (*moo_ref_add)(const struct lu_context *, struct md_object *);
         int (*moo_ref_del)(const struct lu_context *, struct md_object *,
@@ -133,7 +133,7 @@ struct md_dir_operations {
                           struct md_attr *);
         /* This method is used for creating data object for this meta object*/
         int (*mdo_create_data)(const struct lu_context *cx, struct md_object *p,
-                               struct md_object *o, 
+                               struct md_object *o,
                                const struct md_create_spec *spec,
                                struct md_attr *ma);
         int (*mdo_rename)(const struct lu_context *ctxt,
@@ -250,7 +250,7 @@ static inline int mo_readlink(const struct lu_context *cx, struct md_object *m,
 }
 
 static inline int mo_attr_set(const struct lu_context *cx, struct md_object *m,
-                              struct md_attr *at)
+                              const struct md_attr *at)
 {
         LASSERT(m->mo_ops->moo_attr_set);
         return m->mo_ops->moo_attr_set(cx, m, at);
index 614df00..80d8eaf 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-08-05 13:57:49.000000000 +0400
++++ iam/fs/ext3/Makefile       2006-08-11 20:55:34.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-08-05 13:57:49.000000000 +0400
++++ iam/include/linux/lustre_iam.h     2006-08-11 20:55:34.000000000 +0400
 @@ -1,9 +1,68 @@
 +/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
 + * vim:expandtab:shiftwidth=8:tabstop=8:
index dd25554..c09584f 100644 (file)
@@ -1,7 +1,7 @@
 Index: iam/fs/ext3/Makefile
 ===================================================================
---- 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
+--- iam.orig/fs/ext3/Makefile  2006-08-11 20:55:34.000000000 +0400
++++ iam/fs/ext3/Makefile       2006-08-11 20:55:34.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-08-05 13:57:49.000000000 +0400
-+++ iam/fs/ext3/dir.c  2006-08-05 13:57:50.000000000 +0400
+--- iam.orig/fs/ext3/dir.c     2006-08-11 20:55:34.000000000 +0400
++++ iam/fs/ext3/dir.c  2006-08-11 20:55:34.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-08-05 13:57:49.000000000 +0400
-+++ iam/fs/ext3/file.c 2006-08-05 13:57:50.000000000 +0400
+--- iam.orig/fs/ext3/file.c    2006-08-11 20:55:34.000000000 +0400
++++ iam/fs/ext3/file.c 2006-08-11 20:55:34.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-08-05 13:57:50.000000000 +0400
++++ iam/fs/ext3/iam-uapi.c     2006-08-11 20:55:34.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-08-05 13:57:49.000000000 +0400
-+++ iam/fs/ext3/ioctl.c        2006-08-05 13:57:50.000000000 +0400
+--- iam.orig/fs/ext3/ioctl.c   2006-08-11 20:55:34.000000000 +0400
++++ iam/fs/ext3/ioctl.c        2006-08-11 20:55:34.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-08-05 13:57:49.000000000 +0400
-+++ iam/include/linux/lustre_iam.h     2006-08-05 13:57:50.000000000 +0400
+--- iam.orig/include/linux/lustre_iam.h        2006-08-11 20:55:34.000000000 +0400
++++ iam/include/linux/lustre_iam.h     2006-08-11 20:55:34.000000000 +0400
 @@ -30,9 +30,6 @@
  #ifndef __LINUX_LUSTRE_IAM_H__
  #define __LINUX_LUSTRE_IAM_H__
index a4a763f..ab0bf01 100644 (file)
@@ -495,7 +495,7 @@ static int __mdd_xattr_set(const struct lu_context *ctxt, struct mdd_object *o,
 
 /* set attr and LOV EA at once, return updated attr */
 static int mdd_attr_set(const struct lu_context *ctxt,
-                        struct md_object *obj, struct md_attr *ma)
+                        struct md_object *obj, const struct md_attr *ma)
 {
         struct mdd_object *mdo = md2mdd_obj(obj);
         struct mdd_device *mdd = mdo2mdd(obj);
@@ -519,9 +519,13 @@ static int mdd_attr_set(const struct lu_context *ctxt,
         }
         /* XXX: llog cancel cookie? */
 
+        /*
+         * XXX: Hmmm... what is this? attr_get in attr_set?
+         */
+        /*
         if (rc == 0)
                 rc = mdd_attr_get(ctxt, obj, ma);
-
+        */
         mdd_unlock(ctxt, mdo, DT_WRITE_LOCK);
         mdd_trans_stop(ctxt, mdd, handle);