Whamcloud - gitweb
LU-5478 osd: get rid of obd_* typedefs 49/13149/2
authorDmitry Eremin <dmitry.eremin@intel.com>
Fri, 19 Dec 2014 14:37:39 +0000 (17:37 +0300)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 26 Dec 2014 18:12:24 +0000 (18:12 +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

patch 7 in series: modify osd-ldiskfs/osd-zfs

Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I9809d57ae8665fb7a932645cc2258d3adc1a0ff1
Reviewed-on: http://review.whamcloud.com/13149
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>
lustre/osd-ldiskfs/osd_compat.c
lustre/osd-ldiskfs/osd_handler.c
lustre/osd-ldiskfs/osd_internal.h
lustre/osd-ldiskfs/osd_io.c
lustre/osd-ldiskfs/osd_quota_fmt.h
lustre/osd-zfs/osd_handler.c
lustre/osd-zfs/osd_index.c
lustre/osd-zfs/osd_internal.h
lustre/osd-zfs/osd_oi.c

index 0a34228..fa43e2b 100644 (file)
@@ -480,8 +480,7 @@ int osd_obj_map_init(const struct lu_env *env, struct osd_device *dev)
         RETURN(rc);
 }
 
-static struct osd_obj_seq *osd_seq_find_locked(struct osd_obj_map *map,
-                                              obd_seq seq)
+static struct osd_obj_seq *osd_seq_find_locked(struct osd_obj_map *map, u64 seq)
 {
        struct osd_obj_seq *osd_seq;
 
@@ -492,7 +491,7 @@ static struct osd_obj_seq *osd_seq_find_locked(struct osd_obj_map *map,
        return NULL;
 }
 
-static struct osd_obj_seq *osd_seq_find(struct osd_obj_map *map, obd_seq seq)
+static struct osd_obj_seq *osd_seq_find(struct osd_obj_map *map, u64 seq)
 {
        struct osd_obj_seq *osd_seq;
 
@@ -695,7 +694,7 @@ static int osd_obj_add_entry(struct osd_thread_info *info,
  * debug messages to objects in the future, and the legacy space
  * of FID_SEQ_OST_MDT0 will be unused in the future.
  **/
-static inline void osd_seq_name(char *seq_name, size_t name_size, obd_seq seq)
+static inline void osd_seq_name(char *seq_name, size_t name_size, u64 seq)
 {
        snprintf(seq_name, name_size,
                 (fid_seq_is_rsvd(seq) ||
@@ -704,7 +703,7 @@ static inline void osd_seq_name(char *seq_name, size_t name_size, obd_seq seq)
 }
 
 static inline void osd_oid_name(char *name, size_t name_size,
-                               const struct lu_fid *fid, obd_id id)
+                               const struct lu_fid *fid, u64 id)
 {
        snprintf(name, name_size,
                 (fid_seq_is_rsvd(fid_seq(fid)) ||
@@ -799,7 +798,7 @@ out_err:
 }
 
 static struct osd_obj_seq *osd_seq_load(struct osd_thread_info *info,
-                                       struct osd_device *osd, obd_seq seq)
+                                       struct osd_device *osd, u64 seq)
 {
        struct osd_obj_map      *map;
        struct osd_obj_seq      *osd_seq;
@@ -923,7 +922,7 @@ int osd_obj_map_insert(struct osd_thread_info *info,
        struct osd_obj_seq      *osd_seq;
        struct dentry           *d;
        struct ost_id           *ostid = &info->oti_ostid;
-       obd_id                   oid;
+       u64                      oid;
        int                     dirn, rc = 0;
        char                    name[32];
        ENTRY;
index af1eb5d..588d233 100644 (file)
@@ -1074,7 +1074,7 @@ out:
 }
 
 static int osd_seq_exists(const struct lu_env *env,
-                             struct osd_device *osd, obd_seq seq)
+                         struct osd_device *osd, u64 seq)
 {
        struct lu_seq_range     *range = &osd_oti_get(env)->oti_seq_range;
        struct seq_server_site  *ss = osd_seq_site(osd);
@@ -2332,7 +2332,7 @@ static int __osd_oi_insert(const struct lu_env *env, struct osd_object *obj,
 }
 
 int osd_fld_lookup(const struct lu_env *env, struct osd_device *osd,
-                  obd_seq seq, struct lu_seq_range *range)
+                  u64 seq, struct lu_seq_range *range)
 {
        struct seq_server_site  *ss = osd_seq_site(osd);
 
index ed3571f..cea4cc6 100644 (file)
@@ -145,7 +145,7 @@ struct osd_obj_seq {
        int              oos_subdir_count; /* subdir count for each seq */
        struct dentry    *oos_root;        /* O/<seq> */
        struct dentry    **oos_dirs;       /* O/<seq>/d0-dXX */
-       obd_seq          oos_seq;          /* seq number */
+       u64              oos_seq;          /* seq number */
        struct list_head oos_seq_list;     /* list to seq_list */
 };
 
@@ -159,7 +159,7 @@ struct osd_obj_map {
 
 struct osd_mdobj {
        struct dentry   *om_root;      /* AGENT/<index> */
-       obd_seq          om_index;     /* mdt index */
+       u64              om_index;     /* mdt index */
        struct list_head om_list;      /* list to omm_list */
 };
 
@@ -704,7 +704,7 @@ int osd_oii_lookup(struct osd_device *dev, const struct lu_fid *fid,
 int osd_scrub_dump(struct seq_file *m, struct osd_device *dev);
 
 int osd_fld_lookup(const struct lu_env *env, struct osd_device *osd,
-                  obd_seq seq, struct lu_seq_range *range);
+                  u64 seq, struct lu_seq_range *range);
 
 int osd_delete_from_remote_parent(const struct lu_env *env,
                                  struct osd_device *osd,
index eae5c00..ae81124 100644 (file)
@@ -1031,7 +1031,7 @@ static int osd_write_prep(const struct lu_env *env, struct dt_object *dt,
 }
 
 /* Check if a block is allocated or not */
-static int osd_is_mapped(struct inode *inode, obd_size offset)
+static int osd_is_mapped(struct inode *inode, u64 offset)
 {
        sector_t (*fs_bmap)(struct address_space *, sector_t);
 
index b797910..92fd080 100644 (file)
@@ -49,8 +49,8 @@ struct lustre_disk_dqblk_v2 {
        /**< preferred limit on disk space (in QUOTABLOCK_SIZE) */
        __u64 dqb_bsoftlimit;
        __u64 dqb_curspace;   /**< current space occupied (in bytes) */
-       obd_time dqb_btime;   /**< time limit for excessive disk use */
-       obd_time dqb_itime;   /**< time limit for excessive inode use */
+       s64     dqb_btime;      /**< time limit for excessive disk use */
+       s64     dqb_itime;      /**< time limit for excessive inode use */
 };
 
 /* Number of entries in one blocks(14 entries) */
index 4c60943..a847f40 100644 (file)
@@ -465,7 +465,7 @@ int osd_statfs(const struct lu_env *env, struct dt_device *d,
        if (unlikely(rc != 0))
                RETURN(rc);
 
-       osfs->os_bavail -= min_t(obd_size,
+       osfs->os_bavail -= min_t(u64,
                                 OSD_GRANT_FOR_LOCAL_OIDS / osfs->os_bsize,
                                 osfs->os_bavail);
        RETURN(0);
index d14efbb..13fae10 100644 (file)
@@ -527,7 +527,7 @@ static inline void osd_object_put(const struct lu_env *env,
 }
 
 static int osd_seq_exists(const struct lu_env *env, struct osd_device *osd,
-                         obd_seq seq)
+                         u64 seq)
 {
        struct lu_seq_range     *range = &osd_oti_get(env)->oti_seq_range;
        struct seq_server_site  *ss = osd_seq_site(osd);
index 40cba11..f14a003 100644 (file)
@@ -224,7 +224,7 @@ struct osd_oi {
 struct osd_seq {
        uint64_t         *os_compat_dirs;
        int              os_subdir_count; /* subdir count for each seq */
-       obd_seq          os_seq;          /* seq number */
+       u64              os_seq;          /* seq number */
        struct list_head os_seq_list;     /* list to seq_list */
 };
 
@@ -461,7 +461,7 @@ int osd_ost_seq_exists(const struct lu_env *env, struct osd_device *osd,
 int osd_index_try(const struct lu_env *env, struct dt_object *dt,
                  const struct dt_index_features *feat);
 int osd_fld_lookup(const struct lu_env *env, struct osd_device *osd,
-                  obd_seq seq, struct lu_seq_range *range);
+                  u64 seq, struct lu_seq_range *range);
 void osd_zap_cursor_init_serialized(zap_cursor_t *zc, struct objset *os,
                                    uint64_t id, uint64_t dirhash);
 int osd_zap_cursor_init(zap_cursor_t **zc, struct objset *os,
index 279dfb0..5b427a9 100644 (file)
@@ -210,7 +210,7 @@ osd_oi_find_or_create(const struct lu_env *env, struct osd_device *o,
  * the object is located (tgt index) and it is MDT or OST object.
  */
 int osd_fld_lookup(const struct lu_env *env, struct osd_device *osd,
-                  obd_seq seq, struct lu_seq_range *range)
+                  u64 seq, struct lu_seq_range *range)
 {
        struct seq_server_site  *ss = osd_seq_site(osd);
 
@@ -264,7 +264,7 @@ int fid_is_on_ost(const struct lu_env *env, struct osd_device *osd,
 }
 
 static struct osd_seq *osd_seq_find_locked(struct osd_seq_list *seq_list,
-                                          obd_seq seq)
+                                          u64 seq)
 {
        struct osd_seq *osd_seq;
 
@@ -275,8 +275,7 @@ static struct osd_seq *osd_seq_find_locked(struct osd_seq_list *seq_list,
        return NULL;
 }
 
-static struct osd_seq *osd_seq_find(struct osd_seq_list *seq_list,
-                                   obd_seq seq)
+static struct osd_seq *osd_seq_find(struct osd_seq_list *seq_list, u64 seq)
 {
        struct osd_seq *osd_seq;
 
@@ -288,7 +287,7 @@ static struct osd_seq *osd_seq_find(struct osd_seq_list *seq_list,
 }
 
 static struct osd_seq *osd_find_or_add_seq(const struct lu_env *env,
-                                          struct osd_device *osd, obd_seq seq)
+                                          struct osd_device *osd, u64 seq)
 {
        struct osd_seq_list     *seq_list = &osd->od_seq_list;
        struct osd_seq          *osd_seq;
@@ -373,7 +372,7 @@ osd_get_idx_for_ost_obj(const struct lu_env *env, struct osd_device *osd,
 {
        struct osd_seq  *osd_seq;
        unsigned long   b;
-       obd_id          id;
+       u64             id;
        int             rc;
 
        osd_seq = osd_find_or_add_seq(env, osd, fid_seq(fid));