[PATCHv3 6/8] zram: report failed read and write stats

From: Sergey Senozhatsky
Date: Thu Jan 16 2014 - 08:16:27 EST

zram accounted but did not report numbers of failed read
and write queries. make these stats available as failed_reads
and failed_writes attrs.

Acked-by: Minchan Kim <minchan@xxxxxxxxxx>
Acked-by: Jerome Marchand <jmarchan@xxxxxxxxxx>
Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@xxxxxxxxx>
drivers/block/zram/zram_drv.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index e7102f1..9d67fbf 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -728,6 +728,8 @@ static DEVICE_ATTR(mem_used_total, S_IRUGO, mem_used_total_show, NULL);

@@ -739,6 +741,8 @@ static struct attribute *zram_disk_attrs[] = {
+ &dev_attr_failed_reads.attr,
+ &dev_attr_failed_writes.attr,

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/