Commit 75bc4113 authored by David Howells's avatar David Howells

FS-Cache: Limit the number of I/O error reports for a cache

Limit the number of I/O error reports for a cache to 1 to prevent massive
amounts of noise.  After the first I/O error the cache is taken off line
automatically, so must be restarted to resume caching.
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
parent c2d35bfe
...@@ -314,10 +314,10 @@ EXPORT_SYMBOL(fscache_add_cache); ...@@ -314,10 +314,10 @@ EXPORT_SYMBOL(fscache_add_cache);
*/ */
void fscache_io_error(struct fscache_cache *cache) void fscache_io_error(struct fscache_cache *cache)
{ {
set_bit(FSCACHE_IOERROR, &cache->flags); if (!test_and_set_bit(FSCACHE_IOERROR, &cache->flags))
printk(KERN_ERR "FS-Cache:"
printk(KERN_ERR "FS-Cache: Cache %s stopped due to I/O error\n", " Cache '%s' stopped due to I/O error\n",
cache->ops->name); cache->ops->name);
} }
EXPORT_SYMBOL(fscache_io_error); EXPORT_SYMBOL(fscache_io_error);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment