Skip to content

Commit 0631d5e

Browse files
DaveWysochanskiRHamschuma-ntap
authored andcommitted
NFS: Remove all NFSIOS_FSCACHE counters due to conversion to netfs API
The old NFSIOS_FSCACHE counters are no longer accurate or useful with the conversion to the new netfs API. The new API does not have a page based interface, and so the counters in nfs_stat_fscachecounters are no longer obtainable. The new netfs the API has extensive statistics inside /proc/fs/fscache/stats so we no longer need NFS specific fscache stats. Note this also removes the 'fsc:' line from /proc/self/mountstats so it will be a user-visible change. Signed-off-by: Dave Wysochanski <dwysocha@redhat.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Tested-by: Daire Byrne <daire@dneg.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
1 parent 000dbe0 commit 0631d5e

File tree

3 files changed

+0
-40
lines changed

3 files changed

+0
-40
lines changed

fs/nfs/iostat.h

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717

1818
struct nfs_iostats {
1919
unsigned long long bytes[__NFSIOS_BYTESMAX];
20-
#ifdef CONFIG_NFS_FSCACHE
21-
unsigned long long fscache[__NFSIOS_FSCACHEMAX];
22-
#endif
2320
unsigned long events[__NFSIOS_COUNTSMAX];
2421
} ____cacheline_aligned;
2522

@@ -49,20 +46,6 @@ static inline void nfs_add_stats(const struct inode *inode,
4946
nfs_add_server_stats(NFS_SERVER(inode), stat, addend);
5047
}
5148

52-
#ifdef CONFIG_NFS_FSCACHE
53-
static inline void nfs_add_fscache_stats(struct inode *inode,
54-
enum nfs_stat_fscachecounters stat,
55-
long addend)
56-
{
57-
this_cpu_add(NFS_SERVER(inode)->io_stats->fscache[stat], addend);
58-
}
59-
static inline void nfs_inc_fscache_stats(struct inode *inode,
60-
enum nfs_stat_fscachecounters stat)
61-
{
62-
this_cpu_inc(NFS_SERVER(inode)->io_stats->fscache[stat]);
63-
}
64-
#endif
65-
6649
static inline struct nfs_iostats __percpu *nfs_alloc_iostats(void)
6750
{
6851
return alloc_percpu(struct nfs_iostats);

fs/nfs/super.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -692,10 +692,6 @@ int nfs_show_stats(struct seq_file *m, struct dentry *root)
692692
totals.events[i] += stats->events[i];
693693
for (i = 0; i < __NFSIOS_BYTESMAX; i++)
694694
totals.bytes[i] += stats->bytes[i];
695-
#ifdef CONFIG_NFS_FSCACHE
696-
for (i = 0; i < __NFSIOS_FSCACHEMAX; i++)
697-
totals.fscache[i] += stats->fscache[i];
698-
#endif
699695

700696
preempt_enable();
701697
}
@@ -706,13 +702,6 @@ int nfs_show_stats(struct seq_file *m, struct dentry *root)
706702
seq_puts(m, "\n\tbytes:\t");
707703
for (i = 0; i < __NFSIOS_BYTESMAX; i++)
708704
seq_printf(m, "%Lu ", totals.bytes[i]);
709-
#ifdef CONFIG_NFS_FSCACHE
710-
if (nfss->options & NFS_OPTION_FSCACHE) {
711-
seq_puts(m, "\n\tfsc:\t");
712-
for (i = 0; i < __NFSIOS_FSCACHEMAX; i++)
713-
seq_printf(m, "%Lu ", totals.fscache[i]);
714-
}
715-
#endif
716705
seq_putc(m, '\n');
717706

718707
rpc_clnt_show_stats(m, nfss->client);

include/linux/nfs_iostat.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -119,16 +119,4 @@ enum nfs_stat_eventcounters {
119119
__NFSIOS_COUNTSMAX,
120120
};
121121

122-
/*
123-
* NFS local caching servicing counters
124-
*/
125-
enum nfs_stat_fscachecounters {
126-
NFSIOS_FSCACHE_PAGES_READ_OK,
127-
NFSIOS_FSCACHE_PAGES_READ_FAIL,
128-
NFSIOS_FSCACHE_PAGES_WRITTEN_OK,
129-
NFSIOS_FSCACHE_PAGES_WRITTEN_FAIL,
130-
NFSIOS_FSCACHE_PAGES_UNCACHED,
131-
__NFSIOS_FSCACHEMAX,
132-
};
133-
134122
#endif /* _LINUX_NFS_IOSTAT */

0 commit comments

Comments
 (0)