]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging/lustre: get rid of seqno_t and mdsno_t typedefs
authorOleg Drokin <green@linuxhacker.ru>
Fri, 15 Aug 2014 16:55:55 +0000 (12:55 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 17 Aug 2014 16:45:30 +0000 (09:45 -0700)
seqno_t is u64 and mdsno_t is u32 so just use them as such.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 files changed:
drivers/staging/lustre/lustre/fid/fid_request.c
drivers/staging/lustre/lustre/fld/fld_cache.c
drivers/staging/lustre/lustre/fld/fld_internal.h
drivers/staging/lustre/lustre/fld/fld_request.c
drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
drivers/staging/lustre/lustre/include/lustre_fid.h
drivers/staging/lustre/lustre/include/lustre_fld.h
drivers/staging/lustre/lustre/include/md_object.h
drivers/staging/lustre/lustre/include/obd.h
drivers/staging/lustre/lustre/lmv/lmv_fld.c
drivers/staging/lustre/lustre/lmv/lmv_internal.h
drivers/staging/lustre/lustre/lmv/lmv_obd.c

index 992d07591b08381518fddf10b9f15c81457443eb..46c11ca85a698a45264814e88855b09cec4acd47 100644 (file)
@@ -187,7 +187,7 @@ static int seq_client_alloc_meta(const struct lu_env *env,
 
 /* Allocate new sequence for client. */
 static int seq_client_alloc_seq(const struct lu_env *env,
-                               struct lu_client_seq *seq, seqno_t *seqnr)
+                               struct lu_client_seq *seq, u64 *seqnr)
 {
        int rc;
 
@@ -249,7 +249,7 @@ static void seq_fid_alloc_fini(struct lu_client_seq *seq)
  * Allocate the whole seq to the caller.
  **/
 int seq_client_get_seq(const struct lu_env *env,
-                      struct lu_client_seq *seq, seqno_t *seqnr)
+                      struct lu_client_seq *seq, u64 *seqnr)
 {
        wait_queue_t link;
        int rc;
@@ -313,7 +313,7 @@ int seq_client_alloc_fid(const struct lu_env *env,
                seq->lcs_fid.f_oid = seq->lcs_width;
 
        while (1) {
-               seqno_t seqnr;
+               u64 seqnr;
 
                if (!fid_is_zero(&seq->lcs_fid) &&
                    fid_oid(&seq->lcs_fid) < seq->lcs_width) {
index 759a233a70283fd44a960b0fd6051075f7e0db1d..f5a340af499e8fe01daf812102a1c52f599d3db6 100644 (file)
@@ -263,8 +263,8 @@ void fld_cache_punch_hole(struct fld_cache *cache,
                          struct fld_cache_entry *f_new)
 {
        const struct lu_seq_range *range = &f_new->fce_range;
-       const seqno_t new_start  = range->lsr_start;
-       const seqno_t new_end  = range->lsr_end;
+       const u64 new_start  = range->lsr_start;
+       const u64 new_end  = range->lsr_end;
        struct fld_cache_entry *fldt;
 
        OBD_ALLOC_GFP(fldt, sizeof(*fldt), GFP_ATOMIC);
@@ -302,9 +302,9 @@ static void fld_cache_overlap_handle(struct fld_cache *cache,
                                struct fld_cache_entry *f_new)
 {
        const struct lu_seq_range *range = &f_new->fce_range;
-       const seqno_t new_start  = range->lsr_start;
-       const seqno_t new_end  = range->lsr_end;
-       const mdsno_t mdt = range->lsr_index;
+       const u64 new_start  = range->lsr_start;
+       const u64 new_end  = range->lsr_end;
+       const u32 mdt = range->lsr_index;
 
        /* this is overlap case, these case are checking overlapping with
         * prev range only. fixup will handle overlapping with next range. */
@@ -386,8 +386,8 @@ int fld_cache_insert_nolock(struct fld_cache *cache,
        struct fld_cache_entry *n;
        struct list_head *head;
        struct list_head *prev = NULL;
-       const seqno_t new_start  = f_new->fce_range.lsr_start;
-       const seqno_t new_end  = f_new->fce_range.lsr_end;
+       const u64 new_start  = f_new->fce_range.lsr_start;
+       const u64 new_end  = f_new->fce_range.lsr_end;
        __u32 new_flags  = f_new->fce_range.lsr_flags;
 
        /*
@@ -516,7 +516,7 @@ struct fld_cache_entry
  * lookup \a seq sequence for range in fld cache.
  */
 int fld_cache_lookup(struct fld_cache *cache,
-                    const seqno_t seq, struct lu_seq_range *range)
+                    const u64 seq, struct lu_seq_range *range)
 {
        struct fld_cache_entry *flde;
        struct fld_cache_entry *prev = NULL;
index 5da0c1da0d392efd61c4bc0357c72f863f6c231d..8806b6096953cfd1e8a731dc2d202f80dcad69cb 100644 (file)
@@ -167,7 +167,7 @@ void fld_cache_delete(struct fld_cache *cache,
 void fld_cache_delete_nolock(struct fld_cache *cache,
                             const struct lu_seq_range *range);
 int fld_cache_lookup(struct fld_cache *cache,
-                    const seqno_t seq, struct lu_seq_range *range);
+                    const u64 seq, struct lu_seq_range *range);
 
 struct fld_cache_entry*
 fld_cache_entry_lookup(struct fld_cache *cache, struct lu_seq_range *range);
index 8e512f9c3db00b34e4082dd17ecc8cc71b1c5f3a..4539a0284a783f14a8963eba8f4adfa052b409ed 100644 (file)
@@ -110,15 +110,14 @@ static void fld_exit_request(struct client_obd *cli)
        client_obd_list_unlock(&cli->cl_loi_list_lock);
 }
 
-static int fld_rrb_hash(struct lu_client_fld *fld,
-                       seqno_t seq)
+static int fld_rrb_hash(struct lu_client_fld *fld, u64 seq)
 {
        LASSERT(fld->lcf_count > 0);
        return do_div(seq, fld->lcf_count);
 }
 
 static struct lu_fld_target *
-fld_rrb_scan(struct lu_client_fld *fld, seqno_t seq)
+fld_rrb_scan(struct lu_client_fld *fld, u64 seq)
 {
        struct lu_fld_target *target;
        int hash;
@@ -173,7 +172,7 @@ struct lu_fld_hash fld_hash[] = {
 };
 
 static struct lu_fld_target *
-fld_client_get_target(struct lu_client_fld *fld, seqno_t seq)
+fld_client_get_target(struct lu_client_fld *fld, u64 seq)
 {
        struct lu_fld_target *target;
 
@@ -453,7 +452,7 @@ out_req:
        return rc;
 }
 
-int fld_client_lookup(struct lu_client_fld *fld, seqno_t seq, mdsno_t *mds,
+int fld_client_lookup(struct lu_client_fld *fld, u64 seq, u32 *mds,
                      __u32 flags, const struct lu_env *env)
 {
        struct lu_seq_range res = { 0 };
index 7571462737245fddbff7025f0ae9286fa2d056b1..186f5e3e95ca0f72786acea34c045c6e9a52981f 100644 (file)
 #define LUSTRE_LOG_VERSION  0x00050000
 #define LUSTRE_MGS_VERSION  0x00060000
 
-typedef __u32 mdsno_t;
-typedef __u64 seqno_t;
 typedef __u64 obd_id;
 typedef __u64 obd_seq;
 typedef __s64 obd_time;
index ffb00f17124062dd0128728fdbcdcff17075f07d..2d6fbb4b1b39fa31270d4438db01198fc6cca3c6 100644 (file)
@@ -469,7 +469,7 @@ void seq_client_flush(struct lu_client_seq *seq);
 int seq_client_alloc_fid(const struct lu_env *env, struct lu_client_seq *seq,
                         struct lu_fid *fid);
 int seq_client_get_seq(const struct lu_env *env, struct lu_client_seq *seq,
-                      seqno_t *seqnr);
+                      u64 *seqnr);
 int seq_site_fini(const struct lu_env *env, struct seq_server_site *ss);
 /* Fids common stuff */
 int fid_is_local(const struct lu_env *env,
index ce6330f9bb50a2812f4d32408bbbd348c189e8cf..64c504849a22483f81c516df96eef783434d8b8c 100644 (file)
@@ -137,15 +137,14 @@ void fld_client_fini(struct lu_client_fld *fld);
 
 void fld_client_flush(struct lu_client_fld *fld);
 
-int fld_client_lookup(struct lu_client_fld *fld, seqno_t seq, mdsno_t *mds,
+int fld_client_lookup(struct lu_client_fld *fld, u64 seq, u32 *mds,
                      __u32 flags, const struct lu_env *env);
 
 int fld_client_create(struct lu_client_fld *fld,
                      struct lu_seq_range *range,
                      const struct lu_env *env);
 
-int fld_client_delete(struct lu_client_fld *fld,
-                     seqno_t seq,
+int fld_client_delete(struct lu_client_fld *fld, u64 seq,
                      const struct lu_env *env);
 
 int fld_client_add_target(struct lu_client_fld *fld,
index 2e5d55030a631734234a8fcf637588cdcf2d9d04..bd5f6186bf31505e4c681ff5b526b1050621e9f7 100644 (file)
@@ -451,7 +451,7 @@ struct seq_server_site {
        /**
         * mds number of this site.
         */
-       mdsno_t        ss_node_id;
+       u32                   ss_node_id;
        /**
         * Fid location database
         */
index 489bdd399627835aaea6ba4032b6dcec16d0ded6..b4721367c17fb99dd7ad0c3a54fbbdd9af44f576 100644 (file)
@@ -1057,7 +1057,7 @@ struct md_op_data {
        struct lu_fid      op_fid2; /* operation fid2 (usually child) */
        struct lu_fid      op_fid3; /* 2 extra fids to find conflicting */
        struct lu_fid      op_fid4; /* to the operation locks. */
-       mdsno_t          op_mds;  /* what mds server open will go to */
+       u32                     op_mds;  /* what mds server open will go to */
        struct lustre_handle    op_handle;
        obd_time                op_mod_time;
        const char           *op_name;
index 8289bcc5f8e187ec850694e4861a85d76e5f1cf4..e8421f04bedac72b6c5f074f653f4cc83bdb7921 100644 (file)
@@ -53,7 +53,7 @@
 
 int lmv_fld_lookup(struct lmv_obd *lmv,
                   const struct lu_fid *fid,
-                  mdsno_t *mds)
+                  u32 *mds)
 {
        int rc;
 
index eb18a5900e13334b1b39032d78135a4dfda25e85..80e6604f420d91b85c23f79eeb7a60f0580f9d3c 100644 (file)
@@ -70,10 +70,8 @@ int lmv_intent_open(struct obd_export *exp, struct md_op_data *op_data,
 
 int lmv_blocking_ast(struct ldlm_lock *, struct ldlm_lock_desc *,
                     void *, int);
-int lmv_fld_lookup(struct lmv_obd *lmv, const struct lu_fid *fid,
-                  mdsno_t *mds);
-int __lmv_fid_alloc(struct lmv_obd *lmv, struct lu_fid *fid,
-                   mdsno_t mds);
+int lmv_fld_lookup(struct lmv_obd *lmv, const struct lu_fid *fid, u32 *mds);
+int __lmv_fid_alloc(struct lmv_obd *lmv, struct lu_fid *fid, u32 mds);
 int lmv_fid_alloc(struct obd_export *exp, struct lu_fid *fid,
                  struct md_op_data *op_data);
 
@@ -111,7 +109,7 @@ static inline int lmv_get_easize(struct lmv_obd *lmv)
 }
 
 static inline struct lmv_tgt_desc *
-lmv_get_target(struct lmv_obd *lmv, mdsno_t mds)
+lmv_get_target(struct lmv_obd *lmv, u32 mds)
 {
        int count = lmv->desc.ld_tgt_count;
        int i;
@@ -130,7 +128,7 @@ lmv_get_target(struct lmv_obd *lmv, mdsno_t mds)
 static inline struct lmv_tgt_desc *
 lmv_find_target(struct lmv_obd *lmv, const struct lu_fid *fid)
 {
-       mdsno_t mds = 0;
+       u32 mds = 0;
        int rc;
 
        if (lmv->desc.ld_tgt_count > 1) {
index a66b3e000d5785b27ab69b28c1d3769d92d97072..0b1e4a1364d369876a7ad1439edc5990fc543b7b 100644 (file)
@@ -1201,8 +1201,7 @@ static int lmv_choose_mds(struct lmv_obd *lmv, struct md_op_data *op_data,
  * This is _inode_ placement policy function (not name).
  */
 static int lmv_placement_policy(struct obd_device *obd,
-                               struct md_op_data *op_data,
-                               mdsno_t *mds)
+                               struct md_op_data *op_data, u32 *mds)
 {
        struct lmv_obd    *lmv = &obd->u.lmv;
 
@@ -1241,8 +1240,7 @@ static int lmv_placement_policy(struct obd_device *obd,
        return 0;
 }
 
-int __lmv_fid_alloc(struct lmv_obd *lmv, struct lu_fid *fid,
-                   mdsno_t mds)
+int __lmv_fid_alloc(struct lmv_obd *lmv, struct lu_fid *fid, u32 mds)
 {
        struct lmv_tgt_desc     *tgt;
        int                      rc;
@@ -1279,7 +1277,7 @@ int lmv_fid_alloc(struct obd_export *exp, struct lu_fid *fid,
 {
        struct obd_device     *obd = class_exp2obd(exp);
        struct lmv_obd  *lmv = &obd->u.lmv;
-       mdsno_t         mds = 0;
+       u32                    mds = 0;
        int                 rc;
 
        LASSERT(op_data != NULL);