* [PATCH] ceph: eliminate unused "total" variable in ceph_mdsc_send_metrics
@ 2020-07-24 19:45 Jeff Layton
2020-07-24 20:10 ` Jeff Layton
0 siblings, 1 reply; 3+ messages in thread
From: Jeff Layton @ 2020-07-24 19:45 UTC (permalink / raw)
To: ceph-devel; +Cc: Xiubo Li, idryomov
Cc: Xiubo Li <xiubli@redhat.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
fs/ceph/metric.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/fs/ceph/metric.c b/fs/ceph/metric.c
index 252d6a3f75d2..2466b261fba2 100644
--- a/fs/ceph/metric.c
+++ b/fs/ceph/metric.c
@@ -20,7 +20,7 @@ static bool ceph_mdsc_send_metrics(struct ceph_mds_client *mdsc,
u64 nr_caps = atomic64_read(&m->total_caps);
struct ceph_msg *msg;
struct timespec64 ts;
- s64 sum, total;
+ s64 sum;
s32 items = 0;
s32 len;
@@ -53,7 +53,6 @@ static bool ceph_mdsc_send_metrics(struct ceph_mds_client *mdsc,
read->ver = 1;
read->compat = 1;
read->data_len = cpu_to_le32(sizeof(*read) - 10);
- total = m->total_reads;
sum = m->read_latency_sum;
jiffies_to_timespec64(sum, &ts);
read->sec = cpu_to_le32(ts.tv_sec);
@@ -66,7 +65,6 @@ static bool ceph_mdsc_send_metrics(struct ceph_mds_client *mdsc,
write->ver = 1;
write->compat = 1;
write->data_len = cpu_to_le32(sizeof(*write) - 10);
- total = m->total_writes;
sum = m->write_latency_sum;
jiffies_to_timespec64(sum, &ts);
write->sec = cpu_to_le32(ts.tv_sec);
@@ -79,7 +77,6 @@ static bool ceph_mdsc_send_metrics(struct ceph_mds_client *mdsc,
meta->ver = 1;
meta->compat = 1;
meta->data_len = cpu_to_le32(sizeof(*meta) - 10);
- total = m->total_metadatas;
sum = m->metadata_latency_sum;
jiffies_to_timespec64(sum, &ts);
meta->sec = cpu_to_le32(ts.tv_sec);
--
2.26.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ceph: eliminate unused "total" variable in ceph_mdsc_send_metrics
2020-07-24 19:45 [PATCH] ceph: eliminate unused "total" variable in ceph_mdsc_send_metrics Jeff Layton
@ 2020-07-24 20:10 ` Jeff Layton
2020-07-24 22:39 ` Xiubo Li
0 siblings, 1 reply; 3+ messages in thread
From: Jeff Layton @ 2020-07-24 20:10 UTC (permalink / raw)
To: ceph-devel; +Cc: Xiubo Li, idryomov
On Fri, 2020-07-24 at 15:45 -0400, Jeff Layton wrote:
> Cc: Xiubo Li <xiubli@redhat.com>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Jeff Layton <jlayton@kernel.org>
> ---
> fs/ceph/metric.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
Xiubo, if this looks OK I can squash this into the original patch since
it's not merged upstream yet.
Thanks,
Jeff
> diff --git a/fs/ceph/metric.c b/fs/ceph/metric.c
> index 252d6a3f75d2..2466b261fba2 100644
> --- a/fs/ceph/metric.c
> +++ b/fs/ceph/metric.c
> @@ -20,7 +20,7 @@ static bool ceph_mdsc_send_metrics(struct ceph_mds_client *mdsc,
> u64 nr_caps = atomic64_read(&m->total_caps);
> struct ceph_msg *msg;
> struct timespec64 ts;
> - s64 sum, total;
> + s64 sum;
> s32 items = 0;
> s32 len;
>
> @@ -53,7 +53,6 @@ static bool ceph_mdsc_send_metrics(struct ceph_mds_client *mdsc,
> read->ver = 1;
> read->compat = 1;
> read->data_len = cpu_to_le32(sizeof(*read) - 10);
> - total = m->total_reads;
> sum = m->read_latency_sum;
> jiffies_to_timespec64(sum, &ts);
> read->sec = cpu_to_le32(ts.tv_sec);
> @@ -66,7 +65,6 @@ static bool ceph_mdsc_send_metrics(struct ceph_mds_client *mdsc,
> write->ver = 1;
> write->compat = 1;
> write->data_len = cpu_to_le32(sizeof(*write) - 10);
> - total = m->total_writes;
> sum = m->write_latency_sum;
> jiffies_to_timespec64(sum, &ts);
> write->sec = cpu_to_le32(ts.tv_sec);
> @@ -79,7 +77,6 @@ static bool ceph_mdsc_send_metrics(struct ceph_mds_client *mdsc,
> meta->ver = 1;
> meta->compat = 1;
> meta->data_len = cpu_to_le32(sizeof(*meta) - 10);
> - total = m->total_metadatas;
> sum = m->metadata_latency_sum;
> jiffies_to_timespec64(sum, &ts);
> meta->sec = cpu_to_le32(ts.tv_sec);
--
Jeff Layton <jlayton@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ceph: eliminate unused "total" variable in ceph_mdsc_send_metrics
2020-07-24 20:10 ` Jeff Layton
@ 2020-07-24 22:39 ` Xiubo Li
0 siblings, 0 replies; 3+ messages in thread
From: Xiubo Li @ 2020-07-24 22:39 UTC (permalink / raw)
To: Jeff Layton, ceph-devel; +Cc: idryomov
On 2020/7/25 4:10, Jeff Layton wrote:
> On Fri, 2020-07-24 at 15:45 -0400, Jeff Layton wrote:
>> Cc: Xiubo Li <xiubli@redhat.com>
>> Reported-by: kernel test robot <lkp@intel.com>
>> Signed-off-by: Jeff Layton <jlayton@kernel.org>
>> ---
>> fs/ceph/metric.c | 5 +----
>> 1 file changed, 1 insertion(+), 4 deletions(-)
>>
> Xiubo, if this looks OK I can squash this into the original patch since
> it's not merged upstream yet.
Hi Jeff,
Yeah, this is okay. Thanks.
BRs
> Thanks,
> Jeff
>
>> diff --git a/fs/ceph/metric.c b/fs/ceph/metric.c
>> index 252d6a3f75d2..2466b261fba2 100644
>> --- a/fs/ceph/metric.c
>> +++ b/fs/ceph/metric.c
>> @@ -20,7 +20,7 @@ static bool ceph_mdsc_send_metrics(struct ceph_mds_client *mdsc,
>> u64 nr_caps = atomic64_read(&m->total_caps);
>> struct ceph_msg *msg;
>> struct timespec64 ts;
>> - s64 sum, total;
>> + s64 sum;
>> s32 items = 0;
>> s32 len;
>>
>> @@ -53,7 +53,6 @@ static bool ceph_mdsc_send_metrics(struct ceph_mds_client *mdsc,
>> read->ver = 1;
>> read->compat = 1;
>> read->data_len = cpu_to_le32(sizeof(*read) - 10);
>> - total = m->total_reads;
>> sum = m->read_latency_sum;
>> jiffies_to_timespec64(sum, &ts);
>> read->sec = cpu_to_le32(ts.tv_sec);
>> @@ -66,7 +65,6 @@ static bool ceph_mdsc_send_metrics(struct ceph_mds_client *mdsc,
>> write->ver = 1;
>> write->compat = 1;
>> write->data_len = cpu_to_le32(sizeof(*write) - 10);
>> - total = m->total_writes;
>> sum = m->write_latency_sum;
>> jiffies_to_timespec64(sum, &ts);
>> write->sec = cpu_to_le32(ts.tv_sec);
>> @@ -79,7 +77,6 @@ static bool ceph_mdsc_send_metrics(struct ceph_mds_client *mdsc,
>> meta->ver = 1;
>> meta->compat = 1;
>> meta->data_len = cpu_to_le32(sizeof(*meta) - 10);
>> - total = m->total_metadatas;
>> sum = m->metadata_latency_sum;
>> jiffies_to_timespec64(sum, &ts);
>> meta->sec = cpu_to_le32(ts.tv_sec);
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-07-24 22:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-24 19:45 [PATCH] ceph: eliminate unused "total" variable in ceph_mdsc_send_metrics Jeff Layton
2020-07-24 20:10 ` Jeff Layton
2020-07-24 22:39 ` Xiubo Li
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.