Revert "NFSD: Fix frame size warning in svc_export_parse()"
This reverts commit 2f282ed1a9
.
This commit is contained in:
parent
f2f218a130
commit
18f77282d9
3 changed files with 17 additions and 31 deletions
|
@ -339,16 +339,12 @@ static int export_stats_init(struct export_stats *stats)
|
||||||
|
|
||||||
static void export_stats_reset(struct export_stats *stats)
|
static void export_stats_reset(struct export_stats *stats)
|
||||||
{
|
{
|
||||||
if (stats)
|
nfsd_percpu_counters_reset(stats->counter, EXP_STATS_COUNTERS_NUM);
|
||||||
nfsd_percpu_counters_reset(stats->counter,
|
|
||||||
EXP_STATS_COUNTERS_NUM);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void export_stats_destroy(struct export_stats *stats)
|
static void export_stats_destroy(struct export_stats *stats)
|
||||||
{
|
{
|
||||||
if (stats)
|
nfsd_percpu_counters_destroy(stats->counter, EXP_STATS_COUNTERS_NUM);
|
||||||
nfsd_percpu_counters_destroy(stats->counter,
|
|
||||||
EXP_STATS_COUNTERS_NUM);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void svc_export_put(struct kref *ref)
|
static void svc_export_put(struct kref *ref)
|
||||||
|
@ -357,8 +353,7 @@ static void svc_export_put(struct kref *ref)
|
||||||
path_put(&exp->ex_path);
|
path_put(&exp->ex_path);
|
||||||
auth_domain_put(exp->ex_client);
|
auth_domain_put(exp->ex_client);
|
||||||
nfsd4_fslocs_free(&exp->ex_fslocs);
|
nfsd4_fslocs_free(&exp->ex_fslocs);
|
||||||
export_stats_destroy(exp->ex_stats);
|
export_stats_destroy(&exp->ex_stats);
|
||||||
kfree(exp->ex_stats);
|
|
||||||
kfree(exp->ex_uuid);
|
kfree(exp->ex_uuid);
|
||||||
kfree_rcu(exp, ex_rcu);
|
kfree_rcu(exp, ex_rcu);
|
||||||
}
|
}
|
||||||
|
@ -743,15 +738,13 @@ static int svc_export_show(struct seq_file *m,
|
||||||
seq_putc(m, '\t');
|
seq_putc(m, '\t');
|
||||||
seq_escape(m, exp->ex_client->name, " \t\n\\");
|
seq_escape(m, exp->ex_client->name, " \t\n\\");
|
||||||
if (export_stats) {
|
if (export_stats) {
|
||||||
struct percpu_counter *counter = exp->ex_stats->counter;
|
seq_printf(m, "\t%lld\n", exp->ex_stats.start_time);
|
||||||
|
|
||||||
seq_printf(m, "\t%lld\n", exp->ex_stats->start_time);
|
|
||||||
seq_printf(m, "\tfh_stale: %lld\n",
|
seq_printf(m, "\tfh_stale: %lld\n",
|
||||||
percpu_counter_sum_positive(&counter[EXP_STATS_FH_STALE]));
|
percpu_counter_sum_positive(&exp->ex_stats.counter[EXP_STATS_FH_STALE]));
|
||||||
seq_printf(m, "\tio_read: %lld\n",
|
seq_printf(m, "\tio_read: %lld\n",
|
||||||
percpu_counter_sum_positive(&counter[EXP_STATS_IO_READ]));
|
percpu_counter_sum_positive(&exp->ex_stats.counter[EXP_STATS_IO_READ]));
|
||||||
seq_printf(m, "\tio_write: %lld\n",
|
seq_printf(m, "\tio_write: %lld\n",
|
||||||
percpu_counter_sum_positive(&counter[EXP_STATS_IO_WRITE]));
|
percpu_counter_sum_positive(&exp->ex_stats.counter[EXP_STATS_IO_WRITE]));
|
||||||
seq_putc(m, '\n');
|
seq_putc(m, '\n');
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -797,7 +790,7 @@ static void svc_export_init(struct cache_head *cnew, struct cache_head *citem)
|
||||||
new->ex_layout_types = 0;
|
new->ex_layout_types = 0;
|
||||||
new->ex_uuid = NULL;
|
new->ex_uuid = NULL;
|
||||||
new->cd = item->cd;
|
new->cd = item->cd;
|
||||||
export_stats_reset(new->ex_stats);
|
export_stats_reset(&new->ex_stats);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void export_update(struct cache_head *cnew, struct cache_head *citem)
|
static void export_update(struct cache_head *cnew, struct cache_head *citem)
|
||||||
|
@ -833,14 +826,7 @@ static struct cache_head *svc_export_alloc(void)
|
||||||
if (!i)
|
if (!i)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
i->ex_stats = kmalloc(sizeof(*(i->ex_stats)), GFP_KERNEL);
|
if (export_stats_init(&i->ex_stats)) {
|
||||||
if (!i->ex_stats) {
|
|
||||||
kfree(i);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (export_stats_init(i->ex_stats)) {
|
|
||||||
kfree(i->ex_stats);
|
|
||||||
kfree(i);
|
kfree(i);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,10 +64,10 @@ struct svc_export {
|
||||||
struct cache_head h;
|
struct cache_head h;
|
||||||
struct auth_domain * ex_client;
|
struct auth_domain * ex_client;
|
||||||
int ex_flags;
|
int ex_flags;
|
||||||
int ex_fsid;
|
|
||||||
struct path ex_path;
|
struct path ex_path;
|
||||||
kuid_t ex_anon_uid;
|
kuid_t ex_anon_uid;
|
||||||
kgid_t ex_anon_gid;
|
kgid_t ex_anon_gid;
|
||||||
|
int ex_fsid;
|
||||||
unsigned char * ex_uuid; /* 16 byte fsid */
|
unsigned char * ex_uuid; /* 16 byte fsid */
|
||||||
struct nfsd4_fs_locations ex_fslocs;
|
struct nfsd4_fs_locations ex_fslocs;
|
||||||
uint32_t ex_nflavors;
|
uint32_t ex_nflavors;
|
||||||
|
@ -76,7 +76,7 @@ struct svc_export {
|
||||||
struct nfsd4_deviceid_map *ex_devid_map;
|
struct nfsd4_deviceid_map *ex_devid_map;
|
||||||
struct cache_detail *cd;
|
struct cache_detail *cd;
|
||||||
struct rcu_head ex_rcu;
|
struct rcu_head ex_rcu;
|
||||||
struct export_stats *ex_stats;
|
struct export_stats ex_stats;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* an "export key" (expkey) maps a filehandlefragement to an
|
/* an "export key" (expkey) maps a filehandlefragement to an
|
||||||
|
|
|
@ -60,22 +60,22 @@ static inline void nfsd_stats_rc_nocache_inc(void)
|
||||||
static inline void nfsd_stats_fh_stale_inc(struct svc_export *exp)
|
static inline void nfsd_stats_fh_stale_inc(struct svc_export *exp)
|
||||||
{
|
{
|
||||||
percpu_counter_inc(&nfsdstats.counter[NFSD_STATS_FH_STALE]);
|
percpu_counter_inc(&nfsdstats.counter[NFSD_STATS_FH_STALE]);
|
||||||
if (exp && exp->ex_stats)
|
if (exp)
|
||||||
percpu_counter_inc(&exp->ex_stats->counter[EXP_STATS_FH_STALE]);
|
percpu_counter_inc(&exp->ex_stats.counter[EXP_STATS_FH_STALE]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void nfsd_stats_io_read_add(struct svc_export *exp, s64 amount)
|
static inline void nfsd_stats_io_read_add(struct svc_export *exp, s64 amount)
|
||||||
{
|
{
|
||||||
percpu_counter_add(&nfsdstats.counter[NFSD_STATS_IO_READ], amount);
|
percpu_counter_add(&nfsdstats.counter[NFSD_STATS_IO_READ], amount);
|
||||||
if (exp && exp->ex_stats)
|
if (exp)
|
||||||
percpu_counter_add(&exp->ex_stats->counter[EXP_STATS_IO_READ], amount);
|
percpu_counter_add(&exp->ex_stats.counter[EXP_STATS_IO_READ], amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void nfsd_stats_io_write_add(struct svc_export *exp, s64 amount)
|
static inline void nfsd_stats_io_write_add(struct svc_export *exp, s64 amount)
|
||||||
{
|
{
|
||||||
percpu_counter_add(&nfsdstats.counter[NFSD_STATS_IO_WRITE], amount);
|
percpu_counter_add(&nfsdstats.counter[NFSD_STATS_IO_WRITE], amount);
|
||||||
if (exp && exp->ex_stats)
|
if (exp)
|
||||||
percpu_counter_add(&exp->ex_stats->counter[EXP_STATS_IO_WRITE], amount);
|
percpu_counter_add(&exp->ex_stats.counter[EXP_STATS_IO_WRITE], amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void nfsd_stats_payload_misses_inc(struct nfsd_net *nn)
|
static inline void nfsd_stats_payload_misses_inc(struct nfsd_net *nn)
|
||||||
|
|
Loading…
Add table
Reference in a new issue