Commit cc4fc29e59c386919a7674e203be7822dc968dc0

Authored by David Howells
Committed by Linus Torvalds
1 parent 08dc179b9b

fs-cache: order the debugfs stats correctly

Order the debugfs statistics correctly.  The values displayed through a
seq_printf() statement should be in the same order as the names in the
format string.

In the 'Lookups' line, objects created ('crt=') and lookups timed out
('tmo=') have their values transposed.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 1 changed file with 2 additions and 2 deletions Inline Diff

1 /* FS-Cache statistics 1 /* FS-Cache statistics
2 * 2 *
3 * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved. 3 * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com) 4 * Written by David Howells (dhowells@redhat.com)
5 * 5 *
6 * This program is free software; you can redistribute it and/or 6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License 7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10 */ 10 */
11 11
12 #define FSCACHE_DEBUG_LEVEL THREAD 12 #define FSCACHE_DEBUG_LEVEL THREAD
13 #include <linux/module.h> 13 #include <linux/module.h>
14 #include <linux/proc_fs.h> 14 #include <linux/proc_fs.h>
15 #include <linux/seq_file.h> 15 #include <linux/seq_file.h>
16 #include "internal.h" 16 #include "internal.h"
17 17
18 /* 18 /*
19 * operation counters 19 * operation counters
20 */ 20 */
21 atomic_t fscache_n_op_pend; 21 atomic_t fscache_n_op_pend;
22 atomic_t fscache_n_op_run; 22 atomic_t fscache_n_op_run;
23 atomic_t fscache_n_op_enqueue; 23 atomic_t fscache_n_op_enqueue;
24 atomic_t fscache_n_op_requeue; 24 atomic_t fscache_n_op_requeue;
25 atomic_t fscache_n_op_deferred_release; 25 atomic_t fscache_n_op_deferred_release;
26 atomic_t fscache_n_op_release; 26 atomic_t fscache_n_op_release;
27 atomic_t fscache_n_op_gc; 27 atomic_t fscache_n_op_gc;
28 atomic_t fscache_n_op_cancelled; 28 atomic_t fscache_n_op_cancelled;
29 atomic_t fscache_n_op_rejected; 29 atomic_t fscache_n_op_rejected;
30 30
31 atomic_t fscache_n_attr_changed; 31 atomic_t fscache_n_attr_changed;
32 atomic_t fscache_n_attr_changed_ok; 32 atomic_t fscache_n_attr_changed_ok;
33 atomic_t fscache_n_attr_changed_nobufs; 33 atomic_t fscache_n_attr_changed_nobufs;
34 atomic_t fscache_n_attr_changed_nomem; 34 atomic_t fscache_n_attr_changed_nomem;
35 atomic_t fscache_n_attr_changed_calls; 35 atomic_t fscache_n_attr_changed_calls;
36 36
37 atomic_t fscache_n_allocs; 37 atomic_t fscache_n_allocs;
38 atomic_t fscache_n_allocs_ok; 38 atomic_t fscache_n_allocs_ok;
39 atomic_t fscache_n_allocs_wait; 39 atomic_t fscache_n_allocs_wait;
40 atomic_t fscache_n_allocs_nobufs; 40 atomic_t fscache_n_allocs_nobufs;
41 atomic_t fscache_n_allocs_intr; 41 atomic_t fscache_n_allocs_intr;
42 atomic_t fscache_n_allocs_object_dead; 42 atomic_t fscache_n_allocs_object_dead;
43 atomic_t fscache_n_alloc_ops; 43 atomic_t fscache_n_alloc_ops;
44 atomic_t fscache_n_alloc_op_waits; 44 atomic_t fscache_n_alloc_op_waits;
45 45
46 atomic_t fscache_n_retrievals; 46 atomic_t fscache_n_retrievals;
47 atomic_t fscache_n_retrievals_ok; 47 atomic_t fscache_n_retrievals_ok;
48 atomic_t fscache_n_retrievals_wait; 48 atomic_t fscache_n_retrievals_wait;
49 atomic_t fscache_n_retrievals_nodata; 49 atomic_t fscache_n_retrievals_nodata;
50 atomic_t fscache_n_retrievals_nobufs; 50 atomic_t fscache_n_retrievals_nobufs;
51 atomic_t fscache_n_retrievals_intr; 51 atomic_t fscache_n_retrievals_intr;
52 atomic_t fscache_n_retrievals_nomem; 52 atomic_t fscache_n_retrievals_nomem;
53 atomic_t fscache_n_retrievals_object_dead; 53 atomic_t fscache_n_retrievals_object_dead;
54 atomic_t fscache_n_retrieval_ops; 54 atomic_t fscache_n_retrieval_ops;
55 atomic_t fscache_n_retrieval_op_waits; 55 atomic_t fscache_n_retrieval_op_waits;
56 56
57 atomic_t fscache_n_stores; 57 atomic_t fscache_n_stores;
58 atomic_t fscache_n_stores_ok; 58 atomic_t fscache_n_stores_ok;
59 atomic_t fscache_n_stores_again; 59 atomic_t fscache_n_stores_again;
60 atomic_t fscache_n_stores_nobufs; 60 atomic_t fscache_n_stores_nobufs;
61 atomic_t fscache_n_stores_oom; 61 atomic_t fscache_n_stores_oom;
62 atomic_t fscache_n_store_ops; 62 atomic_t fscache_n_store_ops;
63 atomic_t fscache_n_store_calls; 63 atomic_t fscache_n_store_calls;
64 atomic_t fscache_n_store_pages; 64 atomic_t fscache_n_store_pages;
65 atomic_t fscache_n_store_radix_deletes; 65 atomic_t fscache_n_store_radix_deletes;
66 atomic_t fscache_n_store_pages_over_limit; 66 atomic_t fscache_n_store_pages_over_limit;
67 67
68 atomic_t fscache_n_store_vmscan_not_storing; 68 atomic_t fscache_n_store_vmscan_not_storing;
69 atomic_t fscache_n_store_vmscan_gone; 69 atomic_t fscache_n_store_vmscan_gone;
70 atomic_t fscache_n_store_vmscan_busy; 70 atomic_t fscache_n_store_vmscan_busy;
71 atomic_t fscache_n_store_vmscan_cancelled; 71 atomic_t fscache_n_store_vmscan_cancelled;
72 72
73 atomic_t fscache_n_marks; 73 atomic_t fscache_n_marks;
74 atomic_t fscache_n_uncaches; 74 atomic_t fscache_n_uncaches;
75 75
76 atomic_t fscache_n_acquires; 76 atomic_t fscache_n_acquires;
77 atomic_t fscache_n_acquires_null; 77 atomic_t fscache_n_acquires_null;
78 atomic_t fscache_n_acquires_no_cache; 78 atomic_t fscache_n_acquires_no_cache;
79 atomic_t fscache_n_acquires_ok; 79 atomic_t fscache_n_acquires_ok;
80 atomic_t fscache_n_acquires_nobufs; 80 atomic_t fscache_n_acquires_nobufs;
81 atomic_t fscache_n_acquires_oom; 81 atomic_t fscache_n_acquires_oom;
82 82
83 atomic_t fscache_n_updates; 83 atomic_t fscache_n_updates;
84 atomic_t fscache_n_updates_null; 84 atomic_t fscache_n_updates_null;
85 atomic_t fscache_n_updates_run; 85 atomic_t fscache_n_updates_run;
86 86
87 atomic_t fscache_n_relinquishes; 87 atomic_t fscache_n_relinquishes;
88 atomic_t fscache_n_relinquishes_null; 88 atomic_t fscache_n_relinquishes_null;
89 atomic_t fscache_n_relinquishes_waitcrt; 89 atomic_t fscache_n_relinquishes_waitcrt;
90 atomic_t fscache_n_relinquishes_retire; 90 atomic_t fscache_n_relinquishes_retire;
91 91
92 atomic_t fscache_n_cookie_index; 92 atomic_t fscache_n_cookie_index;
93 atomic_t fscache_n_cookie_data; 93 atomic_t fscache_n_cookie_data;
94 atomic_t fscache_n_cookie_special; 94 atomic_t fscache_n_cookie_special;
95 95
96 atomic_t fscache_n_object_alloc; 96 atomic_t fscache_n_object_alloc;
97 atomic_t fscache_n_object_no_alloc; 97 atomic_t fscache_n_object_no_alloc;
98 atomic_t fscache_n_object_lookups; 98 atomic_t fscache_n_object_lookups;
99 atomic_t fscache_n_object_lookups_negative; 99 atomic_t fscache_n_object_lookups_negative;
100 atomic_t fscache_n_object_lookups_positive; 100 atomic_t fscache_n_object_lookups_positive;
101 atomic_t fscache_n_object_lookups_timed_out; 101 atomic_t fscache_n_object_lookups_timed_out;
102 atomic_t fscache_n_object_created; 102 atomic_t fscache_n_object_created;
103 atomic_t fscache_n_object_avail; 103 atomic_t fscache_n_object_avail;
104 atomic_t fscache_n_object_dead; 104 atomic_t fscache_n_object_dead;
105 105
106 atomic_t fscache_n_checkaux_none; 106 atomic_t fscache_n_checkaux_none;
107 atomic_t fscache_n_checkaux_okay; 107 atomic_t fscache_n_checkaux_okay;
108 atomic_t fscache_n_checkaux_update; 108 atomic_t fscache_n_checkaux_update;
109 atomic_t fscache_n_checkaux_obsolete; 109 atomic_t fscache_n_checkaux_obsolete;
110 110
111 atomic_t fscache_n_cop_alloc_object; 111 atomic_t fscache_n_cop_alloc_object;
112 atomic_t fscache_n_cop_lookup_object; 112 atomic_t fscache_n_cop_lookup_object;
113 atomic_t fscache_n_cop_lookup_complete; 113 atomic_t fscache_n_cop_lookup_complete;
114 atomic_t fscache_n_cop_grab_object; 114 atomic_t fscache_n_cop_grab_object;
115 atomic_t fscache_n_cop_update_object; 115 atomic_t fscache_n_cop_update_object;
116 atomic_t fscache_n_cop_drop_object; 116 atomic_t fscache_n_cop_drop_object;
117 atomic_t fscache_n_cop_put_object; 117 atomic_t fscache_n_cop_put_object;
118 atomic_t fscache_n_cop_sync_cache; 118 atomic_t fscache_n_cop_sync_cache;
119 atomic_t fscache_n_cop_attr_changed; 119 atomic_t fscache_n_cop_attr_changed;
120 atomic_t fscache_n_cop_read_or_alloc_page; 120 atomic_t fscache_n_cop_read_or_alloc_page;
121 atomic_t fscache_n_cop_read_or_alloc_pages; 121 atomic_t fscache_n_cop_read_or_alloc_pages;
122 atomic_t fscache_n_cop_allocate_page; 122 atomic_t fscache_n_cop_allocate_page;
123 atomic_t fscache_n_cop_allocate_pages; 123 atomic_t fscache_n_cop_allocate_pages;
124 atomic_t fscache_n_cop_write_page; 124 atomic_t fscache_n_cop_write_page;
125 atomic_t fscache_n_cop_uncache_page; 125 atomic_t fscache_n_cop_uncache_page;
126 atomic_t fscache_n_cop_dissociate_pages; 126 atomic_t fscache_n_cop_dissociate_pages;
127 127
128 /* 128 /*
129 * display the general statistics 129 * display the general statistics
130 */ 130 */
131 static int fscache_stats_show(struct seq_file *m, void *v) 131 static int fscache_stats_show(struct seq_file *m, void *v)
132 { 132 {
133 seq_puts(m, "FS-Cache statistics\n"); 133 seq_puts(m, "FS-Cache statistics\n");
134 134
135 seq_printf(m, "Cookies: idx=%u dat=%u spc=%u\n", 135 seq_printf(m, "Cookies: idx=%u dat=%u spc=%u\n",
136 atomic_read(&fscache_n_cookie_index), 136 atomic_read(&fscache_n_cookie_index),
137 atomic_read(&fscache_n_cookie_data), 137 atomic_read(&fscache_n_cookie_data),
138 atomic_read(&fscache_n_cookie_special)); 138 atomic_read(&fscache_n_cookie_special));
139 139
140 seq_printf(m, "Objects: alc=%u nal=%u avl=%u ded=%u\n", 140 seq_printf(m, "Objects: alc=%u nal=%u avl=%u ded=%u\n",
141 atomic_read(&fscache_n_object_alloc), 141 atomic_read(&fscache_n_object_alloc),
142 atomic_read(&fscache_n_object_no_alloc), 142 atomic_read(&fscache_n_object_no_alloc),
143 atomic_read(&fscache_n_object_avail), 143 atomic_read(&fscache_n_object_avail),
144 atomic_read(&fscache_n_object_dead)); 144 atomic_read(&fscache_n_object_dead));
145 seq_printf(m, "ChkAux : non=%u ok=%u upd=%u obs=%u\n", 145 seq_printf(m, "ChkAux : non=%u ok=%u upd=%u obs=%u\n",
146 atomic_read(&fscache_n_checkaux_none), 146 atomic_read(&fscache_n_checkaux_none),
147 atomic_read(&fscache_n_checkaux_okay), 147 atomic_read(&fscache_n_checkaux_okay),
148 atomic_read(&fscache_n_checkaux_update), 148 atomic_read(&fscache_n_checkaux_update),
149 atomic_read(&fscache_n_checkaux_obsolete)); 149 atomic_read(&fscache_n_checkaux_obsolete));
150 150
151 seq_printf(m, "Pages : mrk=%u unc=%u\n", 151 seq_printf(m, "Pages : mrk=%u unc=%u\n",
152 atomic_read(&fscache_n_marks), 152 atomic_read(&fscache_n_marks),
153 atomic_read(&fscache_n_uncaches)); 153 atomic_read(&fscache_n_uncaches));
154 154
155 seq_printf(m, "Acquire: n=%u nul=%u noc=%u ok=%u nbf=%u" 155 seq_printf(m, "Acquire: n=%u nul=%u noc=%u ok=%u nbf=%u"
156 " oom=%u\n", 156 " oom=%u\n",
157 atomic_read(&fscache_n_acquires), 157 atomic_read(&fscache_n_acquires),
158 atomic_read(&fscache_n_acquires_null), 158 atomic_read(&fscache_n_acquires_null),
159 atomic_read(&fscache_n_acquires_no_cache), 159 atomic_read(&fscache_n_acquires_no_cache),
160 atomic_read(&fscache_n_acquires_ok), 160 atomic_read(&fscache_n_acquires_ok),
161 atomic_read(&fscache_n_acquires_nobufs), 161 atomic_read(&fscache_n_acquires_nobufs),
162 atomic_read(&fscache_n_acquires_oom)); 162 atomic_read(&fscache_n_acquires_oom));
163 163
164 seq_printf(m, "Lookups: n=%u neg=%u pos=%u crt=%u tmo=%u\n", 164 seq_printf(m, "Lookups: n=%u neg=%u pos=%u crt=%u tmo=%u\n",
165 atomic_read(&fscache_n_object_lookups), 165 atomic_read(&fscache_n_object_lookups),
166 atomic_read(&fscache_n_object_lookups_negative), 166 atomic_read(&fscache_n_object_lookups_negative),
167 atomic_read(&fscache_n_object_lookups_positive), 167 atomic_read(&fscache_n_object_lookups_positive),
168 atomic_read(&fscache_n_object_lookups_timed_out), 168 atomic_read(&fscache_n_object_created),
169 atomic_read(&fscache_n_object_created)); 169 atomic_read(&fscache_n_object_lookups_timed_out));
170 170
171 seq_printf(m, "Updates: n=%u nul=%u run=%u\n", 171 seq_printf(m, "Updates: n=%u nul=%u run=%u\n",
172 atomic_read(&fscache_n_updates), 172 atomic_read(&fscache_n_updates),
173 atomic_read(&fscache_n_updates_null), 173 atomic_read(&fscache_n_updates_null),
174 atomic_read(&fscache_n_updates_run)); 174 atomic_read(&fscache_n_updates_run));
175 175
176 seq_printf(m, "Relinqs: n=%u nul=%u wcr=%u rtr=%u\n", 176 seq_printf(m, "Relinqs: n=%u nul=%u wcr=%u rtr=%u\n",
177 atomic_read(&fscache_n_relinquishes), 177 atomic_read(&fscache_n_relinquishes),
178 atomic_read(&fscache_n_relinquishes_null), 178 atomic_read(&fscache_n_relinquishes_null),
179 atomic_read(&fscache_n_relinquishes_waitcrt), 179 atomic_read(&fscache_n_relinquishes_waitcrt),
180 atomic_read(&fscache_n_relinquishes_retire)); 180 atomic_read(&fscache_n_relinquishes_retire));
181 181
182 seq_printf(m, "AttrChg: n=%u ok=%u nbf=%u oom=%u run=%u\n", 182 seq_printf(m, "AttrChg: n=%u ok=%u nbf=%u oom=%u run=%u\n",
183 atomic_read(&fscache_n_attr_changed), 183 atomic_read(&fscache_n_attr_changed),
184 atomic_read(&fscache_n_attr_changed_ok), 184 atomic_read(&fscache_n_attr_changed_ok),
185 atomic_read(&fscache_n_attr_changed_nobufs), 185 atomic_read(&fscache_n_attr_changed_nobufs),
186 atomic_read(&fscache_n_attr_changed_nomem), 186 atomic_read(&fscache_n_attr_changed_nomem),
187 atomic_read(&fscache_n_attr_changed_calls)); 187 atomic_read(&fscache_n_attr_changed_calls));
188 188
189 seq_printf(m, "Allocs : n=%u ok=%u wt=%u nbf=%u int=%u\n", 189 seq_printf(m, "Allocs : n=%u ok=%u wt=%u nbf=%u int=%u\n",
190 atomic_read(&fscache_n_allocs), 190 atomic_read(&fscache_n_allocs),
191 atomic_read(&fscache_n_allocs_ok), 191 atomic_read(&fscache_n_allocs_ok),
192 atomic_read(&fscache_n_allocs_wait), 192 atomic_read(&fscache_n_allocs_wait),
193 atomic_read(&fscache_n_allocs_nobufs), 193 atomic_read(&fscache_n_allocs_nobufs),
194 atomic_read(&fscache_n_allocs_intr)); 194 atomic_read(&fscache_n_allocs_intr));
195 seq_printf(m, "Allocs : ops=%u owt=%u abt=%u\n", 195 seq_printf(m, "Allocs : ops=%u owt=%u abt=%u\n",
196 atomic_read(&fscache_n_alloc_ops), 196 atomic_read(&fscache_n_alloc_ops),
197 atomic_read(&fscache_n_alloc_op_waits), 197 atomic_read(&fscache_n_alloc_op_waits),
198 atomic_read(&fscache_n_allocs_object_dead)); 198 atomic_read(&fscache_n_allocs_object_dead));
199 199
200 seq_printf(m, "Retrvls: n=%u ok=%u wt=%u nod=%u nbf=%u" 200 seq_printf(m, "Retrvls: n=%u ok=%u wt=%u nod=%u nbf=%u"
201 " int=%u oom=%u\n", 201 " int=%u oom=%u\n",
202 atomic_read(&fscache_n_retrievals), 202 atomic_read(&fscache_n_retrievals),
203 atomic_read(&fscache_n_retrievals_ok), 203 atomic_read(&fscache_n_retrievals_ok),
204 atomic_read(&fscache_n_retrievals_wait), 204 atomic_read(&fscache_n_retrievals_wait),
205 atomic_read(&fscache_n_retrievals_nodata), 205 atomic_read(&fscache_n_retrievals_nodata),
206 atomic_read(&fscache_n_retrievals_nobufs), 206 atomic_read(&fscache_n_retrievals_nobufs),
207 atomic_read(&fscache_n_retrievals_intr), 207 atomic_read(&fscache_n_retrievals_intr),
208 atomic_read(&fscache_n_retrievals_nomem)); 208 atomic_read(&fscache_n_retrievals_nomem));
209 seq_printf(m, "Retrvls: ops=%u owt=%u abt=%u\n", 209 seq_printf(m, "Retrvls: ops=%u owt=%u abt=%u\n",
210 atomic_read(&fscache_n_retrieval_ops), 210 atomic_read(&fscache_n_retrieval_ops),
211 atomic_read(&fscache_n_retrieval_op_waits), 211 atomic_read(&fscache_n_retrieval_op_waits),
212 atomic_read(&fscache_n_retrievals_object_dead)); 212 atomic_read(&fscache_n_retrievals_object_dead));
213 213
214 seq_printf(m, "Stores : n=%u ok=%u agn=%u nbf=%u oom=%u\n", 214 seq_printf(m, "Stores : n=%u ok=%u agn=%u nbf=%u oom=%u\n",
215 atomic_read(&fscache_n_stores), 215 atomic_read(&fscache_n_stores),
216 atomic_read(&fscache_n_stores_ok), 216 atomic_read(&fscache_n_stores_ok),
217 atomic_read(&fscache_n_stores_again), 217 atomic_read(&fscache_n_stores_again),
218 atomic_read(&fscache_n_stores_nobufs), 218 atomic_read(&fscache_n_stores_nobufs),
219 atomic_read(&fscache_n_stores_oom)); 219 atomic_read(&fscache_n_stores_oom));
220 seq_printf(m, "Stores : ops=%u run=%u pgs=%u rxd=%u olm=%u\n", 220 seq_printf(m, "Stores : ops=%u run=%u pgs=%u rxd=%u olm=%u\n",
221 atomic_read(&fscache_n_store_ops), 221 atomic_read(&fscache_n_store_ops),
222 atomic_read(&fscache_n_store_calls), 222 atomic_read(&fscache_n_store_calls),
223 atomic_read(&fscache_n_store_pages), 223 atomic_read(&fscache_n_store_pages),
224 atomic_read(&fscache_n_store_radix_deletes), 224 atomic_read(&fscache_n_store_radix_deletes),
225 atomic_read(&fscache_n_store_pages_over_limit)); 225 atomic_read(&fscache_n_store_pages_over_limit));
226 226
227 seq_printf(m, "VmScan : nos=%u gon=%u bsy=%u can=%u\n", 227 seq_printf(m, "VmScan : nos=%u gon=%u bsy=%u can=%u\n",
228 atomic_read(&fscache_n_store_vmscan_not_storing), 228 atomic_read(&fscache_n_store_vmscan_not_storing),
229 atomic_read(&fscache_n_store_vmscan_gone), 229 atomic_read(&fscache_n_store_vmscan_gone),
230 atomic_read(&fscache_n_store_vmscan_busy), 230 atomic_read(&fscache_n_store_vmscan_busy),
231 atomic_read(&fscache_n_store_vmscan_cancelled)); 231 atomic_read(&fscache_n_store_vmscan_cancelled));
232 232
233 seq_printf(m, "Ops : pend=%u run=%u enq=%u can=%u rej=%u\n", 233 seq_printf(m, "Ops : pend=%u run=%u enq=%u can=%u rej=%u\n",
234 atomic_read(&fscache_n_op_pend), 234 atomic_read(&fscache_n_op_pend),
235 atomic_read(&fscache_n_op_run), 235 atomic_read(&fscache_n_op_run),
236 atomic_read(&fscache_n_op_enqueue), 236 atomic_read(&fscache_n_op_enqueue),
237 atomic_read(&fscache_n_op_cancelled), 237 atomic_read(&fscache_n_op_cancelled),
238 atomic_read(&fscache_n_op_rejected)); 238 atomic_read(&fscache_n_op_rejected));
239 seq_printf(m, "Ops : dfr=%u rel=%u gc=%u\n", 239 seq_printf(m, "Ops : dfr=%u rel=%u gc=%u\n",
240 atomic_read(&fscache_n_op_deferred_release), 240 atomic_read(&fscache_n_op_deferred_release),
241 atomic_read(&fscache_n_op_release), 241 atomic_read(&fscache_n_op_release),
242 atomic_read(&fscache_n_op_gc)); 242 atomic_read(&fscache_n_op_gc));
243 243
244 seq_printf(m, "CacheOp: alo=%d luo=%d luc=%d gro=%d\n", 244 seq_printf(m, "CacheOp: alo=%d luo=%d luc=%d gro=%d\n",
245 atomic_read(&fscache_n_cop_alloc_object), 245 atomic_read(&fscache_n_cop_alloc_object),
246 atomic_read(&fscache_n_cop_lookup_object), 246 atomic_read(&fscache_n_cop_lookup_object),
247 atomic_read(&fscache_n_cop_lookup_complete), 247 atomic_read(&fscache_n_cop_lookup_complete),
248 atomic_read(&fscache_n_cop_grab_object)); 248 atomic_read(&fscache_n_cop_grab_object));
249 seq_printf(m, "CacheOp: upo=%d dro=%d pto=%d atc=%d syn=%d\n", 249 seq_printf(m, "CacheOp: upo=%d dro=%d pto=%d atc=%d syn=%d\n",
250 atomic_read(&fscache_n_cop_update_object), 250 atomic_read(&fscache_n_cop_update_object),
251 atomic_read(&fscache_n_cop_drop_object), 251 atomic_read(&fscache_n_cop_drop_object),
252 atomic_read(&fscache_n_cop_put_object), 252 atomic_read(&fscache_n_cop_put_object),
253 atomic_read(&fscache_n_cop_attr_changed), 253 atomic_read(&fscache_n_cop_attr_changed),
254 atomic_read(&fscache_n_cop_sync_cache)); 254 atomic_read(&fscache_n_cop_sync_cache));
255 seq_printf(m, "CacheOp: rap=%d ras=%d alp=%d als=%d wrp=%d ucp=%d dsp=%d\n", 255 seq_printf(m, "CacheOp: rap=%d ras=%d alp=%d als=%d wrp=%d ucp=%d dsp=%d\n",
256 atomic_read(&fscache_n_cop_read_or_alloc_page), 256 atomic_read(&fscache_n_cop_read_or_alloc_page),
257 atomic_read(&fscache_n_cop_read_or_alloc_pages), 257 atomic_read(&fscache_n_cop_read_or_alloc_pages),
258 atomic_read(&fscache_n_cop_allocate_page), 258 atomic_read(&fscache_n_cop_allocate_page),
259 atomic_read(&fscache_n_cop_allocate_pages), 259 atomic_read(&fscache_n_cop_allocate_pages),
260 atomic_read(&fscache_n_cop_write_page), 260 atomic_read(&fscache_n_cop_write_page),
261 atomic_read(&fscache_n_cop_uncache_page), 261 atomic_read(&fscache_n_cop_uncache_page),
262 atomic_read(&fscache_n_cop_dissociate_pages)); 262 atomic_read(&fscache_n_cop_dissociate_pages));
263 return 0; 263 return 0;
264 } 264 }
265 265
266 /* 266 /*
267 * open "/proc/fs/fscache/stats" allowing provision of a statistical summary 267 * open "/proc/fs/fscache/stats" allowing provision of a statistical summary
268 */ 268 */
269 static int fscache_stats_open(struct inode *inode, struct file *file) 269 static int fscache_stats_open(struct inode *inode, struct file *file)
270 { 270 {
271 return single_open(file, fscache_stats_show, NULL); 271 return single_open(file, fscache_stats_show, NULL);
272 } 272 }
273 273
274 const struct file_operations fscache_stats_fops = { 274 const struct file_operations fscache_stats_fops = {
275 .owner = THIS_MODULE, 275 .owner = THIS_MODULE,
276 .open = fscache_stats_open, 276 .open = fscache_stats_open,
277 .read = seq_read, 277 .read = seq_read,
278 .llseek = seq_lseek, 278 .llseek = seq_lseek,
279 .release = seq_release, 279 .release = seq_release,
280 }; 280 };
281 281