diff options
author | Dan Williams <dan.j.williams@intel.com> | 2015-10-21 13:20:02 -0400 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-10-21 14:43:38 -0600 |
commit | c7bfced9a6716ff66c9d61f934bb60af08d4688c (patch) | |
tree | ca3febf875a4365478296b2993c635899fe1416b /drivers/md/md.c | |
parent | 9609b9942b180a50b0162419abd2932a41117fe9 (diff) | |
download | linux-c7bfced9a6716ff66c9d61f934bb60af08d4688c.tar.gz linux-c7bfced9a6716ff66c9d61f934bb60af08d4688c.tar.bz2 linux-c7bfced9a6716ff66c9d61f934bb60af08d4688c.zip |
md: suspend i/o during runtime blk_integrity_unregister
Synchronize pending i/o against a change in the integrity profile to
avoid the possibility of spurious integrity errors. Given linear_add()
is suspending the mddev before manipulating the mddev, do the same for
the other personalities.
Acked-by: NeilBrown <neilb@suse.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 7d07caceb349..714aa92db174 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -1994,6 +1994,7 @@ void md_integrity_add_rdev(struct md_rdev *rdev, struct mddev *mddev) if (bi_rdev && blk_integrity_compare(mddev->gendisk, rdev->bdev->bd_disk) >= 0) return; + WARN_ON_ONCE(!mddev->suspended); printk(KERN_NOTICE "disabling data integrity on %s\n", mdname(mddev)); blk_integrity_unregister(mddev->gendisk); } |