diff options
author | NeilBrown <neilb@suse.de> | 2011-07-28 05:32:41 +0400 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-07-28 05:32:41 +0400 |
commit | cd5ff9a16f0831f68c1024d5d776075b5123b034 (patch) | |
tree | 490e297bde3d0c52b55d38b38ed1cdb5b5b6f43e /drivers/md/raid1.h | |
parent | 2ca68f5ed7383733102ee53cd8fa4021ecc3b275 (diff) | |
download | linux-cd5ff9a16f0831f68c1024d5d776075b5123b034.tar.xz |
md/raid1: Handle write errors by updating badblock log.
When we get a write error (in the data area, not in metadata),
update the badblock log rather than failing the whole device.
As the write may well be many blocks, we trying writing each
block individually and only log the ones which fail.
Signed-off-by: NeilBrown <neilb@suse.de>
Reviewed-by: Namhyung Kim <namhyung@gmail.com>
Diffstat (limited to 'drivers/md/raid1.h')
-rw-r--r-- | drivers/md/raid1.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/raid1.h b/drivers/md/raid1.h index b7885474e96c..e0d676b48974 100644 --- a/drivers/md/raid1.h +++ b/drivers/md/raid1.h @@ -145,7 +145,8 @@ struct r1bio_s { /* If a write for this request means we can clear some * known-bad-block records, we set this flag */ -#define R1BIO_MadeGood 7 +#define R1BIO_MadeGood 7 +#define R1BIO_WriteError 8 extern int md_raid1_congested(mddev_t *mddev, int bits); |