Whamcloud - gitweb
b=23003 use obd_time instead of __u64 to store "wallclock" time
authorVladimir Saveliev <Vladimir.Saveliev@sun.com>
Thu, 30 Sep 2010 12:08:30 +0000 (16:08 +0400)
committerVitaly Fertman <vitaly.fertman@sun.com>
Thu, 30 Sep 2010 15:45:52 +0000 (19:45 +0400)
i=andreas.dilger
i=vitaly.fertman

lustre/cmm/mdc_object.c
lustre/include/lu_object.h
lustre/include/lustre/lustre_idl.h
lustre/include/obd.h
lustre/llite/llite_internal.h
lustre/lov/lov_merge.c
lustre/lvfs/fsfilt_ext3.c
lustre/lvfs/lustre_quota_fmt.h

index d373f0b..c332def 100644 (file)
@@ -306,7 +306,7 @@ static int mdc_attr_get(const struct lu_env *env, struct md_object *mo,
 /**
  * Helper to init timspec \a t.
  */
-static inline struct timespec *mdc_attr_time(struct timespec *t, __u64 seconds)
+static inline struct timespec *mdc_attr_time(struct timespec *t, obd_time seconds)
 {
         t->tv_sec = seconds;
         t->tv_nsec = 0;
index 54a72c5..2498508 100644 (file)
@@ -399,11 +399,11 @@ struct lu_attr {
         /** size in bytes */
         __u64          la_size;
         /** modification time in seconds since Epoch */
-        __u64          la_mtime;
+        obd_time       la_mtime;
         /** access time in seconds since Epoch */
-        __u64          la_atime;
+        obd_time       la_atime;
         /** change time in seconds since Epoch */
-        __u64          la_ctime;
+        obd_time       la_ctime;
         /** 512-byte blocks allocated to object */
         __u64          la_blocks;
         /** permission bits and file type */
index 0ce99a9..fae824e 100644 (file)
@@ -1385,11 +1385,11 @@ extern void lustre_swab_niobuf_remote (struct niobuf_remote *nbr);
 #define OST_LVB_GET_ERR(blocks)    (int)(blocks - OST_LVB_ERR_INIT)
 
 struct ost_lvb {
-        __u64 lvb_size;
-        __u64 lvb_mtime;
-        __u64 lvb_atime;
-        __u64 lvb_ctime;
-        __u64 lvb_blocks;
+        __u64     lvb_size;
+        obd_time  lvb_mtime;
+        obd_time  lvb_atime;
+        obd_time  lvb_ctime;
+        __u64     lvb_blocks;
 };
 
 extern void lustre_swab_ost_lvb(struct ost_lvb *);
@@ -1554,9 +1554,9 @@ struct mds_body {
         struct lustre_handle handle;
         __u64          valid;
         __u64          size;   /* Offset, in the case of MDS_READPAGE */
-        __u64          mtime;
-        __u64          atime;
-        __u64          ctime;
+        obd_time       mtime;
+        obd_time       atime;
+        obd_time       ctime;
         __u64          blocks; /* XID, in the case of MDS_READPAGE */
         __u64          io_epoch;
         __u64          ino;
@@ -1586,9 +1586,9 @@ struct mdt_body {
         struct lustre_handle handle;
         __u64          valid;
         __u64          size;   /* Offset, in the case of MDS_READPAGE */
-        __u64          mtime;
-        __u64          atime;
-        __u64          ctime;
+       obd_time        mtime;
+       obd_time        atime;
+       obd_time        ctime;
         __u64          blocks; /* XID, in the case of MDS_READPAGE */
         __u64          ioepoch;
         __u64          ino;    /* for 1.6 compatibility */
@@ -1748,9 +1748,9 @@ struct mdt_rec_setattr {
         __u32           sa_gid;
         __u64           sa_size;
         __u64           sa_blocks;
-        __u64           sa_mtime;
-        __u64           sa_atime;
-        __u64           sa_ctime;
+        obd_time        sa_mtime;
+        obd_time        sa_atime;
+        obd_time        sa_ctime;
         __u32           sa_attr_flags;
         __u32           sa_mode;
         __u32           sa_padding_2;
@@ -1866,7 +1866,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 */
-        __u64           cr_time;
+        obd_time        cr_time;
         __u64           cr_rdev;
         __u64           cr_ioepoch;
         __u64           cr_padding_1;   /* rr_blocks */
@@ -1892,7 +1892,7 @@ struct mdt_rec_link {
         __u32           lk_suppgid2_h;
         struct lu_fid   lk_fid1;
         struct lu_fid   lk_fid2;
-        __u64           lk_time;
+        obd_time        lk_time;
         __u64           lk_padding_1;   /* rr_atime */
         __u64           lk_padding_2;   /* rr_ctime */
         __u64           lk_padding_3;   /* rr_size */
@@ -1919,7 +1919,7 @@ struct mdt_rec_unlink {
         __u32           ul_suppgid2_h;
         struct lu_fid   ul_fid1;
         struct lu_fid   ul_fid2;
-        __u64           ul_time;
+        obd_time        ul_time;
         __u64           ul_padding_2;   /* rr_atime */
         __u64           ul_padding_3;   /* rr_ctime */
         __u64           ul_padding_4;   /* rr_size */
@@ -1946,7 +1946,7 @@ struct mdt_rec_rename {
         __u32           rn_suppgid2_h;
         struct lu_fid   rn_fid1;
         struct lu_fid   rn_fid2;
-        __u64           rn_time;
+        obd_time        rn_time;
         __u64           rn_padding_1;   /* rr_atime */
         __u64           rn_padding_2;   /* rr_ctime */
         __u64           rn_padding_3;   /* rr_size */
@@ -1976,7 +1976,7 @@ struct mdt_rec_setxattr {
         __u32           sx_padding_2;
         __u32           sx_padding_3;
         __u64           sx_valid;
-        __u64           sx_time;
+        obd_time        sx_time;
         __u64           sx_padding_5;   /* rr_ctime */
         __u64           sx_padding_6;   /* rr_size */
         __u64           sx_padding_7;   /* rr_blocks */
@@ -2009,9 +2009,9 @@ struct mdt_rec_reint {
         __u32           rr_suppgid2_h;
         struct lu_fid   rr_fid1;
         struct lu_fid   rr_fid2;
-        __u64           rr_mtime;
-        __u64           rr_atime;
-        __u64           rr_ctime;
+        obd_time        rr_mtime;
+        obd_time        rr_atime;
+        obd_time        rr_ctime;
         __u64           rr_size;
         __u64           rr_blocks;
         __u32           rr_bias;
@@ -2318,8 +2318,8 @@ struct cfg_marker {
         __u32             cm_flags;
         __u32             cm_vers;       /* lustre release version number */
         __u32             padding;       /* 64 bit align */
-        __u64             cm_createtime; /*when this record was first created */
-        __u64             cm_canceltime; /*when this record is no longer valid*/
+        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];
 };
@@ -2529,7 +2529,7 @@ struct llog_gen_rec {
 
 struct llog_log_hdr {
         struct llog_rec_hdr     llh_hdr;
-        __u64                   llh_timestamp;
+        obd_time                llh_timestamp;
         __u32                   llh_count;
         __u32                   llh_bitmap_offset;
         __u32                   llh_size;
index 4fc0c24..4a341d0 100644 (file)
@@ -1183,7 +1183,7 @@ struct md_op_data {
         struct lu_fid           op_fid4; /* to the operation locks. */
         mdsno_t                 op_mds;  /* what mds server open will go to */
         struct lustre_handle    op_handle;
-        __u64                   op_mod_time;
+        obd_time                op_mod_time;
         const char             *op_name;
         int                     op_namelen;
         __u32                   op_mode;
index 49f76dd..03436ec 100644 (file)
@@ -962,12 +962,6 @@ struct vm_area_struct *our_vma(unsigned long addr, size_t count);
 
 #define    ll_s2sbi(sb)        (s2lsi(sb)->lsi_llsbi)
 
-static inline __u64 ll_ts2u64(struct timespec *time)
-{
-        __u64 t = time->tv_sec;
-        return t;
-}
-
 /* don't need an addref as the sb_info should be holding one */
 static inline struct obd_export *ll_s2dtexp(struct super_block *sb)
 {
index ce3f1d4..ad759c3 100644 (file)
@@ -61,9 +61,9 @@ int lov_merge_lvb_kms(struct lov_stripe_md *lsm,
         __u64 size = 0;
         __u64 kms = 0;
         __u64 blocks = 0;
-        __u64 current_mtime = lvb->lvb_mtime;
-        __u64 current_atime = lvb->lvb_atime;
-        __u64 current_ctime = lvb->lvb_ctime;
+        obd_time current_mtime = lvb->lvb_mtime;
+        obd_time current_atime = lvb->lvb_atime;
+        obd_time current_ctime = lvb->lvb_ctime;
         int i;
         int rc = 0;
 
index abdb74e..49347fa 100644 (file)
@@ -1602,8 +1602,8 @@ struct chk_dqblk{
         qsize_t                 dqb_ihardlimit;  /** inode hard limit */
         qsize_t                 dqb_isoftlimit;  /** inode soft limit */
         qsize_t                 dqb_curinodes;   /** current inodes */
-        __u64                   dqb_btime;       /** block grace time */
-        __u64                   dqb_itime;       /** inode grace time */
+        obd_time                dqb_btime;       /** block grace time */
+        obd_time                dqb_itime;       /** inode grace time */
         __u32                   dqb_valid;       /** flag for above fields */
 };
 
index a713d36..2146277 100644 (file)
@@ -81,8 +81,8 @@ struct lustre_disk_dqblk_v2 {
         __u64 dqb_bhardlimit;   /**< absolute limit on disk space (in QUOTABLOCK_SIZE) */
         __u64 dqb_bsoftlimit;   /**< preferred limit on disk space (in QUOTABLOCK_SIZE) */
         __u64 dqb_curspace;     /**< current space occupied (in bytes) */
-        __u64 dqb_btime;        /**< time limit for excessive disk use */
-        __u64 dqb_itime;        /**< time limit for excessive inode use */
+        obd_time dqb_btime;        /**< time limit for excessive disk use */
+        obd_time dqb_itime;        /**< time limit for excessive inode use */
 };
 
 /* Number of entries in one blocks(14 entries) */