Whamcloud - gitweb
- changes about @flags in m_disconnect(). It should be cohenernt with m_connect(),
authoryury <yury>
Mon, 15 Nov 2004 12:28:48 +0000 (12:28 +0000)
committeryury <yury>
Mon, 15 Nov 2004 12:28:48 +0000 (12:28 +0000)
that is unsigned long too.
- expanding all ->valid fields to 64bit, as it is exhaused and there is no free bits.

39 files changed:
lustre/cmobd/cm_write.c
lustre/cobd/cache_obd.c
lustre/include/linux/lustre_export.h
lustre/include/linux/lustre_idl.h
lustre/include/linux/lustre_mds.h
lustre/include/linux/lustre_net.h
lustre/include/linux/obd.h
lustre/include/linux/obd_class.h
lustre/ldlm/ldlm_lib.c
lustre/liblustre/file.c
lustre/liblustre/llite_lib.h
lustre/liblustre/rw.c
lustre/liblustre/super.c
lustre/llite/dir.c
lustre/llite/llite_close.c
lustre/llite/llite_lib.c
lustre/llite/llite_nfs.c
lustre/llite/rw.c
lustre/lmv/lmv_obd.c
lustre/lmv/lmv_objmgr.c
lustre/lov/lov_obd.c
lustre/mdc/mdc_internal.h
lustre/mdc/mdc_lib.c
lustre/mdc/mdc_locks.c
lustre/mdc/mdc_request.c
lustre/mds/handler.c
lustre/mds/mds_reint.c
lustre/obdclass/debug.c
lustre/obdclass/genops.c
lustre/obdclass/obdo.c
lustre/obdecho/echo.c
lustre/obdecho/echo_client.c
lustre/obdfilter/filter.c
lustre/osc/osc_internal.h
lustre/osc/osc_request.c
lustre/ptlbd/client.c
lustre/ptlrpc/pack_generic.c
lustre/snapfs/snapfs_internal.h
lustre/utils/obd.c

index 2908b64..e3e12b3 100644 (file)
@@ -92,7 +92,7 @@ static int cmobd_ap_refresh_count(void *data, int cmd)
 static void cmobd_ap_fill_obdo(void *data, int cmd, struct obdo *oa)
 {
         struct cmobd_async_page *cmap = (struct cmobd_async_page *)data;
-        obd_flag valid_flags;
+        obd_valid valid_flags;
         struct inode *inode;
         ENTRY;
 
index 622b4b4..15e2b88 100644 (file)
@@ -194,9 +194,9 @@ cobd_connect(struct lustre_handle *conn, struct obd_device *obd,
         return class_connect(conn, obd, cluuid);
 }
 
-static int cobd_disconnect(struct obd_export *exp, int flags)
+static int cobd_disconnect(struct obd_export *exp, unsigned long flags)
 {
-        return class_disconnect(exp, 0);
+        return class_disconnect(exp, flags);
 }
 
 static int cobd_get_info(struct obd_export *exp, obd_count keylen,
@@ -435,7 +435,7 @@ static int cobd_queue_async_io(struct obd_export *exp,
                                struct lov_stripe_md *lsm,
                                struct lov_oinfo *loi, void *cookie,
                                int cmd, obd_off off, int count,
-                               obd_flag brw_flags, obd_flag async_flags)
+                               obd_flags brw_flags, obd_flags async_flags)
 {
         struct obd_device *obd = class_exp2obd(exp);
         struct obd_export *cobd_exp;
@@ -453,7 +453,7 @@ static int cobd_queue_async_io(struct obd_export *exp,
 static int cobd_set_async_flags(struct obd_export *exp,
                                struct lov_stripe_md *lsm,
                                struct lov_oinfo *loi, void *cookie,
-                               obd_flag async_flags)
+                               obd_flags async_flags)
 {
         struct obd_device *obd = class_exp2obd(exp);
         struct obd_export *cobd_exp;
@@ -472,8 +472,8 @@ static int cobd_queue_group_io(struct obd_export *exp,
                                struct lov_oinfo *loi, 
                                struct obd_io_group *oig, 
                                void *cookie, int cmd, obd_off off, 
-                               int count, obd_flag brw_flags,
-                               obd_flag async_flags)
+                               int count, obd_flags brw_flags,
+                               obd_flags async_flags)
 {
         struct obd_device *obd = class_exp2obd(exp);
         struct obd_export *cobd_exp;
@@ -833,7 +833,7 @@ static int  cobd_import_event(struct obd_device *obd,
 }
 
 static int cobd_md_getattr(struct obd_export *exp, struct lustre_id *id,
-                           unsigned long valid, unsigned int ea_size,
+                           __u64 valid, unsigned int ea_size,
                            struct ptlrpc_request **request)
 {
         struct obd_device *obd = class_exp2obd(exp);
@@ -880,7 +880,7 @@ static int cobd_md_change_cbdata(struct obd_export *exp, struct lustre_id *id,
 }
 
 static int cobd_md_getattr_lock(struct obd_export *exp, struct lustre_id *id,
-                                char *filename, int namelen, unsigned long valid,
+                                char *filename, int namelen, __u64 valid,
                                 unsigned int ea_size, struct ptlrpc_request **request)
 {
         struct obd_device *obd = class_exp2obd(exp);
index b4b2fc9..525110d 100644 (file)
@@ -76,7 +76,7 @@ struct obd_export {
         time_t                    exp_last_request_time;
         spinlock_t                exp_lock; /* protects flags int below */
         /* ^ protects exp_outstanding_replies too */
-        int                       exp_flags;
+        unsigned long             exp_flags;
         int                       exp_failed:1,
                                   exp_replay_needed:1,
                                   exp_libclient:1; /* liblustre client? */
index d9db84e..5f64011 100644 (file)
@@ -256,16 +256,17 @@ typedef uint32_t        obd_blksize;
 typedef uint32_t        obd_mode;
 typedef uint32_t        obd_uid;
 typedef uint32_t        obd_gid;
-typedef uint32_t        obd_flag;
+typedef uint32_t        obd_flags;
+typedef uint64_t        obd_valid;
 typedef uint32_t        obd_count;
 
-#define OBD_FL_INLINEDATA   (0x00000001)
-#define OBD_FL_OBDMDEXISTS  (0x00000002)
-#define OBD_FL_DELORPHAN    (0x00000004) /* if set in o_flags delete orphans */
-#define OBD_FL_NORPC        (0x00000008) // if set in o_flags set in OSC not OST
-#define OBD_FL_IDONLY       (0x00000010) // if set in o_flags only adjust obj id
+#define OBD_FL_INLINEDATA    (0x00000001)
+#define OBD_FL_OBDMDEXISTS   (0x00000002)
+#define OBD_FL_DELORPHAN     (0x00000004) /* if set in o_flags delete orphans */
+#define OBD_FL_NORPC         (0x00000008) // if set in o_flags set in OSC not OST
+#define OBD_FL_IDONLY        (0x00000010) // if set in o_flags only adjust obj id
 #define OBD_FL_RECREATE_OBJS (0x00000020) // recreate missing obj
-#define OBD_FL_DEBUG_CHECK  (0x00000040) /* echo client/server debug check */
+#define OBD_FL_DEBUG_CHECK   (0x00000040) /* echo client/server debug check */
 
 /* this should be sizeof(struct lustre_handle) + sizeof(struct llog_cookie) +
  * sizeof(struct lustre_id). */
@@ -285,11 +286,11 @@ struct obdo {
         obd_mode                o_mode;         /* brw: cli sent cache remain */
         obd_uid                 o_uid;
         obd_gid                 o_gid;
-        obd_flag                o_flags;
+        obd_flags               o_flags;
         obd_count               o_nlink;        /* brw: checksum */
         obd_count               o_generation;
-        obd_flag                o_valid;        /* hot fields in this obdo */
-        obd_count               o_misc;          /* brw: o_dropped */
+        obd_valid               o_valid;        /* hot fields in this obdo */
+        obd_count               o_misc;         /* brw: o_dropped */
         __u32                   o_easize;       /* epoch in ost writes */
         __u32                   o_mds;
         __u64                   o_fid;
@@ -347,41 +348,43 @@ struct lov_mds_md_v0 {            /* LOV EA mds/wire data (little-endian) */
         struct lov_ost_data_v0 lmm_objects[0];
 } __attribute__((packed));
 
-#define OBD_MD_FLALL    (0xffffffff)
-#define OBD_MD_FLID     (0x00000001)    /* object ID */
-#define OBD_MD_FLATIME  (0x00000002)    /* access time */
-#define OBD_MD_FLMTIME  (0x00000004)    /* data modification time */
-#define OBD_MD_FLCTIME  (0x00000008)    /* change time */
-#define OBD_MD_FLSIZE   (0x00000010)    /* size */
-#define OBD_MD_FLBLOCKS (0x00000020)    /* allocated blocks count */
-#define OBD_MD_FLBLKSZ  (0x00000040)    /* block size */
-#define OBD_MD_FLMODE   (0x00000080)    /* access bits (mode & ~S_IFMT) */
-#define OBD_MD_FLTYPE   (0x00000100)    /* object type (mode & S_IFMT) */
-#define OBD_MD_FLUID    (0x00000200)    /* user ID */
-#define OBD_MD_FLGID    (0x00000400)    /* group ID */
-#define OBD_MD_FLFLAGS  (0x00000800)    /* flags word */
-#define OBD_MD_FLNLINK  (0x00002000)    /* link count */
-#define OBD_MD_FLGENER  (0x00004000)    /* generation number */
-#define OBD_MD_FLINLINE (0x00008000)    /* inline data */
-#define OBD_MD_FLRDEV   (0x00010000)    /* device number */
-#define OBD_MD_FLEASIZE (0x00020000)    /* extended attribute data */
-#define OBD_MD_LINKNAME (0x00040000)    /* symbolic link target */
-#define OBD_MD_FLHANDLE (0x00080000)    /* file handle */
-#define OBD_MD_FLCKSUM  (0x00100000)    /* bulk data checksum */
-#define OBD_MD_FLQOS    (0x00200000)    /* quality of service stats */
-#define OBD_MD_FLOSCOPQ (0x00400000)    /* osc opaque data */
-#define OBD_MD_FLCOOKIE (0x00800000)    /* log cancellation cookie */
-#define OBD_MD_FLGROUP  (0x01000000)    /* group */
-#define OBD_MD_FLIFID   (0x02000000)    /* ->ost write inline fid */
-#define OBD_MD_FLEPOCH  (0x04000000)    /* ->ost write easize is epoch */
-#define OBD_MD_FLGRANT  (0x08000000)    /* ost preallocation space grant */
-#define OBD_MD_MDS      (0x10000000)    /* where an inode lives on */
-#define OBD_MD_FLDIREA  (0x20000000)    /* dir's extended attribute data */
-#define OBD_MD_REINT    (0x40000000)    /* reintegrate oa */
-#define OBD_MD_FID      (0x80000000)    /* take care about fid component */
+#define OBD_MD_FLALL    (0xffffffffffffffff)
+#define OBD_MD_FLID     (0x0000000000000001)    /* object ID */
+#define OBD_MD_FLATIME  (0x0000000000000002)    /* access time */
+#define OBD_MD_FLMTIME  (0x0000000000000004)    /* data modification time */
+#define OBD_MD_FLCTIME  (0x0000000000000008)    /* change time */
+#define OBD_MD_FLSIZE   (0x0000000000000010)    /* size */
+#define OBD_MD_FLBLOCKS (0x0000000000000020)    /* allocated blocks count */
+#define OBD_MD_FLBLKSZ  (0x0000000000000040)    /* block size */
+#define OBD_MD_FLMODE   (0x0000000000000080)    /* access bits (mode & ~S_IFMT) */
+#define OBD_MD_FLTYPE   (0x0000000000000100)    /* object type (mode & S_IFMT) */
+#define OBD_MD_FLUID    (0x0000000000000200)    /* user ID */
+#define OBD_MD_FLGID    (0x0000000000000400)    /* group ID */
+#define OBD_MD_FLFLAGS  (0x0000000000000800)    /* flags word */
+#define OBD_MD_FLNLINK  (0x0000000000002000)    /* link count */
+#define OBD_MD_FLGENER  (0x0000000000004000)    /* generation number */
+#define OBD_MD_FLINLINE (0x0000000000008000)    /* inline data */
+#define OBD_MD_FLRDEV   (0x0000000000010000)    /* device number */
+#define OBD_MD_FLEASIZE (0x0000000000020000)    /* extended attribute data */
+#define OBD_MD_LINKNAME (0x0000000000040000)    /* symbolic link target */
+#define OBD_MD_FLHANDLE (0x0000000000080000)    /* file handle */
+#define OBD_MD_FLCKSUM  (0x0000000000100000)    /* bulk data checksum */
+#define OBD_MD_FLQOS    (0x0000000000200000)    /* quality of service stats */
+#define OBD_MD_FLOSCOPQ (0x0000000000400000)    /* osc opaque data */
+#define OBD_MD_FLCOOKIE (0x0000000000800000)    /* log cancellation cookie */
+#define OBD_MD_FLGROUP  (0x0000000001000000)    /* group */
+#define OBD_MD_FLIFID   (0x0000000002000000)    /* ->ost write inline fid */
+#define OBD_MD_FLEPOCH  (0x0000000004000000)    /* ->ost write easize is epoch */
+#define OBD_MD_FLGRANT  (0x0000000008000000)    /* ost preallocation space grant */
+#define OBD_MD_MDS      (0x0000000010000000)    /* where an inode lives on */
+#define OBD_MD_FLDIREA  (0x0000000020000000)    /* dir's extended attribute data */
+#define OBD_MD_REINT    (0x0000000040000000)    /* reintegrate oa */
+#define OBD_MD_FID      (0x0000000080000000)    /* take care about fid component */
+
 #define OBD_MD_FLNOTOBD (~(OBD_MD_FLBLOCKS | OBD_MD_LINKNAME |          \
-                           OBD_MD_FLEASIZE | OBD_MD_FLHANDLE | OBD_MD_FLCKSUM | \
-                           OBD_MD_FLQOS | OBD_MD_FLOSCOPQ | OBD_MD_FLCOOKIE| \
+                           OBD_MD_FLEASIZE | OBD_MD_FLHANDLE |          \
+                           OBD_MD_FLCKSUM | OBD_MD_FLQOS |              \
+                           OBD_MD_FLOSCOPQ | OBD_MD_FLCOOKIE |          \
                            OBD_MD_MDS))
 
 static inline struct lustre_handle *obdo_handle(struct obdo *oa)
@@ -613,7 +616,7 @@ struct mds_body {
         __u64          size;   /* Offset, in the case of MDS_READPAGE */
         __u64          blocks; /* XID, in the case of MDS_READPAGE */
         __u64          io_epoch;
-        __u32          valid;
+        __u64          valid;
         __u32          mode;
         __u32          uid;
         __u32          gid;
@@ -637,13 +640,13 @@ struct lustre_md {
 struct mdc_op_data {
         struct lustre_id id1;
         struct lustre_id id2;
-        __u64 mod_time;
-        const char *name;
-        int namelen;
-        __u32 create_mode;
-        struct mea *mea1;       /* mea of inode1 */
-        struct mea *mea2;       /* mea of inode2 */
-        __u32 valid;
+        __u64            mod_time;
+        const char      *name;
+        int              namelen;
+        __u32            create_mode;
+        struct mea      *mea1;       /* mea of inode1 */
+        struct mea      *mea2;       /* mea of inode2 */
+        __u64            valid;
 };
 
 #define MDS_MODE_DONT_LOCK      (1 << 30)
index 8c10374..9f9f4df 100644 (file)
@@ -224,10 +224,10 @@ int mdc_req2lustre_md(struct obd_export *exp_mdc, struct ptlrpc_request *req,
                       struct lustre_md *md);
 int mdc_getstatus(struct obd_export *exp, struct lustre_id *rootid);
 int mdc_getattr(struct obd_export *exp, struct lustre_id *id,
-                unsigned long valid, unsigned int ea_size,
+                __u64 valid, unsigned int ea_size,
                 struct ptlrpc_request **request);
 int mdc_getattr_lock(struct obd_export *exp, struct lustre_id *id,
-                     char *filename, int namelen, unsigned long valid,
+                     char *filename, int namelen, __u64 valid,
                      unsigned int ea_size, struct ptlrpc_request **request);
 int mdc_setattr(struct obd_export *exp, struct mdc_op_data *data,
                 struct iattr *iattr, void *ea, int ealen, void *ea2, int ea2len,
index 3ccee10..01fa614 100644 (file)
@@ -803,7 +803,7 @@ int client_obd_setup(struct obd_device *obddev, obd_count len, void *buf);
 int client_obd_cleanup(struct obd_device * obddev, int flags);
 int client_connect_import(struct lustre_handle *conn, struct obd_device *obd,
                           struct obd_uuid *cluuid, unsigned long);
-int client_disconnect_export(struct obd_export *exp, int failover);
+int client_disconnect_export(struct obd_export *exp, unsigned long);
 
 int client_import_add_conn(struct obd_import *imp, struct obd_uuid *uuid,
                            int priority);
index 96106d7..2c7adc8 100644 (file)
@@ -123,7 +123,7 @@ struct brw_page {
         obd_off page_offset; /* modulo PAGE_SIZE (obviously) */
         struct page *pg;
         int count;
-        obd_flag flag;
+        obd_flags flag;
 };
 
 enum async_flags {
@@ -687,9 +687,9 @@ struct obd_ops {
                           int priority);
         int (*o_del_conn)(struct obd_import *imp, struct obd_uuid *uuid);
         int (*o_connect)(struct lustre_handle *conn, struct obd_device *src,
-                         struct obd_uuid *cluuid, unsigned long connect_flags);
-        int (*o_connect_post)(struct obd_export *exp, unsigned long connect_flags);
-        int (*o_disconnect)(struct obd_export *exp, int flags);
+                         struct obd_uuid *cluuid, unsigned long flags);
+        int (*o_connect_post)(struct obd_export *exp, unsigned long flags);
+        int (*o_disconnect)(struct obd_export *exp, unsigned long flags);
 
         int (*o_statfs)(struct obd_device *obd, struct obd_statfs *osfs,
                         unsigned long max_age);
@@ -730,13 +730,13 @@ struct obd_ops {
                                 struct lov_stripe_md *lsm, 
                                 struct lov_oinfo *loi, void *cookie, 
                                 int cmd, obd_off off, int count, 
-                                obd_flag brw_flags, obd_flag async_flags);
+                                obd_flags brw_flags, obd_flags async_flags);
         int (*o_queue_group_io)(struct obd_export *exp, 
                                 struct lov_stripe_md *lsm, 
                                 struct lov_oinfo *loi, 
                                 struct obd_io_group *oig, 
                                 void *cookie, int cmd, obd_off off, int count, 
-                                obd_flag brw_flags, obd_flag async_flags);
+                                obd_flags brw_flags, obd_flags async_flags);
         int (*o_trigger_group_io)(struct obd_export *exp, 
                                   struct lov_stripe_md *lsm, 
                                   struct lov_oinfo *loi, 
@@ -744,7 +744,7 @@ struct obd_ops {
         int (*o_set_async_flags)(struct obd_export *exp,
                                 struct lov_stripe_md *lsm,
                                 struct lov_oinfo *loi, void *cookie,
-                                obd_flag async_flags);
+                                obd_flags async_flags);
         int (*o_teardown_async_page)(struct obd_export *exp,
                                      struct lov_stripe_md *lsm,
                                      struct lov_oinfo *loi, void *cookie);
@@ -846,10 +846,10 @@ struct md_ops {
                          void *, int, ldlm_completion_callback,
                          ldlm_blocking_callback, void *);
         int (*m_getattr)(struct obd_export *, struct lustre_id *,
-                         unsigned long, unsigned int,
+                         __u64, unsigned int,
                          struct ptlrpc_request **);
         int (*m_getattr_lock)(struct obd_export *, struct lustre_id *,
-                              char *, int, unsigned long,
+                              char *, int, __u64,
                               unsigned int, struct ptlrpc_request **);
         int (*m_intent_lock)(struct obd_export *,
                              struct lustre_id *, const char *, int,
index c1a0d5b..67a9cbd 100644 (file)
@@ -155,9 +155,9 @@ struct obd_type *class_get_type(char *name);
 void class_put_type(struct obd_type *type);
 int class_connect(struct lustre_handle *conn, struct obd_device *obd,
                   struct obd_uuid *cluuid);
-int class_disconnect(struct obd_export *exp, int flags);
-void class_disconnect_exports(struct obd_device *obddev, int flags);
-void class_disconnect_stale_exports(struct obd_device *obddev, int flags);
+int class_disconnect(struct obd_export *exp, unsigned long flags);
+void class_disconnect_exports(struct obd_device *obddev, unsigned long flags);
+void class_disconnect_stale_exports(struct obd_device *obddev, unsigned long flags);
 
 /* generic operations shared by various OBD types */
 int class_multi_setup(struct obd_device *obddev, uint32_t len, void *data);
@@ -166,13 +166,13 @@ int class_multi_cleanup(struct obd_device *obddev);
 /* obdo.c */
 #ifdef __KERNEL__
 void obdo_from_iattr(struct obdo *oa, struct iattr *attr, unsigned ia_valid);
-void iattr_from_obdo(struct iattr *attr, struct obdo *oa, obd_flag valid);
-void obdo_from_inode(struct obdo *dst, struct inode *src, obd_flag valid);
-void obdo_refresh_inode(struct inode *dst, struct obdo *src, obd_flag valid);
-void obdo_to_inode(struct inode *dst, struct obdo *src, obd_flag valid);
+void iattr_from_obdo(struct iattr *attr, struct obdo *oa, obd_valid valid);
+void obdo_from_inode(struct obdo *dst, struct inode *src, obd_valid valid);
+void obdo_refresh_inode(struct inode *dst, struct obdo *src, obd_valid valid);
+void obdo_to_inode(struct inode *dst, struct obdo *src, obd_valid valid);
 #endif
-void obdo_cpy_md(struct obdo *dst, struct obdo *src, obd_flag valid);
-int obdo_cmp_md(struct obdo *dst, struct obdo *src, obd_flag compare);
+void obdo_cpy_md(struct obdo *dst, struct obdo *src, obd_valid valid);
+int obdo_cmp_md(struct obdo *dst, struct obdo *src, obd_valid compare);
 void obdo_to_ioobj(struct obdo *oa, struct obd_ioobj *ioobj);
 
 static inline int obd_check_conn(struct lustre_handle *conn)
@@ -688,7 +688,7 @@ static inline int obd_connect_post(struct obd_export *exp, unsigned long flags)
         RETURN(rc);
 }
 
-static inline int obd_disconnect(struct obd_export *exp, int flags)
+static inline int obd_disconnect(struct obd_export *exp, unsigned long flags)
 {
         int rc;
         ENTRY;
@@ -870,7 +870,7 @@ static inline int obd_queue_async_io(struct obd_export *exp,
                                      struct lov_stripe_md *lsm,
                                      struct lov_oinfo *loi, void *cookie,
                                      int cmd, obd_off off, int count,
-                                     obd_flag brw_flags, obd_flag async_flags)
+                                     obd_flags brw_flags, obd_flags async_flags)
 {
         int rc;
         ENTRY;
@@ -887,7 +887,7 @@ static inline int obd_queue_async_io(struct obd_export *exp,
 static inline int obd_set_async_flags(struct obd_export *exp,
                                       struct lov_stripe_md *lsm,
                                       struct lov_oinfo *loi, void *cookie,
-                                      obd_flag async_flags)
+                                      obd_flags async_flags)
 {
         int rc;
         ENTRY;
@@ -905,8 +905,8 @@ static inline int obd_queue_group_io(struct obd_export *exp,
                                      struct lov_oinfo *loi,
                                      struct obd_io_group *oig,
                                      void *cookie, int cmd, obd_off off,
-                                     int count, obd_flag brw_flags,
-                                     obd_flag async_flags)
+                                     int count, obd_flags brw_flags,
+                                     obd_flags async_flags)
 {
         int rc;
         ENTRY;
@@ -1228,7 +1228,7 @@ static inline int md_delete_inode(struct obd_export *exp,
 }
 
 static inline int md_getattr(struct obd_export *exp, struct lustre_id *id,
-                             unsigned long valid, unsigned int ea_size,
+                             __u64 valid, unsigned int ea_size,
                              struct ptlrpc_request **request)
 {
         int rc;
@@ -1327,7 +1327,7 @@ static inline int md_enqueue(struct obd_export *exp, int lock_type,
 
 static inline int md_getattr_lock(struct obd_export *exp, struct lustre_id *id,
                                   char *filename, int namelen,
-                                  unsigned long valid, unsigned int ea_size,
+                                  __u64 valid, unsigned int ea_size,
                                   struct ptlrpc_request **request)
 {
         int rc;
index e003628..20a398e 100644 (file)
@@ -417,7 +417,7 @@ out_sem:
         return rc;
 }
 
-int client_disconnect_export(struct obd_export *exp, int flags)
+int client_disconnect_export(struct obd_export *exp, unsigned long flags)
 {
         struct obd_device *obd = class_exp2obd(exp);
         struct client_obd *cli = &obd->u.cli;
index 78b9202..4436909 100644 (file)
@@ -61,13 +61,13 @@ void llu_prepare_mdc_data(struct mdc_op_data *data, struct inode *i1,
 
 void obdo_refresh_inode(struct inode *dst,
                         struct obdo *src,
-                        obd_flag valid)
+                        obd_valid valid)
 {
         struct llu_inode_info *lli = llu_i2info(dst);
         valid &= src->o_valid;
 
         if (valid & (OBD_MD_FLCTIME | OBD_MD_FLMTIME))
-                CDEBUG(D_INODE, "valid %x, cur time %lu/%lu, new %lu/%lu\n",
+                CDEBUG(D_INODE, "valid "LPX64", cur time %lu/%lu, new %lu/%lu\n",
                        src->o_valid, LTIME_S(lli->lli_st_mtime), 
                        LTIME_S(lli->lli_st_ctime),
                        (long)src->o_mtime, (long)src->o_ctime);
index 34f1fea..b805622 100644 (file)
@@ -211,8 +211,8 @@ extern struct mount_option_s mount_option;
 /* super.c */
 void llu_update_inode(struct inode *inode, struct mds_body *body,
                       struct lov_stripe_md *lmm);
-void obdo_to_inode(struct inode *dst, struct obdo *src, obd_flag valid);
-void obdo_from_inode(struct obdo *dst, struct inode *src, obd_flag valid);
+void obdo_to_inode(struct inode *dst, struct obdo *src, obd_valid valid);
+void obdo_from_inode(struct obdo *dst, struct inode *src, obd_valid valid);
 int ll_it_open_error(int phase, struct lookup_intent *it);
 struct inode *llu_iget(struct filesys *fs, struct lustre_md *md);
 int llu_inode_getattr(struct inode *inode, struct lov_stripe_md *lsm);
@@ -231,7 +231,7 @@ int llu_mdc_close(struct obd_export *mdc_exp, struct inode *inode);
 int llu_iop_close(struct inode *inode);
 _SYSIO_OFF_T llu_iop_pos(struct inode *ino, _SYSIO_OFF_T off);
 int llu_vmtruncate(struct inode * inode, loff_t offset);
-void obdo_refresh_inode(struct inode *dst, struct obdo *src, obd_flag valid);
+void obdo_refresh_inode(struct inode *dst, struct obdo *src, obd_valid valid);
 int llu_objects_destroy(struct ptlrpc_request *request, struct inode *dir);
 
 /* rw.c */
index 15be024..faeed7d 100644 (file)
@@ -321,7 +321,7 @@ static void llu_ap_fill_obdo(void *data, int cmd, struct obdo *oa)
         struct ll_async_page *llap;
         struct inode *inode;
         struct lov_stripe_md *lsm;
-        obd_flag valid_flags;
+        obd_valid valid_flags;
         ENTRY;
 
         llap = llap_from_cookie(data);
index 7b5fc95..6976b38 100644 (file)
@@ -178,7 +178,7 @@ void llu_update_inode(struct inode *inode, struct mds_body *body,
                 lli->lli_st_blocks = body->blocks;
 }
 
-void obdo_to_inode(struct inode *dst, struct obdo *src, obd_flag valid)
+void obdo_to_inode(struct inode *dst, struct obdo *src, obd_valid valid)
 {
         struct llu_inode_info *lli = llu_i2info(dst);
 
@@ -219,10 +219,10 @@ void obdo_to_inode(struct inode *dst, struct obdo *src, obd_flag valid)
 #define S_IRWXUGO       (S_IRWXU|S_IRWXG|S_IRWXO)
 #define S_IALLUGO       (S_ISUID|S_ISGID|S_ISVTX|S_IRWXUGO)
 
-void obdo_from_inode(struct obdo *dst, struct inode *src, obd_flag valid)
+void obdo_from_inode(struct obdo *dst, struct inode *src, obd_valid valid)
 {
         struct llu_inode_info *lli = llu_i2info(src);
-        obd_flag newvalid = 0;
+        obd_valid newvalid = 0;
 
         if (valid & (OBD_MD_FLCTIME | OBD_MD_FLMTIME))
                 CDEBUG(D_INODE, "valid %x, new time %lu/%lu\n",
@@ -290,7 +290,7 @@ int llu_inode_getattr(struct inode *inode, struct lov_stripe_md *lsm)
         struct obd_export *exp = llu_i2obdexp(inode);
         struct ptlrpc_request_set *set;
         struct obdo oa;
-        obd_flag refresh_valid;
+        obd_valid refresh_valid;
         int rc;
         ENTRY;
 
@@ -432,7 +432,7 @@ static int llu_inode_revalidate(struct inode *inode)
                 struct ptlrpc_request *req = NULL;
                 struct llu_sb_info *sbi = llu_i2sbi(inode);
                 struct lustre_id id;
-                unsigned long valid = 0;
+                __u64 valid = 0;
                 int rc, ealen = 0;
 
                 /* Why don't we update all valid MDS fields here, if we're doing
index 7d0bbcc..6a96db2 100644 (file)
@@ -436,7 +436,7 @@ static int ll_dir_ioctl(struct inode *inode, struct file *file,
                 char *buf = NULL;
                 char *filename;
                 int namelen, rc, len = 0;
-                unsigned long valid;
+                __u64 valid;
 
                 rc = obd_ioctl_getdata(&buf, &len, (void *)arg);
                 if (rc)
@@ -508,7 +508,7 @@ static int ll_dir_ioctl(struct inode *inode, struct file *file,
                 struct lov_mds_md *lmm;
                 struct lustre_id id;
                 struct mds_body *body;
-                unsigned long valid = 0;
+                __u64 valid = 0;
                 int rc, lmmsize;
 
                 valid |= OBD_MD_FLDIREA;
index f0d3f53..1500678 100644 (file)
@@ -124,7 +124,7 @@ static void ll_close_done_writing(struct inode *inode)
         ldlm_policy_data_t policy = { .l_extent = {0, OBD_OBJECT_EOF } };
         struct lustre_handle lockh = { 0 };
         struct obdo obdo;
-        obd_flag valid;
+        obd_valid valid;
         int rc, ast_flags = 0;
         ENTRY;
 
index ab0f300..b6711a7 100644 (file)
@@ -1404,7 +1404,7 @@ int ll_iocontrol(struct inode *inode, struct file *file,
         switch(cmd) {
         case EXT3_IOC_GETFLAGS: {
                 struct lustre_id id;
-                unsigned long valid = OBD_MD_FLFLAGS;
+                __u64 valid = OBD_MD_FLFLAGS;
                 struct mds_body *body;
 
                 ll_inode2id(&id, inode);
@@ -1572,7 +1572,7 @@ int ll_get_fid(struct obd_export *exp, struct lustre_id *idp,
 {
         struct ptlrpc_request *request = NULL;
         struct mds_body *body;
-        int valid = 0;
+        __u64 valid = 0;
         int rc;
 
         valid |= OBD_MD_FID;
index d052b2d..4b567a7 100644 (file)
@@ -37,15 +37,15 @@ __u32 get_uuid2int(const char *name, int len)
         return (key0 << 1);
 }
 
-static struct inode * search_inode_for_lustre(struct super_block *sb,
-                                              unsigned long ino,
-                                              unsigned long generation,
-                                              int mode)
+static struct inode *search_inode_for_lustre(struct super_block *sb,
+                                             unsigned long ino,
+                                             unsigned long generation,
+                                             int mode)
 {
         struct ptlrpc_request *req = NULL;
         struct ll_sb_info *sbi = ll_s2sbi(sb);
         struct lustre_id id;
-        unsigned long valid = 0;
+        __u64 valid = 0;
         int eadatalen = 0, rc;
         struct inode *inode = NULL;
 
@@ -57,9 +57,9 @@ static struct inode * search_inode_for_lustre(struct super_block *sb,
                 eadatalen = obd_size_diskmd(sbi->ll_lov_exp, NULL);
                 valid |= OBD_MD_FLEASIZE;
         }
-        id.li_stc.u.e3s.l3s_type = mode;
-        id.li_stc.u.e3s.l3s_ino = (__u64)ino;
-        id.li_stc.u.e3s.l3s_gen = generation;
+        id_type(&id) = mode;
+        id_ino(&id) = (__u64)ino;
+        id_gen(&id) = generation;
 
         rc = md_getattr(sbi->ll_lmv_exp, &id, valid, eadatalen, &req);
         if (rc) {
index cece52b..77c5173 100644 (file)
@@ -304,7 +304,7 @@ static int ll_ap_refresh_count(void *data, int cmd)
 void ll_inode_fill_obdo(struct inode *inode, int cmd, struct obdo *oa)
 {
         struct lov_stripe_md *lsm;
-        obd_flag valid_flags;
+        obd_valid valid_flags;
 
         lsm = ll_i2info(inode)->lli_smd;
 
@@ -406,7 +406,7 @@ static int queue_or_sync_write(struct obd_export *exp,
                                struct lov_stripe_md *lsm,
                                struct ll_async_page *llap,
                                unsigned to,
-                               obd_flag async_flags)
+                               obd_flags async_flags)
 {
         struct obd_io_group *oig;
         int rc;
index 0e5bd5d..441df85 100644 (file)
@@ -307,7 +307,7 @@ int lmv_check_connect(struct obd_device *obd)
                 tgt_obd = class_find_client_obd(&tgts->uuid, LUSTRE_MDC_NAME, 
                                                 &obd->obd_uuid);
                 if (!tgt_obd) {
-                        CERROR("Target %s not attached\n", tgts->uuid.uuid);
+                        CERROR("target %s not attached\n", tgts->uuid.uuid);
                         GOTO(out_disc, rc = -EINVAL);
                 }
 
@@ -325,14 +325,14 @@ int lmv_check_connect(struct obd_device *obd)
                         cluuid->uuid);
 
                 if (!tgt_obd->obd_set_up) {
-                        CERROR("Target %s not set up\n", tgts->uuid.uuid);
+                        CERROR("target %s not set up\n", tgts->uuid.uuid);
                         GOTO(out_disc, rc = -EINVAL);
                 }
                 
                 rc = obd_connect(&conn, tgt_obd, &lmv_mdc_uuid,
                                  lmv->connect_flags);
                 if (rc) {
-                        CERROR("Target %s connect error %d\n",
+                        CERROR("target %s connect error %d\n",
                                 tgts->uuid.uuid, rc);
                         GOTO(out_disc, rc);
                 }
@@ -343,7 +343,7 @@ int lmv_check_connect(struct obd_device *obd)
 
                 rc = obd_register_observer(tgt_obd, obd);
                 if (rc) {
-                        CERROR("Target %s register_observer error %d\n",
+                        CERROR("target %s register_observer error %d\n",
                                tgts->uuid.uuid, rc);
                         obd_disconnect(tgts->ltd_exp, 0);
                         GOTO(out_disc, rc);
@@ -408,7 +408,7 @@ int lmv_check_connect(struct obd_device *obd)
         RETURN (rc);
 }
 
-static int lmv_disconnect(struct obd_export *exp, int flags)
+static int lmv_disconnect(struct obd_export *exp, unsigned long flags)
 {
         struct obd_device *obd = class_exp2obd(exp);
         struct lmv_obd *lmv = &obd->u.lmv;
@@ -665,7 +665,7 @@ static int lmv_getstatus(struct obd_export *exp, struct lustre_id *id)
 }
 
 static int lmv_getattr(struct obd_export *exp, struct lustre_id *id,
-                       unsigned long valid, unsigned int ea_size,
+                       __u64 valid, unsigned int ea_size,
                        struct ptlrpc_request **request)
 {
         struct obd_device *obd = exp->exp_obd;
@@ -839,7 +839,7 @@ int lmv_get_mea_and_update_object(struct obd_export *exp,
         struct ptlrpc_request *req = NULL;
         struct lmv_obj *obj;
         struct lustre_md md;
-        unsigned long valid;
+        __u64 valid;
         int mealen, rc;
 
         md.mea = NULL;
@@ -1045,7 +1045,7 @@ int lmv_enqueue(struct obd_export *exp, int lock_type,
 }
 
 int lmv_getattr_lock(struct obd_export *exp, struct lustre_id *id,
-                     char *filename, int namelen, unsigned long valid,
+                     char *filename, int namelen, __u64 valid,
                      unsigned int ea_size, struct ptlrpc_request **request)
 {
         int rc, mds = id_group(id), loop = 0;
@@ -1054,7 +1054,7 @@ int lmv_getattr_lock(struct obd_export *exp, struct lustre_id *id,
         struct lustre_id rid = *id;
         struct mds_body *body;
         struct lmv_obj *obj;
-        int old_valid;
+        __u64 old_valid;
         ENTRY;
         
         rc = lmv_check_connect(obd);
@@ -1440,7 +1440,7 @@ int lmv_unlink_slaves(struct obd_export *exp, struct mdc_op_data *data,
         struct lmv_obd *lmv = &obd->u.lmv;
         struct mea *mea = data->mea1;
         struct mdc_op_data data2;
-        int i, rc = 0, mds;
+        int i, rc = 0;
         ENTRY;
 
         LASSERT(mea != NULL);
@@ -1449,28 +1449,34 @@ int lmv_unlink_slaves(struct obd_export *exp, struct mdc_op_data *data,
                 data2.id1 = mea->mea_ids[i];
                 data2.create_mode = MDS_MODE_DONT_LOCK | S_IFDIR;
                 
-                mds = id_group(&data2.id1);
-
-                if (lmv->tgts[mds].ltd_exp == NULL)
+                if (lmv->tgts[id_group(&data2.id1)].ltd_exp == NULL)
                         continue;
 
-                rc = md_unlink(lmv->tgts[mds].ltd_exp, &data2, req);
+                rc = md_unlink(lmv->tgts[id_group(&data2.id1)].ltd_exp,
+                               &data2, req);
+                
                 CDEBUG(D_OTHER, "unlink slave "DLID4" -> %d\n",
                        OLID4(&mea->mea_ids[i]), rc);
+                
                 if (*req) {
                         ptlrpc_req_finished(*req);
                         *req = NULL;
                 }
                 if (rc)
-                        break;
+                        RETURN(rc);
         }
         RETURN(rc);
 }
 
 int lmv_delete_inode(struct obd_export *exp, struct lustre_id *id)
 {
+        LASSERT(exp && id);
+        
         ENTRY;
-        lmv_delete_obj(exp, id);
+        if (lmv_delete_obj(exp, id)) {
+                CDEBUG(D_OTHER, "lmv object "DLID4" is destroyed.\n",
+                       OLID4(id));
+        }
         RETURN(0);
 }
 
@@ -1510,7 +1516,7 @@ int lmv_unlink(struct obd_export *exp, struct mdc_op_data *data,
                        OLID4(&data->id1));
         }
         rc = md_unlink(lmv->tgts[id_group(&data->id1)].ltd_exp, 
-                       data, request); 
+                       data, request);
         RETURN(rc);
 }
 
index ecce7a0..ce054c7 100644 (file)
@@ -298,7 +298,7 @@ lmv_create_obj(struct obd_export *exp, struct lustre_id *id, struct mea *mea)
                OLID4(id));
 
         if (!mea) {
-                unsigned long valid;
+                __u64 valid;
                 
                 CDEBUG(D_OTHER, "mea isn't passed in, get it now\n");
                 mealen = MEA_SIZE_LMV(lmv);
index 4f291df..e58d716 100644 (file)
@@ -280,8 +280,9 @@ static int lov_connect(struct lustre_handle *conn, struct obd_device *obd,
         RETURN (rc);
 }
 
-static int lov_disconnect_obd(struct obd_device *obd, struct lov_tgt_desc *tgt,
-                              int flags)
+static int lov_disconnect_obd(struct obd_device *obd, 
+                             struct lov_tgt_desc *tgt,
+                              unsigned long flags)
 {
 #ifdef __KERNEL__
         struct proc_dir_entry *lov_proc_dir;
@@ -335,7 +336,7 @@ static int lov_disconnect_obd(struct obd_device *obd, struct lov_tgt_desc *tgt,
         RETURN(0);
 }
 
-static int lov_disconnect(struct obd_export *exp, int flags)
+static int lov_disconnect(struct obd_export *exp, unsigned long flags)
 {
         struct obd_device *obd = class_exp2obd(exp);
 #ifdef __KERNEL__
@@ -730,7 +731,7 @@ static obd_size lov_stripe_size(struct lov_stripe_md *lsm, obd_size ost_size,
         return lov_size;
 }
 
-static void lov_merge_attrs(struct obdo *tgt, struct obdo *src, obd_flag valid,
+static void lov_merge_attrs(struct obdo *tgt, struct obdo *src, obd_valid valid,
                             struct lov_stripe_md *lsm, int stripeno, int *set)
 {
         valid &= src->o_valid;
@@ -2263,7 +2264,7 @@ static int lov_queue_async_io(struct obd_export *exp,
                               struct lov_stripe_md *lsm,
                               struct lov_oinfo *loi, void *cookie,
                               int cmd, obd_off off, int count,
-                              obd_flag brw_flags, obd_flag async_flags)
+                              obd_flags brw_flags, obd_flags async_flags)
 {
         struct lov_obd *lov = &exp->exp_obd->u.lov;
         struct lov_async_page *lap;
@@ -2289,7 +2290,7 @@ static int lov_queue_async_io(struct obd_export *exp,
 static int lov_set_async_flags(struct obd_export *exp,
                                struct lov_stripe_md *lsm,
                                struct lov_oinfo *loi, void *cookie,
-                               obd_flag async_flags)
+                               obd_flags async_flags)
 {
         struct lov_obd *lov = &exp->exp_obd->u.lov;
         struct lov_async_page *lap;
@@ -2316,7 +2317,7 @@ static int lov_queue_group_io(struct obd_export *exp,
                               struct lov_oinfo *loi,
                               struct obd_io_group *oig, void *cookie,
                               int cmd, obd_off off, int count,
-                              obd_flag brw_flags, obd_flag async_flags)
+                              obd_flags brw_flags, obd_flags async_flags)
 {
         struct lov_obd *lov = &exp->exp_obd->u.lov;
         struct lov_async_page *lap;
index 57e8d5d..273425e 100644 (file)
 #define MDC_INTERNAL_H
 
 void mdc_getattr_pack(struct lustre_msg *msg, int offset,
-                      int valid, int flags, struct mdc_op_data *data);
+                      __u64 valid, int flags, struct mdc_op_data *data);
 void mdc_open_pack(struct lustre_msg *msg, int offset,
                    struct mdc_op_data *op_data, __u32 mode, __u64 rdev,
                    __u32 flags, const void *lmm, int lmmlen);
 void mdc_readdir_pack(struct ptlrpc_request *req, int req_offset,
                       __u64 offset, __u32 size, struct lustre_id *mdc_id);
 void mdc_close_pack(struct ptlrpc_request *req, int offset, struct obdo *oa,
-                   int valid, struct obd_client_handle *och);
+                   __u64 valid, struct obd_client_handle *och);
 
 struct mdc_open_data {
         struct obd_client_handle *mod_och;
index 7658bc5..bc6e4bb 100644 (file)
@@ -97,8 +97,8 @@ void mdc_open_pack(struct lustre_msg *msg, int offset,
         }
 }
 
-void mdc_getattr_pack(struct lustre_msg *msg, int offset, int valid,
-                      int flags, struct mdc_op_data *data)
+void mdc_getattr_pack(struct lustre_msg *msg, int offset,
+                      __u64 valid, int flags, struct mdc_op_data *data)
 {
         struct mds_body *b;
         b = lustre_msg_buf(msg, offset, sizeof (*b));
@@ -117,7 +117,7 @@ void mdc_getattr_pack(struct lustre_msg *msg, int offset, int valid,
 }
 
 void mdc_close_pack(struct ptlrpc_request *req, int offset, struct obdo *oa,
-                    int valid, struct obd_client_handle *och)
+                    __u64 valid, struct obd_client_handle *och)
 {
         struct mds_body *body;
 
index 56f8188..a64942d 100644 (file)
@@ -243,7 +243,7 @@ int mdc_enqueue(struct obd_export *exp,
                 reply_buffers = 3;
                 req->rq_replen = lustre_msg_size(3, repsize);
         } else if (it->it_op & (IT_GETATTR | IT_LOOKUP | IT_CHDIR)) {
-                int valid = data->valid | OBD_MD_FLNOTOBD | OBD_MD_FLEASIZE;
+                __u64 valid = data->valid | OBD_MD_FLNOTOBD | OBD_MD_FLEASIZE;
 
                 reqsize[req_buffers++] = sizeof(struct mds_body);
                 reqsize[req_buffers++] = data->namelen + 1;
index bac9cc5..1632fcb 100644 (file)
@@ -204,7 +204,7 @@ int mdc_getattr_common(struct obd_export *exp, unsigned int ea_size,
 }
 
 int mdc_getattr(struct obd_export *exp, struct lustre_id *id,
-                unsigned long valid, unsigned int ea_size,
+                __u64 valid, unsigned int ea_size,
                 struct ptlrpc_request **request)
 {
         struct ptlrpc_request *req;
@@ -241,7 +241,7 @@ int mdc_getattr(struct obd_export *exp, struct lustre_id *id,
 }
 
 int mdc_getattr_lock(struct obd_export *exp, struct lustre_id *id,
-                     char *filename, int namelen, unsigned long valid,
+                     char *filename, int namelen, __u64 valid,
                      unsigned int ea_size, struct ptlrpc_request **request)
 {
         struct ptlrpc_request *req;
index e1866ff..1c62018 100644 (file)
@@ -499,7 +499,7 @@ out:
         return rc;
 }
 
-static int mds_disconnect(struct obd_export *exp, int flags)
+static int mds_disconnect(struct obd_export *exp, unsigned long flags)
 {
         unsigned long irqflags;
         struct obd_device *obd;
@@ -757,13 +757,14 @@ static int mds_getattr_internal(struct obd_device *obd, struct dentry *dentry,
 
         if (dentry->d_flags & DCACHE_CROSS_REF) {
                 mds_pack_dentry2body(obd, body, dentry,
-                                     (reqbody->valid & OBD_MD_FID));
+                                     (reqbody->valid & OBD_MD_FID) ? 1 : 0);
                 CDEBUG(D_OTHER, "cross reference: "DLID4"\n",
                        OLID4(&body->id1));
                 RETURN(0);
         }
         
-        mds_pack_inode2body(obd, body, inode, (reqbody->valid & OBD_MD_FID));
+        mds_pack_inode2body(obd, body, inode, 
+                           (reqbody->valid & OBD_MD_FID) ? 1 : 0);
 
         if ((S_ISREG(inode->i_mode) && (reqbody->valid & OBD_MD_FLEASIZE)) ||
             (S_ISDIR(inode->i_mode) && (reqbody->valid & OBD_MD_FLDIREA))) {
@@ -829,7 +830,8 @@ out:
         return rc;
 }
 
-static int mds_getattr_pack_msg(struct ptlrpc_request *req, struct inode *inode,
+static int mds_getattr_pack_msg(struct ptlrpc_request *req, 
+                               struct inode *inode,
                                 int offset)
 {
         struct mds_obd *mds = mds_req2mds(req);
index f72e4a1..5c20b11 100644 (file)
@@ -2082,8 +2082,8 @@ static int mds_reint_unlink(struct mds_update_record *rec, int offset,
                         GOTO(cleanup, rc);
 
                 if (!(body->valid & OBD_MD_FLEASIZE)) {
-                        body->valid |=(OBD_MD_FLSIZE | OBD_MD_FLBLOCKS |
-                                       OBD_MD_FLATIME | OBD_MD_FLMTIME);
+                        body->valid |= (OBD_MD_FLSIZE | OBD_MD_FLBLOCKS |
+                                        OBD_MD_FLATIME | OBD_MD_FLMTIME);
                 } else if (mds_log_op_unlink(obd, child_inode,
                                 lustre_msg_buf(req->rq_repmsg, offset + 1, 0),
                                         req->rq_repmsg->buflens[offset + 1],
index fa125c8..9a04d7e 100644 (file)
@@ -62,9 +62,9 @@ int dump_rniobuf(struct niobuf_remote *nb)
 
 int dump_obdo(struct obdo *oa)
 {
-        __u32 valid = oa->o_valid;
+        __u64 valid = oa->o_valid;
 
-        CERROR("obdo: o_valid = %08x\n", valid);
+        CERROR("obdo: o_valid = "LPX64"\n", valid);
         if (valid & OBD_MD_FLID)
                 CERROR("obdo: o_id = "LPD64"\n", oa->o_id);
         if (valid & OBD_MD_FLATIME)
@@ -88,7 +88,7 @@ int dump_obdo(struct obdo *oa)
         if (valid & OBD_MD_FLGID)
                 CERROR("obdo: o_gid = %u\n", oa->o_gid);
         if (valid & OBD_MD_FLFLAGS)
-                CERROR("obdo: o_flags = %x\n", oa->o_flags);
+                CERROR("obdo: o_flags = 0x%x\n", oa->o_flags);
         if (valid & OBD_MD_FLNLINK)
                 CERROR("obdo: o_nlink = %u\n", oa->o_nlink);
         if (valid & OBD_MD_FLGENER)
index 76ead81..a1890b4 100644 (file)
@@ -641,7 +641,7 @@ int class_connect(struct lustre_handle *conn, struct obd_device *obd,
  * hash entry and one for the export pointer passed in.  The export
  * pointer passed to this function is destroyed should not be used
  * again. */
-int class_disconnect(struct obd_export *export, int flags)
+int class_disconnect(struct obd_export *export, unsigned long flags)
 {
         ENTRY;
 
@@ -669,7 +669,7 @@ int class_disconnect(struct obd_export *export, int flags)
         RETURN(0);
 }
 
-static void  class_disconnect_export_list(struct list_head *list, int flags)
+static void class_disconnect_export_list(struct list_head *list, unsigned long flags)
 {
         struct obd_export *fake_exp, *exp;
         struct lustre_handle fake_conn;
@@ -716,7 +716,7 @@ static void  class_disconnect_export_list(struct list_head *list, int flags)
         EXIT;
 }
 
-void class_disconnect_exports(struct obd_device *obd, int flags)
+void class_disconnect_exports(struct obd_device *obd, unsigned long flags)
 {
         struct list_head work_list;
         ENTRY;
@@ -735,7 +735,7 @@ void class_disconnect_exports(struct obd_device *obd, int flags)
 
 /* Remove exports that have not completed recovery.
  */
-void class_disconnect_stale_exports(struct obd_device *obd, int flags)
+void class_disconnect_stale_exports(struct obd_device *obd, unsigned long flags)
 {
         struct list_head work_list;
         struct list_head *pos, *n;
index 4e8e244..76b3d7f 100644 (file)
@@ -76,12 +76,12 @@ void obdo_from_iattr(struct obdo *oa, struct iattr *attr, unsigned int ia_valid)
 }
 EXPORT_SYMBOL(obdo_from_iattr);
 
-void iattr_from_obdo(struct iattr *attr, struct obdo *oa, obd_flag valid)
+void iattr_from_obdo(struct iattr *attr, struct obdo *oa, obd_valid valid)
 {
         valid &= oa->o_valid;
 
         if (valid & (OBD_MD_FLCTIME | OBD_MD_FLMTIME))
-                CDEBUG(D_INODE, "valid %x, new time %lu/%lu\n",
+                CDEBUG(D_INODE, "valid "LPX64", new time %lu/%lu\n",
                        oa->o_valid, (long)oa->o_mtime, (long)oa->o_ctime);
 
         attr->ia_valid = 0;
@@ -130,14 +130,13 @@ EXPORT_SYMBOL(iattr_from_obdo);
 
 /* WARNING: the file systems must take care not to tinker with
    attributes they don't manage (such as blocks). */
-void obdo_from_inode(struct obdo *dst, struct inode *src, obd_flag valid)
+void obdo_from_inode(struct obdo *dst, struct inode *src, obd_valid valid)
 {
-        obd_flag newvalid = 0;
+        obd_valid newvalid = 0;
 
         if (valid & (OBD_MD_FLCTIME | OBD_MD_FLMTIME))
-                CDEBUG(D_INODE, "valid %x, new time %lu/%lu\n",
-                       valid, LTIME_S(src->i_mtime), 
-                       LTIME_S(src->i_ctime));
+                CDEBUG(D_INODE, "valid "LPX64", new time %lu/%lu\n",
+                       valid, LTIME_S(src->i_mtime), LTIME_S(src->i_ctime));
 
         if (valid & OBD_MD_FLATIME) {
                 dst->o_atime = LTIME_S(src->i_atime);
@@ -192,12 +191,12 @@ void obdo_from_inode(struct obdo *dst, struct inode *src, obd_flag valid)
 }
 EXPORT_SYMBOL(obdo_from_inode);
 
-void obdo_refresh_inode(struct inode *dst, struct obdo *src, obd_flag valid)
+void obdo_refresh_inode(struct inode *dst, struct obdo *src, obd_valid valid)
 {
         valid &= src->o_valid;
 
         if (valid & (OBD_MD_FLCTIME | OBD_MD_FLMTIME))
-                CDEBUG(D_INODE, "valid %x, cur time %lu/%lu, new %lu/%lu\n",
+                CDEBUG(D_INODE, "valid "LPX64", cur time %lu/%lu, new %lu/%lu\n",
                        src->o_valid, LTIME_S(dst->i_mtime), 
                        LTIME_S(dst->i_ctime),
                        (long)src->o_mtime, (long)src->o_ctime);
@@ -221,12 +220,12 @@ void obdo_refresh_inode(struct inode *dst, struct obdo *src, obd_flag valid)
 }
 EXPORT_SYMBOL(obdo_refresh_inode);
 
-void obdo_to_inode(struct inode *dst, struct obdo *src, obd_flag valid)
+void obdo_to_inode(struct inode *dst, struct obdo *src, obd_valid valid)
 {
         valid &= src->o_valid;
 
         if (valid & (OBD_MD_FLCTIME | OBD_MD_FLMTIME))
-                CDEBUG(D_INODE, "valid %x, cur time %lu/%lu, new %lu/%lu\n",
+                CDEBUG(D_INODE, "valid "LPX64", cur time %lu/%lu, new %lu/%lu\n",
                        src->o_valid, 
                        LTIME_S(dst->i_mtime), LTIME_S(dst->i_ctime),
                        (long)src->o_mtime, (long)src->o_ctime);
@@ -259,10 +258,10 @@ void obdo_to_inode(struct inode *dst, struct obdo *src, obd_flag valid)
 EXPORT_SYMBOL(obdo_to_inode);
 #endif
 
-void obdo_cpy_md(struct obdo *dst, struct obdo *src, obd_flag valid)
+void obdo_cpy_md(struct obdo *dst, struct obdo *src, obd_valid valid)
 {
 #ifdef __KERNEL__
-        CDEBUG(D_INODE, "src obdo "LPX64" valid 0x%x, dst obdo "LPX64"\n",
+        CDEBUG(D_INODE, "src obdo "LPX64" valid "LPX64", dst obdo "LPX64"\n",
                src->o_id, src->o_valid, dst->o_id);
 #endif
         if (valid & OBD_MD_FLATIME)
@@ -297,7 +296,7 @@ void obdo_cpy_md(struct obdo *dst, struct obdo *src, obd_flag valid)
 EXPORT_SYMBOL(obdo_cpy_md);
 
 /* returns FALSE if comparison (by flags) is same, TRUE if changed */
-int obdo_cmp_md(struct obdo *dst, struct obdo *src, obd_flag compare)
+int obdo_cmp_md(struct obdo *dst, struct obdo *src, obd_valid compare)
 {
         int res = 0;
 
index e5e9ce8..b36b02a 100644 (file)
@@ -64,7 +64,7 @@ static int echo_connect(struct lustre_handle *conn, struct obd_device *obd,
         return class_connect(conn, obd, cluuid);
 }
 
-static int echo_disconnect(struct obd_export *exp, int flags)
+static int echo_disconnect(struct obd_export *exp, unsigned long flags)
 {
         unsigned long irqflags;
 
@@ -129,7 +129,7 @@ int echo_create(struct obd_export *exp, struct obdo *oa,
         }
 
         if (!(oa->o_valid & OBD_MD_FLTYPE)) {
-                CERROR("invalid o_valid %08x\n", oa->o_valid);
+                CERROR("invalid o_valid "LPX64"\n", oa->o_valid);
                 return -EINVAL;
         }
 
@@ -151,7 +151,7 @@ int echo_destroy(struct obd_export *exp, struct obdo *oa,
         }
 
         if (!(oa->o_valid & OBD_MD_FLID)) {
-                CERROR("obdo missing FLID valid flag: %08x\n", oa->o_valid);
+                CERROR("obdo missing FLID valid flag: "LPX64"\n", oa->o_valid);
                 RETURN(-EINVAL);
         }
 
@@ -177,7 +177,7 @@ static int echo_getattr(struct obd_export *exp, struct obdo *oa,
         }
 
         if (!(oa->o_valid & OBD_MD_FLID)) {
-                CERROR("obdo missing FLID valid flag: %08x\n", oa->o_valid);
+                CERROR("obdo missing FLID valid flag: "LPX64"\n", oa->o_valid);
                 RETURN(-EINVAL);
         }
 
@@ -199,7 +199,7 @@ static int echo_setattr(struct obd_export *exp, struct obdo *oa,
         }
 
         if (!(oa->o_valid & OBD_MD_FLID)) {
-                CERROR("obdo missing FLID valid flag: %08x\n", oa->o_valid);
+                CERROR("obdo missing FLID valid flag: "LPX64"\n", oa->o_valid);
                 RETURN(-EINVAL);
         }
 
index e14484f..c232078 100644 (file)
@@ -1393,8 +1393,9 @@ static int echo_client_cleanup(struct obd_device *obddev, int flags)
 }
 
 static int echo_client_connect(struct lustre_handle *conn,
-                               struct obd_device *src, struct obd_uuid *cluuid,
-                               unsigned long connect_flags)
+                               struct obd_device *src, 
+                              struct obd_uuid *cluuid,
+                               unsigned long flags)
 {
         struct obd_export *exp;
         int                rc;
@@ -1409,7 +1410,8 @@ static int echo_client_connect(struct lustre_handle *conn,
         RETURN (rc);
 }
 
-static int echo_client_disconnect(struct obd_export *exp, int flags)
+static int echo_client_disconnect(struct obd_export *exp, 
+                                 unsigned long flags)
 {
         struct obd_device      *obd;
         struct echo_client_obd *ec;
index ef1fc11..a630efc 100644 (file)
@@ -1945,7 +1945,7 @@ static void filter_sync_llogs(struct obd_device *obd, struct obd_export *dexp)
 }
 
 /* also incredibly similar to mds_disconnect */
-static int filter_disconnect(struct obd_export *exp, int flags)
+static int filter_disconnect(struct obd_export *exp, unsigned long flags)
 {
         struct obd_device *obd = exp->exp_obd;
         unsigned long irqflags;
@@ -2647,7 +2647,7 @@ static int filter_truncate(struct obd_export *exp, struct obdo *oa,
                 CERROR("PUNCH not supported, only truncate: end = "LPX64"\n",
                        end);
 
-        CDEBUG(D_INODE, "calling truncate for object "LPU64", valid = %x, "
+        CDEBUG(D_INODE, "calling truncate for object "LPU64", valid = "LPU64", "
                "o_size = "LPD64"\n", oa->o_id, oa->o_valid, start);
         oa->o_size = start;
         error = filter_setattr(exp, oa, NULL, oti);
index bba36c0..592c3d0 100644 (file)
@@ -23,7 +23,7 @@ struct osc_async_page {
         obd_off                 oap_obj_off;
         obd_off                 oap_page_off;
         int                     oap_count;
-        obd_flag                oap_brw_flags;
+        obd_flags                oap_brw_flags;
         enum async_flags        oap_async_flags;
 
         unsigned long           oap_interrupted:1;
index bee6711..fcfe939 100644 (file)
@@ -516,7 +516,7 @@ static int osc_destroy(struct obd_export *exp, struct obdo *oa,
 static void osc_announce_cached(struct client_obd *cli, struct obdo *oa,
                                 long writing_bytes)
 {
-        obd_flag bits = OBD_MD_FLBLOCKS|OBD_MD_FLGRANT;
+        obd_valid bits = OBD_MD_FLBLOCKS|OBD_MD_FLGRANT;
 
         LASSERT(!(oa->o_valid & bits));
 
@@ -1829,7 +1829,7 @@ struct osc_async_page *oap_from_cookie(void *cookie)
 static int osc_queue_async_io(struct obd_export *exp, struct lov_stripe_md *lsm,
                               struct lov_oinfo *loi, void *cookie,
                               int cmd, obd_off off, int count,
-                              obd_flag brw_flags, enum async_flags async_flags)
+                              obd_flags brw_flags, enum async_flags async_flags)
 {
         struct client_obd *cli = &exp->exp_obd->u.cli;
         struct osc_async_page *oap;
@@ -1893,7 +1893,7 @@ static int osc_queue_async_io(struct obd_export *exp, struct lov_stripe_md *lsm,
 static int osc_set_async_flags(struct obd_export *exp,
                                struct lov_stripe_md *lsm,
                                struct lov_oinfo *loi, void *cookie,
-                               obd_flag async_flags)
+                               obd_flags async_flags)
 {
         struct client_obd *cli = &exp->exp_obd->u.cli;
         struct loi_oap_pages *lop;
@@ -1947,8 +1947,8 @@ static int osc_queue_group_io(struct obd_export *exp, struct lov_stripe_md *lsm,
                              struct lov_oinfo *loi,
                              struct obd_io_group *oig, void *cookie,
                              int cmd, obd_off off, int count,
-                             obd_flag brw_flags,
-                             obd_flag async_flags)
+                             obd_flags brw_flags,
+                             obd_flags async_flags)
 {
         struct client_obd *cli = &exp->exp_obd->u.cli;
         struct osc_async_page *oap;
@@ -2954,7 +2954,7 @@ static int osc_connect(struct lustre_handle *exph,
         RETURN(rc);
 }
 
-static int osc_disconnect(struct obd_export *exp, int flags)
+static int osc_disconnect(struct obd_export *exp, unsigned long flags)
 {
         struct obd_device *obd = class_exp2obd(exp);
         struct llog_ctxt *ctxt;
index 633d64f..cdef863 100644 (file)
@@ -166,7 +166,7 @@ out_disco:
 
 
 /* modelled after ptlrpc_import_disconnect() */
-int ptlbd_cl_disconnect(struct obd_export *exp, int failover)
+int ptlbd_cl_disconnect(struct obd_export *exp, unsigned long flags)
 {
         struct obd_device *obd = exp->exp_obd;
         struct ptlbd_obd *ptlbd = &obd->u.ptlbd;
@@ -178,7 +178,8 @@ int ptlbd_cl_disconnect(struct obd_export *exp, int failover)
         if (!obd)
                 RETURN(-EINVAL);
 
-        request = ptlrpc_prep_req(imp, LUSTRE_PBD_VERSION, PTLBD_DISCONNECT,
+        request = ptlrpc_prep_req(imp, LUSTRE_PBD_VERSION, 
+                                 PTLBD_DISCONNECT,
                                   0, NULL, NULL);
         if (!request)
                 GOTO(out_req, rc = -ENOMEM);
index bb9b1e9..920ea49 100644 (file)
@@ -377,7 +377,7 @@ void lustre_swab_obdo (struct obdo  *o)
         __swab32s (&o->o_flags);
         __swab32s (&o->o_nlink);
         __swab32s (&o->o_generation);
-        __swab32s (&o->o_valid);
+        __swab64s (&o->o_valid);
         __swab32s (&o->o_misc);
         __swab32s (&o->o_easize);
         __swab32s (&o->o_mds);
@@ -640,7 +640,7 @@ void lustre_swab_mds_body (struct mds_body *b)
         /* handle is opaque */
         __swab64s (&b->size);
         __swab64s (&b->blocks);
-        __swab32s (&b->valid);
+        __swab64s (&b->valid);
         __swab32s (&b->mode);
         __swab32s (&b->uid);
         __swab32s (&b->gid);
index da9d992..f82a954 100644 (file)
@@ -324,7 +324,7 @@ int clonefs_mounted(struct snap_cache *cache, int index);
 #define FILTER_DID_JOURNAL_OPS 0x100
 
 struct filter_fs {
-       int o_flags;
+       unsigned long o_flags;
        struct filter_ops o_fops;
        struct cache_ops  o_caops;
        struct journal_ops *o_trops;
index 3313169..6426380 100644 (file)
@@ -182,7 +182,7 @@ char *obdo_print(struct obdo *obd)
         sprintf(buf, "id: "LPX64"\ngrp: "LPX64"\natime: "LPU64"\nmtime: "LPU64
                 "\nctime: "LPU64"\nsize: "LPU64"\nblocks: "LPU64
                 "\nblksize: %u\nmode: %o\nuid: %d\ngid: %d\nflags: %x\n"
-                "misc: %x\nnlink: %d,\nvalid %x\n",
+                "misc: %x\nnlink: %d,\nvalid "LPX64"\n",
                 obd->o_id, obd->o_gr, obd->o_atime, obd->o_mtime, obd->o_ctime,
                 obd->o_size, obd->o_blocks, obd->o_blksize, obd->o_mode,
                 obd->o_uid, obd->o_gid, obd->o_flags, obd->o_misc,
@@ -1194,7 +1194,7 @@ int jt_obd_create(int argc, char **argv)
                         break;
                 }
                 if (!(data.ioc_obdo1.o_valid & OBD_MD_FLID)) {
-                        fprintf(stderr, "error: %s: objid not valid #%d:%08x\n",
+                        fprintf(stderr, "error: %s: objid not valid #%d:"LPX64"\n",
                                 jt_cmdname(argv[0]), i, data.ioc_obdo1.o_valid);
                         rc = EINVAL;
                         break;
@@ -1473,7 +1473,7 @@ int jt_obd_test_getattr(int argc, char **argv)
         for (i = 1, next_count = verbose; i <= count; i++) {
                 data.ioc_obdo1.o_id = objid;
                 data.ioc_obdo1.o_mode = S_IFREG;
-                data.ioc_obdo1.o_valid = 0xffffffff;
+                data.ioc_obdo1.o_valid = 0xffffffffffffffff;
                 IOC_PACK(argv[0], data);
                 rc = l2_ioctl(OBD_DEV_ID, OBD_IOC_GETATTR, &data);
                 shmem_bump();