Whamcloud - gitweb
LU-13344 servers: change request timeouts to s32 50/37950/2
authorJames Simmons <jsimmons@infradead.org>
Tue, 17 Mar 2020 11:31:08 +0000 (07:31 -0400)
committerOleg Drokin <green@whamcloud.com>
Tue, 31 Mar 2020 07:01:25 +0000 (07:01 +0000)
In the latest kernels time_t has been removed since time_t has
been a 64 bit value just like time64_t so no need for it anymore.
The field sf_run_time is stored on local media and its expected
to be 32 bit in size so change it to s32 explictly. The fields
the MDT coordinator that are currently time_t are a simple change
to s32 since they represent a time period and not a time stamp.
Lastly just update a comment in llog_swab.c since time_t will no
longer exist but we want to point out time in the llog is 32 bits
in size.

Change-Id: I0849fc9798c191d1fed77f7bba1357a209924418
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/37950
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/lustre_scrub.h
lustre/mdt/mdt_coordinator.c
lustre/mdt/mdt_internal.h
lustre/obdclass/llog_swab.c
lustre/obdclass/scrub.c

index 38d4fb5..313af0f 100644 (file)
@@ -240,7 +240,7 @@ struct scrub_file {
         * to time64_t since this breaks backwards compatibility.
         * It shouldn't take more than 136 years to complete :-)
         */
-       time_t  sf_run_time;
+       s32     sf_run_time;
 
        /* How many completed OI scrub ran on the device. */
        __u32   sf_success_count;
index 1740b4a..d666f2d 100644 (file)
@@ -2068,7 +2068,7 @@ ssize_t loop_period_show(struct kobject *kobj, struct attribute *attr,
        struct coordinator *cdt = container_of(kobj, struct coordinator,
                                               cdt_hsm_kobj);
 
-       return scnprintf(buf, PAGE_SIZE, "%lu\n", cdt->cdt_loop_period);
+       return scnprintf(buf, PAGE_SIZE, "%u\n", cdt->cdt_loop_period);
 }
 
 ssize_t loop_period_store(struct kobject *kobj, struct attribute *attr,
@@ -2096,7 +2096,7 @@ ssize_t grace_delay_show(struct kobject *kobj, struct attribute *attr,
        struct coordinator *cdt = container_of(kobj, struct coordinator,
                                               cdt_hsm_kobj);
 
-       return scnprintf(buf, PAGE_SIZE, "%lu\n", cdt->cdt_grace_delay);
+       return scnprintf(buf, PAGE_SIZE, "%u\n", cdt->cdt_grace_delay);
 }
 
 ssize_t grace_delay_store(struct kobject *kobj, struct attribute *attr,
@@ -2125,7 +2125,7 @@ ssize_t active_request_timeout_show(struct kobject *kobj,
        struct coordinator *cdt = container_of(kobj, struct coordinator,
                                               cdt_hsm_kobj);
 
-       return scnprintf(buf, PAGE_SIZE, "%lu\n", cdt->cdt_active_req_timeout);
+       return scnprintf(buf, PAGE_SIZE, "%d\n", cdt->cdt_active_req_timeout);
 }
 
 ssize_t active_request_timeout_store(struct kobject *kobj,
index 47f89bc..6e46e8f 100644 (file)
@@ -149,10 +149,10 @@ struct coordinator {
                                                       * list */
        struct mutex             cdt_restore_lock;    /**< protect restore
                                                       * list */
-       time_t                   cdt_loop_period;     /**< llog scan period */
-       time_t                   cdt_grace_delay;     /**< request grace
+       s32                      cdt_loop_period;     /**< llog scan period */
+       s32                      cdt_grace_delay;     /**< request grace
                                                       * delay */
-       time_t                   cdt_active_req_timeout; /**< request timeout */
+       s32                      cdt_active_req_timeout; /**< request timeout */
        __u32                    cdt_default_archive_id; /**< archive id used
                                                       * when none are
                                                       * specified */
index 3b35f42..e030417 100644 (file)
@@ -446,7 +446,7 @@ void lustre_swab_cfg_marker(struct cfg_marker *marker, int swab, int size)
                __u32 createtime, canceltime;
                /*
                 * There was a problem with the original declaration of
-                * cfg_marker on 32-bit systems because it used time_t as
+                * cfg_marker on 32-bit systems because it used 32 time as
                 * a wire protocol structure, and didn't verify this in
                 * wirecheck.  We now have to convert the offsets of the
                 * later fields in order to work on 32- and 64-bit systems.
index c4feee6..24cb640 100644 (file)
@@ -487,7 +487,7 @@ void scrub_dump(struct seq_file *m, struct lustre_scrub *scrub)
        } else {
                if (sf->sf_run_time != 0)
                        speed = div_s64(speed, sf->sf_run_time);
-               seq_printf(m, "run_time: %ld seconds\n"
+               seq_printf(m, "run_time: %d seconds\n"
                           "average_speed: %lld objects/sec\n"
                           "real_time_speed: N/A\n"
                           "current_position: N/A\n",