Skip to content

Commit

Permalink
fs/ceph:Modify the return value to void
Browse files Browse the repository at this point in the history
Modify the return value of the integer to void.

Signed-off-by: Zhou jie <zhoujie@nfschina.com>
  • Loading branch information
Zhou jie authored and intel-lab-lkp committed Sep 27, 2022
1 parent a8af0d6 commit 6c71630
Showing 1 changed file with 13 additions and 25 deletions.
38 changes: 13 additions & 25 deletions fs/ceph/debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
#include "mds_client.h"
#include "metric.h"

static int mdsmap_show(struct seq_file *s, void *p)
static void mdsmap_show(struct seq_file *s, void *p)
{
int i;
struct ceph_fs_client *fsc = s->private;
struct ceph_mdsmap *mdsmap;

if (!fsc->mdsc || !fsc->mdsc->mdsmap)
return 0;
return;
mdsmap = fsc->mdsc->mdsmap;
seq_printf(s, "epoch %d\n", mdsmap->m_epoch);
seq_printf(s, "root %d\n", mdsmap->m_root);
Expand All @@ -43,13 +43,12 @@ static int mdsmap_show(struct seq_file *s, void *p)
ceph_pr_addr(addr),
ceph_mds_state_name(state));
}
return 0;
}

/*
* mdsc debugfs
*/
static int mdsc_show(struct seq_file *s, void *p)
static void mdsc_show(struct seq_file *s, void *p)
{
struct ceph_fs_client *fsc = s->private;
struct ceph_mds_client *mdsc = fsc->mdsc;
Expand Down Expand Up @@ -124,7 +123,6 @@ static int mdsc_show(struct seq_file *s, void *p)
}
mutex_unlock(&mdsc->mutex);

return 0;
}

#define CEPH_LAT_METRIC_SHOW(name, total, avg, min, max, sq) { \
Expand All @@ -146,7 +144,7 @@ static int mdsc_show(struct seq_file *s, void *p)
name, total, avg, _min, max, sum); \
}

static int metrics_file_show(struct seq_file *s, void *p)
static void metrics_file_show(struct seq_file *s, void *p)
{
struct ceph_fs_client *fsc = s->private;
struct ceph_client_metric *m = &fsc->mdsc->metric;
Expand All @@ -161,7 +159,6 @@ static int metrics_file_show(struct seq_file *s, void *p)
atomic64_read(&m->total_caps));
seq_printf(s, "%-35s%lld\n", "opened inodes",
percpu_counter_sum(&m->opened_inodes));
return 0;
}

static const char * const metric_str[] = {
Expand All @@ -170,7 +167,7 @@ static const char * const metric_str[] = {
"metadata",
"copyfrom"
};
static int metrics_latency_show(struct seq_file *s, void *p)
static void metrics_latency_show(struct seq_file *s, void *p)
{
struct ceph_fs_client *fsc = s->private;
struct ceph_client_metric *cm = &fsc->mdsc->metric;
Expand All @@ -193,10 +190,9 @@ static int metrics_latency_show(struct seq_file *s, void *p)
CEPH_LAT_METRIC_SHOW(metric_str[i], total, avg, min, max, sq);
}

return 0;
}

static int metrics_size_show(struct seq_file *s, void *p)
static void metrics_size_show(struct seq_file *s, void *p)
{
struct ceph_fs_client *fsc = s->private;
struct ceph_client_metric *cm = &fsc->mdsc->metric;
Expand All @@ -223,10 +219,9 @@ static int metrics_size_show(struct seq_file *s, void *p)
CEPH_SZ_METRIC_SHOW(metric_str[i], total, avg, min, max, sum);
}

return 0;
}

static int metrics_caps_show(struct seq_file *s, void *p)
static void metrics_caps_show(struct seq_file *s, void *p)
{
struct ceph_fs_client *fsc = s->private;
struct ceph_client_metric *m = &fsc->mdsc->metric;
Expand All @@ -245,21 +240,19 @@ static int metrics_caps_show(struct seq_file *s, void *p)
percpu_counter_sum(&m->i_caps_mis),
percpu_counter_sum(&m->i_caps_hit));

return 0;
}

static int caps_show_cb(struct inode *inode, struct ceph_cap *cap, void *p)
static void caps_show_cb(struct inode *inode, struct ceph_cap *cap, void *p)
{
struct seq_file *s = p;

seq_printf(s, "0x%-17llx%-3d%-17s%-17s\n", ceph_ino(inode),
cap->session->s_mds,
ceph_cap_string(cap->issued),
ceph_cap_string(cap->implemented));
return 0;
}

static int caps_show(struct seq_file *s, void *p)
static void caps_show(struct seq_file *s, void *p)
{
struct ceph_fs_client *fsc = s->private;
struct ceph_mds_client *mdsc = fsc->mdsc;
Expand Down Expand Up @@ -304,10 +297,9 @@ static int caps_show(struct seq_file *s, void *p)
}
spin_unlock(&mdsc->caps_list_lock);

return 0;
}

static int mds_sessions_show(struct seq_file *s, void *ptr)
static void mds_sessions_show(struct seq_file *s, void *ptr)
{
struct ceph_fs_client *fsc = s->private;
struct ceph_mds_client *mdsc = fsc->mdsc;
Expand Down Expand Up @@ -340,10 +332,9 @@ static int mds_sessions_show(struct seq_file *s, void *ptr)
}
mutex_unlock(&mdsc->mutex);

return 0;
}

static int status_show(struct seq_file *s, void *p)
static void status_show(struct seq_file *s, void *p)
{
struct ceph_fs_client *fsc = s->private;
struct ceph_entity_inst *inst = &fsc->client->msgr.inst;
Expand All @@ -353,7 +344,6 @@ static int status_show(struct seq_file *s, void *p)
ceph_pr_addr(client_addr), le32_to_cpu(client_addr->nonce));
seq_printf(s, "blocklisted: %s\n", fsc->blocklisted ? "true" : "false");

return 0;
}

DEFINE_SHOW_ATTRIBUTE(mdsmap);
Expand All @@ -370,20 +360,18 @@ DEFINE_SHOW_ATTRIBUTE(metrics_caps);
/*
* debugfs
*/
static int congestion_kb_set(void *data, u64 val)
static void congestion_kb_set(void *data, u64 val)
{
struct ceph_fs_client *fsc = (struct ceph_fs_client *)data;

fsc->mount_options->congestion_kb = (int)val;
return 0;
}

static int congestion_kb_get(void *data, u64 *val)
static void congestion_kb_get(void *data, u64 *val)
{
struct ceph_fs_client *fsc = (struct ceph_fs_client *)data;

*val = (u64)fsc->mount_options->congestion_kb;
return 0;
}

DEFINE_SIMPLE_ATTRIBUTE(congestion_kb_fops, congestion_kb_get,
Expand Down

0 comments on commit 6c71630

Please sign in to comment.