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

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
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -314,9 +314,9 @@ EXPORT_SYMBOL(fscache_add_cache);
 */
void fscache_io_error(struct fscache_cache *cache)
{
	set_bit(FSCACHE_IOERROR, &cache->flags);

	printk(KERN_ERR "FS-Cache: Cache %s stopped due to I/O error\n",
	if (!test_and_set_bit(FSCACHE_IOERROR, &cache->flags))
		printk(KERN_ERR "FS-Cache:"
		       " Cache '%s' stopped due to I/O error\n",
		       cache->ops->name);
}
EXPORT_SYMBOL(fscache_io_error);