From 44601d819b5c5075ca34829871b5cf05673c9571 Mon Sep 17 00:00:00 2001 From: David Howells Date: Thu, 19 Nov 2009 18:11:32 +0000 Subject: [PATCH] --- yaml --- r: 168830 b: refs/heads/master c: e3d4d28b1c8cc7c26536a50b43d86ccd39878550 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/Documentation/filesystems/caching/fscache.txt | 1 + trunk/fs/fscache/internal.h | 1 + trunk/fs/fscache/operation.c | 5 +++++ trunk/fs/fscache/stats.c | 6 ++++-- 5 files changed, 12 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index b366ad9324a0..824ed73bc9a0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 285e728b0ac55b53a673114096168d6f74930167 +refs/heads/master: e3d4d28b1c8cc7c26536a50b43d86ccd39878550 diff --git a/trunk/Documentation/filesystems/caching/fscache.txt b/trunk/Documentation/filesystems/caching/fscache.txt index 9cf2cfbc81c9..057a3c71d524 100644 --- a/trunk/Documentation/filesystems/caching/fscache.txt +++ b/trunk/Documentation/filesystems/caching/fscache.txt @@ -276,6 +276,7 @@ proc files. run=N Number of times async ops given CPU time enq=N Number of times async ops queued for processing can=N Number of async ops cancelled + rej=N Number of async ops rejected due to object lookup/create failure dfr=N Number of async ops queued for deferred release rel=N Number of async ops released gc=N Number of deferred-release async ops garbage collected diff --git a/trunk/fs/fscache/internal.h b/trunk/fs/fscache/internal.h index ba1853fa1ff9..a0769872b19c 100644 --- a/trunk/fs/fscache/internal.h +++ b/trunk/fs/fscache/internal.h @@ -143,6 +143,7 @@ extern atomic_t fscache_n_op_deferred_release; extern atomic_t fscache_n_op_release; extern atomic_t fscache_n_op_gc; extern atomic_t fscache_n_op_cancelled; +extern atomic_t fscache_n_op_rejected; extern atomic_t fscache_n_attr_changed; extern atomic_t fscache_n_attr_changed_ok; diff --git a/trunk/fs/fscache/operation.c b/trunk/fs/fscache/operation.c index 296492efb81b..313e79a14266 100644 --- a/trunk/fs/fscache/operation.c +++ b/trunk/fs/fscache/operation.c @@ -232,6 +232,11 @@ int fscache_submit_op(struct fscache_object *object, list_add_tail(&op->pend_link, &object->pending_ops); fscache_stat(&fscache_n_op_pend); ret = 0; + } else if (object->state == FSCACHE_OBJECT_DYING || + object->state == FSCACHE_OBJECT_LC_DYING || + object->state == FSCACHE_OBJECT_WITHDRAWING) { + fscache_stat(&fscache_n_op_rejected); + ret = -ENOBUFS; } else if (!test_bit(FSCACHE_IOERROR, &object->cache->flags)) { fscache_report_unexpected_submission(object, op, ostate); ASSERT(!fscache_object_is_active(object)); diff --git a/trunk/fs/fscache/stats.c b/trunk/fs/fscache/stats.c index 1d53ea68409e..045ba396dbf2 100644 --- a/trunk/fs/fscache/stats.c +++ b/trunk/fs/fscache/stats.c @@ -26,6 +26,7 @@ atomic_t fscache_n_op_deferred_release; atomic_t fscache_n_op_release; atomic_t fscache_n_op_gc; atomic_t fscache_n_op_cancelled; +atomic_t fscache_n_op_rejected; atomic_t fscache_n_attr_changed; atomic_t fscache_n_attr_changed_ok; @@ -210,11 +211,12 @@ static int fscache_stats_show(struct seq_file *m, void *v) atomic_read(&fscache_n_store_radix_deletes), atomic_read(&fscache_n_store_pages_over_limit)); - seq_printf(m, "Ops : pend=%u run=%u enq=%u can=%u\n", + seq_printf(m, "Ops : pend=%u run=%u enq=%u can=%u rej=%u\n", atomic_read(&fscache_n_op_pend), atomic_read(&fscache_n_op_run), atomic_read(&fscache_n_op_enqueue), - atomic_read(&fscache_n_op_cancelled)); + atomic_read(&fscache_n_op_cancelled), + atomic_read(&fscache_n_op_rejected)); seq_printf(m, "Ops : dfr=%u rel=%u gc=%u\n", atomic_read(&fscache_n_op_deferred_release), atomic_read(&fscache_n_op_release),