diff options
author | Hyunchul Lee <cheol.lee@lge.com> | 2017-07-31 16:22:20 +0900 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2017-09-11 10:07:34 -0400 |
commit | b7e326f7b7375392d06f9cfbc27a7c63181f69d7 (patch) | |
tree | ceb313e8edf426e8d9d364e58881e3b6bdb3d9f4 /drivers/md | |
parent | 228bb5b26038a7d58b7c11af1297f34b534b59cd (diff) | |
download | linux-b7e326f7b7375392d06f9cfbc27a7c63181f69d7.tar.bz2 |
dm integrity: do not check integrity for failed read operations
Even though read operations fail, dm_integrity_map_continue() calls
integrity_metadata() to check integrity. In this case, just complete
these.
This also makes it so read I/O errors do not generate integrity warnings
in the kernel log.
Cc: stable@vger.kernel.org
Signed-off-by: Hyunchul Lee <cheol.lee@lge.com>
Acked-by: Milan Broz <gmazyland@gmail.com>
Acked-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/dm-integrity.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c index 293a19652d55..fe5ad640a0aa 100644 --- a/drivers/md/dm-integrity.c +++ b/drivers/md/dm-integrity.c @@ -1702,7 +1702,11 @@ sleep: if (need_sync_io) { wait_for_completion_io(&read_comp); - integrity_metadata(&dio->work); + if (likely(!bio->bi_status)) + integrity_metadata(&dio->work); + else + dec_in_flight(dio); + } else { INIT_WORK(&dio->work, integrity_metadata); queue_work(ic->metadata_wq, &dio->work); |