Whamcloud - gitweb
LU-5478 style: get rid of obd_* typedefs 40/13140/2
authorDmitry Eremin <dmitry.eremin@intel.com>
Fri, 19 Dec 2014 10:11:30 +0000 (13:11 +0300)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 26 Dec 2014 18:11:38 +0000 (18:11 +0000)
We have a bunch of typedefs for common things that made no sense
and hid the actual type from plain view.
Replace them with proper uXX or sXX types.
Exception is in lustre_idl.h and lustre_ioctl.h where
they are replaced with __uXX and __sXX to be able to be included
in userspace

First patch in series: modify main includes

Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I49f53ea25e28b1af31dd7d4cd36b27cf644464fc
Reviewed-on: http://review.whamcloud.com/13140
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
14 files changed:
lustre/include/cl_object.h
lustre/include/lu_object.h
lustre/include/lustre/lustre_idl.h
lustre/include/lustre_ioctl.h
lustre/include/lustre_lib.h
lustre/include/obd.h
lustre/include/obd_cksum.h
lustre/include/obd_class.h
lustre/include/obd_target.h
lustre/lmv/lmv_obd.c
lustre/mdc/mdc_request.c
lustre/mgc/mgc_request.c
lustre/osc/osc_request.c
lustre/ptlrpc/pack_generic.c

index db7576c..9989578 100644 (file)
@@ -2028,10 +2028,10 @@ struct cl_req_operations {
          *
          * \param flags \a oa fields to be filled.
          */
          *
          * \param flags \a oa fields to be filled.
          */
-        void (*cro_attr_set)(const struct lu_env *env,
-                             const struct cl_req_slice *slice,
-                             const struct cl_object *obj,
-                             struct cl_req_attr *attr, obd_valid flags);
+       void (*cro_attr_set)(const struct lu_env *env,
+                            const struct cl_req_slice *slice,
+                            const struct cl_object *obj,
+                            struct cl_req_attr *attr, u64 flags);
         /**
          * Called top-to-bottom from cl_req_completion() to notify layers that
          * transfer completed. Has to free all state allocated by
         /**
          * Called top-to-bottom from cl_req_completion() to notify layers that
          * transfer completed. Has to free all state allocated by
@@ -2623,8 +2623,8 @@ void cl_req_page_add  (const struct lu_env *env, struct cl_req *req,
                        struct cl_page *page);
 void cl_req_page_done (const struct lu_env *env, struct cl_page *page);
 int  cl_req_prep      (const struct lu_env *env, struct cl_req *req);
                        struct cl_page *page);
 void cl_req_page_done (const struct lu_env *env, struct cl_page *page);
 int  cl_req_prep      (const struct lu_env *env, struct cl_req *req);
-void cl_req_attr_set  (const struct lu_env *env, struct cl_req *req,
-                       struct cl_req_attr *attr, obd_valid flags);
+void cl_req_attr_set(const struct lu_env *env, struct cl_req *req,
+                    struct cl_req_attr *attr, u64 flags);
 void cl_req_completion(const struct lu_env *env, struct cl_req *req, int ioret);
 
 /** \defgroup cl_sync_io cl_sync_io
 void cl_req_completion(const struct lu_env *env, struct cl_req *req, int ioret);
 
 /** \defgroup cl_sync_io cl_sync_io
index 17146cf..698292d 100644 (file)
@@ -407,12 +407,12 @@ static inline int lu_device_is_md(const struct lu_device *d)
 struct lu_attr {
         /** size in bytes */
         __u64          la_size;
 struct lu_attr {
         /** size in bytes */
         __u64          la_size;
-        /** modification time in seconds since Epoch */
-        obd_time       la_mtime;
-        /** access time in seconds since Epoch */
-        obd_time       la_atime;
-        /** change time in seconds since Epoch */
-        obd_time       la_ctime;
+       /** modification time in seconds since Epoch */
+       s64             la_mtime;
+       /** access time in seconds since Epoch */
+       s64             la_atime;
+       /** change time in seconds since Epoch */
+       s64             la_ctime;
         /** 512-byte blocks allocated to object */
         __u64          la_blocks;
         /** permission bits and file type */
         /** 512-byte blocks allocated to object */
         __u64          la_blocks;
         /** permission bits and file type */
index 64cb2a9..46009c0 100644 (file)
 #define LUSTRE_LOG_VERSION  0x00050000
 #define LUSTRE_MGS_VERSION  0x00060000
 
 #define LUSTRE_LOG_VERSION  0x00050000
 #define LUSTRE_MGS_VERSION  0x00060000
 
+/* TODO: All obd_* typedefs will be removed in last patch in series */
 typedef __u64 obd_id;
 typedef __u64 obd_seq;
 typedef __s64 obd_time;
 typedef __u64 obd_id;
 typedef __u64 obd_seq;
 typedef __s64 obd_time;
@@ -417,7 +418,7 @@ static inline void fid_zero(struct lu_fid *fid)
         memset(fid, 0, sizeof(*fid));
 }
 
         memset(fid, 0, sizeof(*fid));
 }
 
-static inline obd_id fid_ver_oid(const struct lu_fid *fid)
+static inline __u64 fid_ver_oid(const struct lu_fid *fid)
 {
         return ((__u64)fid_ver(fid) << 32 | fid_oid(fid));
 }
 {
         return ((__u64)fid_ver(fid) << 32 | fid_oid(fid));
 }
@@ -483,7 +484,7 @@ enum dot_lustre_oid {
        FID_OID_DOT_LUSTRE_LPF  = 3UL,
 };
 
        FID_OID_DOT_LUSTRE_LPF  = 3UL,
 };
 
-static inline bool fid_seq_is_mdt0(obd_seq seq)
+static inline bool fid_seq_is_mdt0(__u64 seq)
 {
        return seq == FID_SEQ_OST_MDT0;
 }
 {
        return seq == FID_SEQ_OST_MDT0;
 }
@@ -493,7 +494,7 @@ static inline bool fid_seq_is_mdt(__u64 seq)
        return seq == FID_SEQ_OST_MDT0 || seq >= FID_SEQ_NORMAL;
 };
 
        return seq == FID_SEQ_OST_MDT0 || seq >= FID_SEQ_NORMAL;
 };
 
-static inline bool fid_seq_is_echo(obd_seq seq)
+static inline bool fid_seq_is_echo(__u64 seq)
 {
        return seq == FID_SEQ_ECHO;
 }
 {
        return seq == FID_SEQ_ECHO;
 }
@@ -503,7 +504,7 @@ static inline bool fid_is_echo(const struct lu_fid *fid)
        return fid_seq_is_echo(fid_seq(fid));
 }
 
        return fid_seq_is_echo(fid_seq(fid));
 }
 
-static inline bool fid_seq_is_llog(obd_seq seq)
+static inline bool fid_seq_is_llog(__u64 seq)
 {
        return seq == FID_SEQ_LLOG;
 }
 {
        return seq == FID_SEQ_LLOG;
 }
@@ -608,18 +609,18 @@ static inline int fid_is_layout_rbtree(const struct lu_fid *fid)
 }
 
 /* convert an OST objid into an IDIF FID SEQ number */
 }
 
 /* convert an OST objid into an IDIF FID SEQ number */
-static inline obd_seq fid_idif_seq(obd_id id, __u32 ost_idx)
+static inline __u64 fid_idif_seq(__u64 id, __u32 ost_idx)
 {
        return FID_SEQ_IDIF | (ost_idx << 16) | ((id >> 32) & 0xffff);
 }
 
 /* convert a packed IDIF FID into an OST objid */
 {
        return FID_SEQ_IDIF | (ost_idx << 16) | ((id >> 32) & 0xffff);
 }
 
 /* convert a packed IDIF FID into an OST objid */
-static inline obd_id fid_idif_id(obd_seq seq, __u32 oid, __u32 ver)
+static inline __u64 fid_idif_id(__u64 seq, __u32 oid, __u32 ver)
 {
        return ((__u64)ver << 48) | ((seq & 0xffff) << 32) | oid;
 }
 
 {
        return ((__u64)ver << 48) | ((seq & 0xffff) << 32) | oid;
 }
 
-static inline __u32 idif_ost_idx(obd_seq seq)
+static inline __u32 idif_ost_idx(__u64 seq)
 {
        return (seq >> 16) & 0xffff;
 }
 {
        return (seq >> 16) & 0xffff;
 }
@@ -631,7 +632,7 @@ static inline __u32 fid_idif_ost_idx(const struct lu_fid *fid)
 }
 
 /* extract OST sequence (group) from a wire ost_id (id/seq) pair */
 }
 
 /* extract OST sequence (group) from a wire ost_id (id/seq) pair */
-static inline obd_seq ostid_seq(const struct ost_id *ostid)
+static inline __u64 ostid_seq(const struct ost_id *ostid)
 {
        if (fid_seq_is_mdt0(ostid->oi.oi_seq))
                return FID_SEQ_OST_MDT0;
 {
        if (fid_seq_is_mdt0(ostid->oi.oi_seq))
                return FID_SEQ_OST_MDT0;
@@ -646,7 +647,7 @@ static inline obd_seq ostid_seq(const struct ost_id *ostid)
 }
 
 /* extract OST objid from a wire ost_id (id/seq) pair */
 }
 
 /* extract OST objid from a wire ost_id (id/seq) pair */
-static inline obd_id ostid_id(const struct ost_id *ostid)
+static inline __u64 ostid_id(const struct ost_id *ostid)
 {
        if (fid_seq_is_mdt0(ostid->oi.oi_seq))
                return ostid->oi.oi_id & IDIF_OID_MASK;
 {
        if (fid_seq_is_mdt0(ostid->oi.oi_seq))
                return ostid->oi.oi_id & IDIF_OID_MASK;
@@ -762,7 +763,7 @@ static inline int fid_set_id(struct lu_fid *fid, __u64 oid)
 static inline int ostid_to_fid(struct lu_fid *fid, const struct ost_id *ostid,
                               __u32 ost_idx)
 {
 static inline int ostid_to_fid(struct lu_fid *fid, const struct ost_id *ostid,
                               __u32 ost_idx)
 {
-       obd_seq seq = ostid_seq(ostid);
+       __u64 seq = ostid_seq(ostid);
 
        if (ost_idx > 0xffff) {
                CERROR("bad ost_idx, "DOSTID" ost_idx:%u\n", POSTID(ostid),
 
        if (ost_idx > 0xffff) {
                CERROR("bad ost_idx, "DOSTID" ost_idx:%u\n", POSTID(ostid),
@@ -771,7 +772,7 @@ static inline int ostid_to_fid(struct lu_fid *fid, const struct ost_id *ostid,
        }
 
        if (fid_seq_is_mdt0(seq)) {
        }
 
        if (fid_seq_is_mdt0(seq)) {
-               obd_id oid = ostid_id(ostid);
+               __u64 oid = ostid_id(ostid);
 
                /* This is a "legacy" (old 1.x/2.early) OST object in "group 0"
                 * that we map into the IDIF namespace.  It allows up to 2^48
 
                /* This is a "legacy" (old 1.x/2.early) OST object in "group 0"
                 * that we map into the IDIF namespace.  It allows up to 2^48
@@ -1916,25 +1917,25 @@ void lustre_swab_niobuf_remote(struct niobuf_remote *nbr);
 #define OST_LVB_GET_ERR(blocks)    (int)(blocks - OST_LVB_ERR_INIT)
 
 struct ost_lvb_v1 {
 #define OST_LVB_GET_ERR(blocks)    (int)(blocks - OST_LVB_ERR_INIT)
 
 struct ost_lvb_v1 {
-       __u64           lvb_size;
-       obd_time        lvb_mtime;
-       obd_time        lvb_atime;
-       obd_time        lvb_ctime;
-       __u64           lvb_blocks;
+       __u64   lvb_size;
+       __s64   lvb_mtime;
+       __s64   lvb_atime;
+       __s64   lvb_ctime;
+       __u64   lvb_blocks;
 };
 
 extern void lustre_swab_ost_lvb_v1(struct ost_lvb_v1 *lvb);
 
 struct ost_lvb {
 };
 
 extern void lustre_swab_ost_lvb_v1(struct ost_lvb_v1 *lvb);
 
 struct ost_lvb {
-       __u64           lvb_size;
-       obd_time        lvb_mtime;
-       obd_time        lvb_atime;
-       obd_time        lvb_ctime;
-       __u64           lvb_blocks;
-       __u32           lvb_mtime_ns;
-       __u32           lvb_atime_ns;
-       __u32           lvb_ctime_ns;
-       __u32           lvb_padding;
+       __u64   lvb_size;
+       __s64   lvb_mtime;
+       __s64   lvb_atime;
+       __s64   lvb_ctime;
+       __u64   lvb_blocks;
+       __u32   lvb_mtime_ns;
+       __u32   lvb_atime_ns;
+       __u32   lvb_ctime_ns;
+       __u32   lvb_padding;
 };
 
 extern void lustre_swab_ost_lvb(struct ost_lvb *lvb);
 };
 
 extern void lustre_swab_ost_lvb(struct ost_lvb *lvb);
@@ -2306,9 +2307,9 @@ struct mdt_body {
        struct lustre_handle mbo_handle;
        __u64   mbo_valid;
        __u64   mbo_size; /* Offset, in the case of MDS_READPAGE */
        struct lustre_handle mbo_handle;
        __u64   mbo_valid;
        __u64   mbo_size; /* Offset, in the case of MDS_READPAGE */
-       obd_time mbo_mtime;
-       obd_time mbo_atime;
-       obd_time mbo_ctime;
+       __s64   mbo_mtime;
+       __s64   mbo_atime;
+       __s64   mbo_ctime;
        __u64   mbo_blocks; /* XID, in the case of MDS_READPAGE */
        __u64   mbo_ioepoch;
        __u64   mbo_t_state; /* transient file state defined in
        __u64   mbo_blocks; /* XID, in the case of MDS_READPAGE */
        __u64   mbo_ioepoch;
        __u64   mbo_t_state; /* transient file state defined in
@@ -2391,9 +2392,9 @@ struct mdt_rec_setattr {
         __u32           sa_gid;
         __u64           sa_size;
         __u64           sa_blocks;
         __u32           sa_gid;
         __u64           sa_size;
         __u64           sa_blocks;
-        obd_time        sa_mtime;
-        obd_time        sa_atime;
-        obd_time        sa_ctime;
+       __s64           sa_mtime;
+       __s64           sa_atime;
+       __s64           sa_ctime;
         __u32           sa_attr_flags;
         __u32           sa_mode;
        __u32           sa_bias;      /* some operation flags */
         __u32           sa_attr_flags;
         __u32           sa_mode;
        __u32           sa_bias;      /* some operation flags */
@@ -2529,7 +2530,7 @@ struct mdt_rec_create {
         struct lu_fid   cr_fid1;
         struct lu_fid   cr_fid2;
         struct lustre_handle cr_old_handle; /* handle in case of open replay */
         struct lu_fid   cr_fid1;
         struct lu_fid   cr_fid2;
         struct lustre_handle cr_old_handle; /* handle in case of open replay */
-        obd_time        cr_time;
+       __s64           cr_time;
         __u64           cr_rdev;
         __u64           cr_ioepoch;
         __u64           cr_padding_1;   /* rr_blocks */
         __u64           cr_rdev;
         __u64           cr_ioepoch;
         __u64           cr_padding_1;   /* rr_blocks */
@@ -2569,7 +2570,7 @@ struct mdt_rec_link {
         __u32           lk_suppgid2_h;
         struct lu_fid   lk_fid1;
         struct lu_fid   lk_fid2;
         __u32           lk_suppgid2_h;
         struct lu_fid   lk_fid1;
         struct lu_fid   lk_fid2;
-        obd_time        lk_time;
+       __s64           lk_time;
         __u64           lk_padding_1;   /* rr_atime */
         __u64           lk_padding_2;   /* rr_ctime */
         __u64           lk_padding_3;   /* rr_size */
         __u64           lk_padding_1;   /* rr_atime */
         __u64           lk_padding_2;   /* rr_ctime */
         __u64           lk_padding_3;   /* rr_size */
@@ -2596,7 +2597,7 @@ struct mdt_rec_unlink {
         __u32           ul_suppgid2_h;
         struct lu_fid   ul_fid1;
         struct lu_fid   ul_fid2;
         __u32           ul_suppgid2_h;
         struct lu_fid   ul_fid1;
         struct lu_fid   ul_fid2;
-        obd_time        ul_time;
+       __s64           ul_time;
         __u64           ul_padding_2;   /* rr_atime */
         __u64           ul_padding_3;   /* rr_ctime */
         __u64           ul_padding_4;   /* rr_size */
         __u64           ul_padding_2;   /* rr_atime */
         __u64           ul_padding_3;   /* rr_ctime */
         __u64           ul_padding_4;   /* rr_size */
@@ -2623,7 +2624,7 @@ struct mdt_rec_rename {
         __u32           rn_suppgid2_h;
         struct lu_fid   rn_fid1;
         struct lu_fid   rn_fid2;
         __u32           rn_suppgid2_h;
         struct lu_fid   rn_fid1;
         struct lu_fid   rn_fid2;
-        obd_time        rn_time;
+       __s64           rn_time;
         __u64           rn_padding_1;   /* rr_atime */
         __u64           rn_padding_2;   /* rr_ctime */
         __u64           rn_padding_3;   /* rr_size */
         __u64           rn_padding_1;   /* rr_atime */
         __u64           rn_padding_2;   /* rr_ctime */
         __u64           rn_padding_3;   /* rr_size */
@@ -2653,7 +2654,7 @@ struct mdt_rec_setxattr {
         __u32           sx_padding_2;
         __u32           sx_padding_3;
         __u64           sx_valid;
         __u32           sx_padding_2;
         __u32           sx_padding_3;
         __u64           sx_valid;
-        obd_time        sx_time;
+       __s64           sx_time;
         __u64           sx_padding_5;   /* rr_ctime */
         __u64           sx_padding_6;   /* rr_size */
         __u64           sx_padding_7;   /* rr_blocks */
         __u64           sx_padding_5;   /* rr_ctime */
         __u64           sx_padding_6;   /* rr_size */
         __u64           sx_padding_7;   /* rr_blocks */
@@ -2686,9 +2687,9 @@ struct mdt_rec_reint {
        __u32           rr_suppgid2_h;
        struct lu_fid   rr_fid1;
        struct lu_fid   rr_fid2;
        __u32           rr_suppgid2_h;
        struct lu_fid   rr_fid1;
        struct lu_fid   rr_fid2;
-       obd_time        rr_mtime;
-       obd_time        rr_atime;
-       obd_time        rr_ctime;
+       __s64           rr_mtime;
+       __s64           rr_atime;
+       __s64           rr_ctime;
        __u64           rr_size;
        __u64           rr_blocks;
        __u32           rr_bias;
        __u64           rr_size;
        __u64           rr_blocks;
        __u32           rr_bias;
@@ -3153,14 +3154,14 @@ extern void lustre_swab_mgs_config_res(struct mgs_config_res *body);
 #define CM_START_SKIP (CM_START | CM_SKIP)
 
 struct cfg_marker {
 #define CM_START_SKIP (CM_START | CM_SKIP)
 
 struct cfg_marker {
-        __u32             cm_step;       /* aka config version */
-        __u32             cm_flags;
-        __u32             cm_vers;       /* lustre release version number */
-        __u32             cm_padding;    /* 64 bit align */
-        obd_time          cm_createtime; /*when this record was first created */
-        obd_time          cm_canceltime; /*when this record is no longer valid*/
-        char              cm_tgtname[MTI_NAME_MAXLEN];
-        char              cm_comment[MTI_NAME_MAXLEN];
+       __u32   cm_step;       /* aka config version */
+       __u32   cm_flags;
+       __u32   cm_vers;       /* lustre release version number */
+       __u32   cm_padding;    /* 64 bit align */
+       __s64   cm_createtime; /*when this record was first created */
+       __s64   cm_canceltime; /*when this record is no longer valid*/
+       char    cm_tgtname[MTI_NAME_MAXLEN];
+       char    cm_comment[MTI_NAME_MAXLEN];
 };
 
 extern void lustre_swab_cfg_marker(struct cfg_marker *marker,
 };
 
 extern void lustre_swab_cfg_marker(struct cfg_marker *marker,
@@ -3290,16 +3291,16 @@ struct llog_logid_rec {
 
 struct llog_unlink_rec {
        struct llog_rec_hdr     lur_hdr;
 
 struct llog_unlink_rec {
        struct llog_rec_hdr     lur_hdr;
-       obd_id                  lur_oid;
-       obd_count               lur_oseq;
-       obd_count               lur_count;
+       __u64                   lur_oid;
+       __u32                   lur_oseq;
+       __u32                   lur_count;
        struct llog_rec_tail    lur_tail;
 } __attribute__((packed));
 
 struct llog_unlink64_rec {
        struct llog_rec_hdr     lur_hdr;
        struct lu_fid           lur_fid;
        struct llog_rec_tail    lur_tail;
 } __attribute__((packed));
 
 struct llog_unlink64_rec {
        struct llog_rec_hdr     lur_hdr;
        struct lu_fid           lur_fid;
-       obd_count               lur_count; /* to destroy the lost precreated */
+       __u32                   lur_count; /* to destroy the lost precreated */
        __u32                   lur_padding1;
        __u64                   lur_padding2;
        __u64                   lur_padding3;
        __u32                   lur_padding1;
        __u64                   lur_padding2;
        __u64                   lur_padding3;
@@ -3440,8 +3441,8 @@ enum llog_flag {
 };
 
 struct llog_log_hdr {
 };
 
 struct llog_log_hdr {
-        struct llog_rec_hdr     llh_hdr;
-        obd_time                llh_timestamp;
+       struct llog_rec_hdr     llh_hdr;
+       __s64                   llh_timestamp;
         __u32                   llh_count;
         __u32                   llh_bitmap_offset;
         __u32                   llh_size;
         __u32                   llh_count;
         __u32                   llh_bitmap_offset;
         __u32                   llh_size;
@@ -3499,37 +3500,37 @@ struct llogd_conn_body {
 
 /* Note: 64-bit types are 64-bit aligned in structure */
 struct obdo {
 
 /* Note: 64-bit types are 64-bit aligned in structure */
 struct obdo {
-        obd_valid               o_valid;        /* hot fields in this obdo */
-       struct ost_id           o_oi;
-        obd_id                  o_parent_seq;
-        obd_size                o_size;         /* o_size-o_blocks == ost_lvb */
-        obd_time                o_mtime;
-        obd_time                o_atime;
-        obd_time                o_ctime;
-        obd_blocks              o_blocks;       /* brw: cli sent cached bytes */
-        obd_size                o_grant;
-
-        /* 32-bit fields start here: keep an even number of them via padding */
-        obd_blksize             o_blksize;      /* optimal IO blocksize */
-        obd_mode                o_mode;         /* brw: cli sent cache remain */
-        obd_uid                 o_uid;
-        obd_gid                 o_gid;
-        obd_flag                o_flags;
-        obd_count               o_nlink;        /* brw: checksum */
-        obd_count               o_parent_oid;
-       obd_count               o_misc;         /* brw: o_dropped */
-
-        __u64                   o_ioepoch;      /* epoch in ost writes */
-        __u32                   o_stripe_idx;   /* holds stripe idx */
-        __u32                   o_parent_ver;
-        struct lustre_handle    o_handle;       /* brw: lock handle to prolong
-                                                 * locks */
-        struct llog_cookie      o_lcookie;      /* destroy: unlink cookie from
-                                                 * MDS */
+       __u64                   o_valid;        /* hot fields in this obdo */
+       struct ost_id           o_oi;
+       __u64                   o_parent_seq;
+       __u64                   o_size;         /* o_size-o_blocks == ost_lvb */
+       __s64                   o_mtime;
+       __s64                   o_atime;
+       __s64                   o_ctime;
+       __u64                   o_blocks;       /* brw: cli sent cached bytes */
+       __u64                   o_grant;
+
+       /* 32-bit fields start here: keep an even number of them via padding */
+       __u32                   o_blksize;      /* optimal IO blocksize */
+       __u32                   o_mode;         /* brw: cli sent cache remain */
+       __u32                   o_uid;
+       __u32                   o_gid;
+       __u32                   o_flags;
+       __u32                   o_nlink;        /* brw: checksum */
+       __u32                   o_parent_oid;
+       __u32                   o_misc;         /* brw: o_dropped */
+
+       __u64                   o_ioepoch;      /* epoch in ost writes */
+       __u32                   o_stripe_idx;   /* holds stripe idx */
+       __u32                   o_parent_ver;
+       struct lustre_handle    o_handle;       /* brw: lock handle to prolong
+                                                * locks */
+       struct llog_cookie      o_lcookie;      /* destroy: unlink cookie from
+                                                * MDS */
        __u32                   o_uid_h;
        __u32                   o_gid_h;
 
        __u32                   o_uid_h;
        __u32                   o_gid_h;
 
-       __u64                   o_data_version; /* getattr: sum of iversion for
+       __u64                   o_data_version; /* getattr: sum of iversion for
                                                 * each stripe.
                                                 * brw: grant space consumed on
                                                 * the client for the write */
                                                 * each stripe.
                                                 * brw: grant space consumed on
                                                 * the client for the write */
@@ -3632,7 +3633,7 @@ static inline void lustre_get_wire_obdo(const struct obd_connect_data *ocd,
                                        struct obdo *lobdo,
                                        const struct obdo *wobdo)
 {
                                        struct obdo *lobdo,
                                        const struct obdo *wobdo)
 {
-        obd_flag local_flags = 0;
+       __u32 local_flags = 0;
 
         if (lobdo->o_valid & OBD_MD_FLFLAGS)
                  local_flags = lobdo->o_flags & OBD_FL_LOCAL_MASK;
 
         if (lobdo->o_valid & OBD_MD_FLFLAGS)
                  local_flags = lobdo->o_flags & OBD_FL_LOCAL_MASK;
@@ -3670,7 +3671,7 @@ struct ll_fiemap_info_key {
 };
 
 extern void lustre_swab_ost_body (struct ost_body *b);
 };
 
 extern void lustre_swab_ost_body (struct ost_body *b);
-extern void lustre_swab_ost_last_id(obd_id *id);
+extern void lustre_swab_ost_last_id(__u64 *id);
 extern void lustre_swab_fiemap(struct ll_user_fiemap *fiemap);
 
 extern void lustre_swab_lov_user_md_v1(struct lov_user_md_v1 *lum);
 extern void lustre_swab_fiemap(struct ll_user_fiemap *fiemap);
 
 extern void lustre_swab_lov_user_md_v1(struct lov_user_md_v1 *lum);
index 8dbfc8f..0b2cc82 100644 (file)
@@ -79,8 +79,8 @@ struct obd_ioctl_data {
        struct obdo     ioc_obdo1;
        struct obdo     ioc_obdo2;
 
        struct obdo     ioc_obdo1;
        struct obdo     ioc_obdo2;
 
-       obd_size        ioc_count;
-       obd_off         ioc_offset;
+       __u64           ioc_count;
+       __u64           ioc_offset;
        __u32           ioc_dev;
        __u32           ioc_command;
 
        __u32           ioc_dev;
        __u32           ioc_command;
 
index e37b2f7..952e403 100644 (file)
@@ -79,10 +79,10 @@ int target_bulk_io(struct obd_export *exp, struct ptlrpc_bulk_desc *desc,
 
 int target_pack_pool_reply(struct ptlrpc_request *req);
 int do_set_info_async(struct obd_import *imp,
 
 int target_pack_pool_reply(struct ptlrpc_request *req);
 int do_set_info_async(struct obd_import *imp,
-                      int opcode, int version,
-                      obd_count keylen, void *key,
-                      obd_count vallen, void *val,
-                      struct ptlrpc_request_set *set);
+                     int opcode, int version,
+                     size_t keylen, void *key,
+                     size_t vallen, void *val,
+                     struct ptlrpc_request_set *set);
 
 void target_send_reply(struct ptlrpc_request *req, int rc, int fail_id);
 
 
 void target_send_reply(struct ptlrpc_request *req, int rc, int fail_id);
 
index 33e0a16..499ead9 100644 (file)
@@ -175,10 +175,10 @@ struct obd_type {
 };
 
 struct brw_page {
 };
 
 struct brw_page {
-       obd_off  off;
-       struct page *pg;
-       unsigned int count;
-       obd_flag flag;
+       u64              off;
+       struct page     *pg;
+       u32              count;
+       u32              flag;
 };
 
 struct timeout_item {
 };
 
 struct timeout_item {
@@ -337,8 +337,8 @@ struct client_obd {
 #define obd2cli_tgt(obd) ((char *)(obd)->u.cli.cl_target_uuid.uuid)
 
 struct obd_id_info {
 #define obd2cli_tgt(obd) ((char *)(obd)->u.cli.cl_target_uuid.uuid)
 
 struct obd_id_info {
-        __u32   idx;
-        obd_id  *data;
+       u32      idx;
+       u64     *data;
 };
 
 struct echo_client_obd {
 };
 
 struct echo_client_obd {
@@ -793,8 +793,8 @@ struct md_op_data {
         struct lu_fid           op_fid3; /* 2 extra fids to find conflicting */
         struct lu_fid           op_fid4; /* to the operation locks. */
        u32                     op_mds;  /* what mds server open will go to */
         struct lu_fid           op_fid3; /* 2 extra fids to find conflicting */
         struct lu_fid           op_fid4; /* to the operation locks. */
        u32                     op_mds;  /* what mds server open will go to */
-        struct lustre_handle    op_handle;
-        obd_time                op_mod_time;
+       struct lustre_handle    op_handle;
+       s64                     op_mod_time;
         const char             *op_name;
        size_t                  op_namelen;
         __u32                   op_mode;
         const char             *op_name;
        size_t                  op_namelen;
         __u32                   op_mode;
@@ -861,19 +861,19 @@ struct obd_ops {
        struct module *o_owner;
        int (*o_iocontrol)(unsigned int cmd, struct obd_export *exp, int len,
                           void *karg, void __user *uarg);
        struct module *o_owner;
        int (*o_iocontrol)(unsigned int cmd, struct obd_export *exp, int len,
                           void *karg, void __user *uarg);
-        int (*o_get_info)(const struct lu_env *env, struct obd_export *,
-                          __u32 keylen, void *key, __u32 *vallen, void *val,
-                          struct lov_stripe_md *lsm);
-        int (*o_set_info_async)(const struct lu_env *, struct obd_export *,
-                                __u32 keylen, void *key,
-                                __u32 vallen, void *val,
-                                struct ptlrpc_request_set *set);
+       int (*o_get_info)(const struct lu_env *env, struct obd_export *,
+                         __u32 keylen, void *key,
+                         __u32 *vallen, void *val,
+                         struct lov_stripe_md *lsm);
+       int (*o_set_info_async)(const struct lu_env *, struct obd_export *,
+                               __u32 keylen, void *key,
+                               __u32 vallen, void *val,
+                               struct ptlrpc_request_set *set);
         int (*o_setup) (struct obd_device *dev, struct lustre_cfg *cfg);
         int (*o_precleanup)(struct obd_device *dev,
                             enum obd_cleanup_stage cleanup_stage);
         int (*o_cleanup)(struct obd_device *dev);
         int (*o_setup) (struct obd_device *dev, struct lustre_cfg *cfg);
         int (*o_precleanup)(struct obd_device *dev,
                             enum obd_cleanup_stage cleanup_stage);
         int (*o_cleanup)(struct obd_device *dev);
-        int (*o_process_config)(struct obd_device *dev, obd_count len,
-                                void *data);
+       int (*o_process_config)(struct obd_device *dev, size_t len, void *data);
         int (*o_postrecov)(struct obd_device *dev);
         int (*o_add_conn)(struct obd_import *imp, struct obd_uuid *uuid,
                           int priority);
         int (*o_postrecov)(struct obd_device *dev);
         int (*o_add_conn)(struct obd_import *imp, struct obd_uuid *uuid,
                           int priority);
@@ -1067,12 +1067,12 @@ struct md_ops {
                        struct ptlrpc_request **);
 
        int (*m_setxattr)(struct obd_export *, const struct lu_fid *,
                        struct ptlrpc_request **);
 
        int (*m_setxattr)(struct obd_export *, const struct lu_fid *,
-                         struct obd_capa *, obd_valid, const char *,
+                         struct obd_capa *, u64, const char *,
                          const char *, int, int, int, __u32,
                          struct ptlrpc_request **);
 
        int (*m_getxattr)(struct obd_export *, const struct lu_fid *,
                          const char *, int, int, int, __u32,
                          struct ptlrpc_request **);
 
        int (*m_getxattr)(struct obd_export *, const struct lu_fid *,
-                         struct obd_capa *, obd_valid, const char *,
+                         struct obd_capa *, u64, const char *,
                          const char *, int, int, int,
                          struct ptlrpc_request **);
 
                          const char *, int, int, int,
                          struct ptlrpc_request **);
 
@@ -1149,11 +1149,11 @@ struct md_ops {
 };
 
 struct lsm_operations {
 };
 
 struct lsm_operations {
-        void (*lsm_free)(struct lov_stripe_md *);
-        void (*lsm_stripe_by_index)(struct lov_stripe_md *, int *, obd_off *,
-                                    obd_off *);
-        void (*lsm_stripe_by_offset)(struct lov_stripe_md *, int *, obd_off *,
-                                     obd_off *);
+       void (*lsm_free)(struct lov_stripe_md *);
+       void (*lsm_stripe_by_index)(struct lov_stripe_md *, int *, u64 *,
+                                   u64 *);
+       void (*lsm_stripe_by_offset)(struct lov_stripe_md *, int *, u64 *,
+                                    u64 *);
         int (*lsm_lmm_verify) (struct lov_mds_md *lmm, int lmm_bytes,
                                __u16 *stripe_count);
         int (*lsm_unpackmd) (struct lov_obd *lov, struct lov_stripe_md *lsm,
         int (*lsm_lmm_verify) (struct lov_mds_md *lmm, int lmm_bytes,
                                __u16 *stripe_count);
         int (*lsm_unpackmd) (struct lov_obd *lov, struct lov_stripe_md *lsm,
@@ -1195,7 +1195,7 @@ static inline struct md_open_data *obd_mod_alloc(void)
        }                                                         \
 })
 
        }                                                         \
 })
 
-void obdo_from_inode(struct obdo *dst, struct inode *src, obd_flag valid);
+void obdo_from_inode(struct obdo *dst, struct inode *src, u32 valid);
 void obdo_set_parent_fid(struct obdo *dst, const struct lu_fid *parent);
 
 /* return 1 if client should be resend request */
 void obdo_set_parent_fid(struct obdo *dst, const struct lu_fid *parent);
 
 /* return 1 if client should be resend request */
index 7d00abb..4c779e9 100644 (file)
@@ -65,10 +65,10 @@ static inline unsigned char cksum_obd2cfs(cksum_type_t cksum_type)
  * because that is supported by all clients since 1.8
  *
  * In case multiple algorithms are supported the best one is used. */
  * because that is supported by all clients since 1.8
  *
  * In case multiple algorithms are supported the best one is used. */
-static inline obd_flag cksum_type_pack(cksum_type_t cksum_type)
+static inline u32 cksum_type_pack(cksum_type_t cksum_type)
 {
        unsigned int    performance = 0, tmp;
 {
        unsigned int    performance = 0, tmp;
-       obd_flag        flag = OBD_FL_CKSUM_ADLER;
+       u32             flag = OBD_FL_CKSUM_ADLER;
 
        if (cksum_type & OBD_CKSUM_CRC32) {
                tmp = cfs_crypto_hash_speed(cksum_obd2cfs(OBD_CKSUM_CRC32));
 
        if (cksum_type & OBD_CKSUM_CRC32) {
                tmp = cfs_crypto_hash_speed(cksum_obd2cfs(OBD_CKSUM_CRC32));
@@ -99,7 +99,7 @@ static inline obd_flag cksum_type_pack(cksum_type_t cksum_type)
        return flag;
 }
 
        return flag;
 }
 
-static inline cksum_type_t cksum_type_unpack(obd_flag o_flags)
+static inline cksum_type_t cksum_type_unpack(u32 o_flags)
 {
        switch (o_flags & OBD_FL_CKSUM_ALL) {
        case OBD_FL_CKSUM_CRC32C:
 {
        switch (o_flags & OBD_FL_CKSUM_ALL) {
        case OBD_FL_CKSUM_CRC32C:
index 8141f86..7ec8683 100644 (file)
@@ -320,14 +320,14 @@ struct lu_attr;
 struct inode;
 
 void obdo_from_la(struct obdo *dst, const struct lu_attr *la, __u64 valid);
 struct inode;
 
 void obdo_from_la(struct obdo *dst, const struct lu_attr *la, __u64 valid);
-void la_from_obdo(struct lu_attr *la, const struct obdo *dst, obd_flag valid);
+void la_from_obdo(struct lu_attr *la, const struct obdo *dst, u32 valid);
 void obdo_refresh_inode(struct inode *dst, const struct obdo *src,
 void obdo_refresh_inode(struct inode *dst, const struct obdo *src,
-                       obd_flag valid);
+                       u32 valid);
 
 
-void obdo_cpy_md(struct obdo *dst, const struct obdo *src, obd_flag valid);
+void obdo_cpy_md(struct obdo *dst, const struct obdo *src, u32 valid);
 void obdo_to_ioobj(const struct obdo *oa, struct obd_ioobj *ioobj);
 void md_from_obdo(struct md_op_data *op_data, const struct obdo *oa,
 void obdo_to_ioobj(const struct obdo *oa, struct obd_ioobj *ioobj);
 void md_from_obdo(struct md_op_data *op_data, const struct obdo *oa,
-                 obd_flag valid);
+                 u32 valid);
 
 #define OBT(dev)        (dev)->obd_type
 #define OBP(dev, op)    (dev)->obd_type->typ_dt_ops->o_ ## op
 
 #define OBT(dev)        (dev)->obd_type
 #define OBP(dev, op)    (dev)->obd_type->typ_dt_ops->o_ ## op
@@ -487,9 +487,10 @@ static inline int class_devno_max(void)
 }
 
 static inline int obd_get_info(const struct lu_env *env,
 }
 
 static inline int obd_get_info(const struct lu_env *env,
-                               struct obd_export *exp, __u32 keylen,
-                               void *key, __u32 *vallen, void *val,
-                               struct lov_stripe_md *lsm)
+                              struct obd_export *exp,
+                              __u32 keylen, void *key,
+                              __u32 *vallen, void *val,
+                              struct lov_stripe_md *lsm)
 {
         int rc;
         ENTRY;
 {
         int rc;
         ENTRY;
@@ -503,9 +504,10 @@ static inline int obd_get_info(const struct lu_env *env,
 }
 
 static inline int obd_set_info_async(const struct lu_env *env,
 }
 
 static inline int obd_set_info_async(const struct lu_env *env,
-                                     struct obd_export *exp, obd_count keylen,
-                                     void *key, obd_count vallen, void *val,
-                                     struct ptlrpc_request_set *set)
+                                    struct obd_export *exp,
+                                    __u32 keylen, void *key,
+                                    __u32 vallen, void *val,
+                                    struct ptlrpc_request_set *set)
 {
         int rc;
         ENTRY;
 {
         int rc;
         ENTRY;
@@ -1679,11 +1681,11 @@ static inline int md_merge_attr(struct obd_export *exp,
 }
 
 static inline int md_setxattr(struct obd_export *exp,
 }
 
 static inline int md_setxattr(struct obd_export *exp,
-                              const struct lu_fid *fid, struct obd_capa *oc,
-                              obd_valid valid, const char *name,
-                              const char *input, int input_size,
-                              int output_size, int flags, __u32 suppgid,
-                              struct ptlrpc_request **request)
+                             const struct lu_fid *fid, struct obd_capa *oc,
+                             u64 valid, const char *name,
+                             const char *input, int input_size,
+                             int output_size, int flags, __u32 suppgid,
+                             struct ptlrpc_request **request)
 {
         ENTRY;
         EXP_CHECK_MD_OP(exp, setxattr);
 {
         ENTRY;
         EXP_CHECK_MD_OP(exp, setxattr);
@@ -1694,11 +1696,11 @@ static inline int md_setxattr(struct obd_export *exp,
 }
 
 static inline int md_getxattr(struct obd_export *exp,
 }
 
 static inline int md_getxattr(struct obd_export *exp,
-                              const struct lu_fid *fid, struct obd_capa *oc,
-                              obd_valid valid, const char *name,
-                              const char *input, int input_size,
-                              int output_size, int flags,
-                              struct ptlrpc_request **request)
+                             const struct lu_fid *fid, struct obd_capa *oc,
+                             u64 valid, const char *name,
+                             const char *input, int input_size,
+                             int output_size, int flags,
+                             struct ptlrpc_request **request)
 {
         ENTRY;
         EXP_CHECK_MD_OP(exp, getxattr);
 {
         ENTRY;
         EXP_CHECK_MD_OP(exp, getxattr);
index 330d44f..14498ff 100644 (file)
@@ -64,7 +64,7 @@ struct echo_obd {
        struct obd_device_target        eo_obt;
        struct obdo                     eo_oa;
        spinlock_t                      eo_lock;
        struct obd_device_target        eo_obt;
        struct obdo                     eo_oa;
        spinlock_t                      eo_lock;
-       __u64                           eo_lastino;
+       u64                             eo_lastino;
        struct lustre_handle            eo_nl_lock;
        atomic_t                        eo_prep;
 };
        struct lustre_handle            eo_nl_lock;
        atomic_t                        eo_prep;
 };
index 2a0746d..278f039 100644 (file)
@@ -1415,7 +1415,7 @@ static int lmv_cleanup(struct obd_device *obd)
        RETURN(0);
 }
 
        RETURN(0);
 }
 
-static int lmv_process_config(struct obd_device *obd, obd_count len, void *buf)
+static int lmv_process_config(struct obd_device *obd, size_t len, void *buf)
 {
        struct lustre_cfg       *lcfg = buf;
        struct obd_uuid         obd_uuid;
 {
        struct lustre_cfg       *lcfg = buf;
        struct obd_uuid         obd_uuid;
index 1cea3a5..ffd5d57 100644 (file)
@@ -2976,7 +2976,7 @@ static int mdc_cleanup(struct obd_device *obd)
         return client_obd_cleanup(obd);
 }
 
         return client_obd_cleanup(obd);
 }
 
-static int mdc_process_config(struct obd_device *obd, obd_count len, void *buf)
+static int mdc_process_config(struct obd_device *obd, size_t len, void *buf)
 {
         struct lustre_cfg *lcfg = buf;
        int rc = class_process_proc_param(PARAM_MDC, obd->obd_vars, lcfg, obd);
 {
         struct lustre_cfg *lcfg = buf;
        int rc = class_process_proc_param(PARAM_MDC, obd->obd_vars, lcfg, obd);
index 9f2d005..744f4e3 100644 (file)
@@ -1927,7 +1927,7 @@ int mgc_process_log(struct obd_device *mgc, struct config_llog_data *cld)
  * LCFG_LOG_START gets the config log from the MGS, processes it to start
  * any services, and adds it to the list logs to watch (follow).
  */
  * LCFG_LOG_START gets the config log from the MGS, processes it to start
  * any services, and adds it to the list logs to watch (follow).
  */
-static int mgc_process_config(struct obd_device *obd, obd_count len, void *buf)
+static int mgc_process_config(struct obd_device *obd, size_t len, void *buf)
 {
         struct lustre_cfg *lcfg = buf;
         struct config_llog_instance *cfg = NULL;
 {
         struct lustre_cfg *lcfg = buf;
         struct config_llog_instance *cfg = NULL;
index 28874eb..6ba7af9 100644 (file)
@@ -3082,7 +3082,7 @@ int osc_process_config_base(struct obd_device *obd, struct lustre_cfg *lcfg)
        return rc > 0 ? 0: rc;
 }
 
        return rc > 0 ? 0: rc;
 }
 
-static int osc_process_config(struct obd_device *obd, obd_count len, void *buf)
+static int osc_process_config(struct obd_device *obd, size_t len, void *buf)
 {
         return osc_process_config_base(obd, buf);
 }
 {
         return osc_process_config_base(obd, buf);
 }
index 28dfad1..749deb0 100644 (file)
@@ -1605,10 +1605,10 @@ EXPORT_SYMBOL(ptlrpc_req_set_repsize);
  * This may go from client to server or server to client.
  */
 int do_set_info_async(struct obd_import *imp,
  * This may go from client to server or server to client.
  */
 int do_set_info_async(struct obd_import *imp,
-                      int opcode, int version,
-                      obd_count keylen, void *key,
-                      obd_count vallen, void *val,
-                      struct ptlrpc_request_set *set)
+                     int opcode, int version,
+                     size_t keylen, void *key,
+                     size_t vallen, void *val,
+                     struct ptlrpc_request_set *set)
 {
         struct ptlrpc_request *req;
         char                  *tmp;
 {
         struct ptlrpc_request *req;
         char                  *tmp;