aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/filesystems/caching/fscache.txt1
-rw-r--r--fs/fscache/internal.h1
-rw-r--r--fs/fscache/operation.c5
-rw-r--r--fs/fscache/stats.c6
4 files changed, 11 insertions, 2 deletions
diff --git a/Documentation/filesystems/caching/fscache.txt b/Documentation/filesystems/caching/fscache.txt
index 9cf2cfbc81c9..057a3c71d524 100644
--- a/Documentation/filesystems/caching/fscache.txt
+++ b/Documentation/filesystems/caching/fscache.txt
@@ -276,6 +276,7 @@ proc files.
276 run=N Number of times async ops given CPU time 276 run=N Number of times async ops given CPU time
277 enq=N Number of times async ops queued for processing 277 enq=N Number of times async ops queued for processing
278 can=N Number of async ops cancelled 278 can=N Number of async ops cancelled
279 rej=N Number of async ops rejected due to object lookup/create failure
279 dfr=N Number of async ops queued for deferred release 280 dfr=N Number of async ops queued for deferred release
280 rel=N Number of async ops released 281 rel=N Number of async ops released
281 gc=N Number of deferred-release async ops garbage collected 282 gc=N Number of deferred-release async ops garbage collected
diff --git a/fs/fscache/internal.h b/fs/fscache/internal.h
index ba1853fa1ff9..a0769872b19c 100644
--- a/fs/fscache/internal.h
+++ b/fs/fscache/internal.h
@@ -143,6 +143,7 @@ extern atomic_t fscache_n_op_deferred_release;
143extern atomic_t fscache_n_op_release; 143extern atomic_t fscache_n_op_release;
144extern atomic_t fscache_n_op_gc; 144extern atomic_t fscache_n_op_gc;
145extern atomic_t fscache_n_op_cancelled; 145extern atomic_t fscache_n_op_cancelled;
146extern atomic_t fscache_n_op_rejected;
146 147
147extern atomic_t fscache_n_attr_changed; 148extern atomic_t fscache_n_attr_changed;
148extern atomic_t fscache_n_attr_changed_ok; 149extern atomic_t fscache_n_attr_changed_ok;
diff --git a/fs/fscache/operation.c b/fs/fscache/operation.c
index 296492efb81b..313e79a14266 100644
--- a/fs/fscache/operation.c
+++ b/fs/fscache/operation.c
@@ -232,6 +232,11 @@ int fscache_submit_op(struct fscache_object *object,
232 list_add_tail(&op->pend_link, &object->pending_ops); 232 list_add_tail(&op->pend_link, &object->pending_ops);
233 fscache_stat(&fscache_n_op_pend); 233 fscache_stat(&fscache_n_op_pend);
234 ret = 0; 234 ret = 0;
235 } else if (object->state == FSCACHE_OBJECT_DYING ||
236 object->state == FSCACHE_OBJECT_LC_DYING ||
237 object->state == FSCACHE_OBJECT_WITHDRAWING) {
238 fscache_stat(&fscache_n_op_rejected);
239 ret = -ENOBUFS;
235 } else if (!test_bit(FSCACHE_IOERROR, &object->cache->flags)) { 240 } else if (!test_bit(FSCACHE_IOERROR, &object->cache->flags)) {
236 fscache_report_unexpected_submission(object, op, ostate); 241 fscache_report_unexpected_submission(object, op, ostate);
237 ASSERT(!fscache_object_is_active(object)); 242 ASSERT(!fscache_object_is_active(object));
diff --git a/fs/fscache/stats.c b/fs/fscache/stats.c
index 1d53ea68409e..045ba396dbf2 100644
--- a/fs/fscache/stats.c
+++ b/fs/fscache/stats.c
@@ -26,6 +26,7 @@ atomic_t fscache_n_op_deferred_release;
26atomic_t fscache_n_op_release; 26atomic_t fscache_n_op_release;
27atomic_t fscache_n_op_gc; 27atomic_t fscache_n_op_gc;
28atomic_t fscache_n_op_cancelled; 28atomic_t fscache_n_op_cancelled;
29atomic_t fscache_n_op_rejected;
29 30
30atomic_t fscache_n_attr_changed; 31atomic_t fscache_n_attr_changed;
31atomic_t fscache_n_attr_changed_ok; 32atomic_t fscache_n_attr_changed_ok;
@@ -210,11 +211,12 @@ static int fscache_stats_show(struct seq_file *m, void *v)
210 atomic_read(&fscache_n_store_radix_deletes), 211 atomic_read(&fscache_n_store_radix_deletes),
211 atomic_read(&fscache_n_store_pages_over_limit)); 212 atomic_read(&fscache_n_store_pages_over_limit));
212 213
213 seq_printf(m, "Ops : pend=%u run=%u enq=%u can=%u\n", 214 seq_printf(m, "Ops : pend=%u run=%u enq=%u can=%u rej=%u\n",
214 atomic_read(&fscache_n_op_pend), 215 atomic_read(&fscache_n_op_pend),
215 atomic_read(&fscache_n_op_run), 216 atomic_read(&fscache_n_op_run),
216 atomic_read(&fscache_n_op_enqueue), 217 atomic_read(&fscache_n_op_enqueue),
217 atomic_read(&fscache_n_op_cancelled)); 218 atomic_read(&fscache_n_op_cancelled),
219 atomic_read(&fscache_n_op_rejected));
218 seq_printf(m, "Ops : dfr=%u rel=%u gc=%u\n", 220 seq_printf(m, "Ops : dfr=%u rel=%u gc=%u\n",
219 atomic_read(&fscache_n_op_deferred_release), 221 atomic_read(&fscache_n_op_deferred_release),
220 atomic_read(&fscache_n_op_release), 222 atomic_read(&fscache_n_op_release),