OSDN Git Service

md/bitmap: Don't write bitmap while earlier writes might be in-flight
authorNeilBrown <neilb@suse.com>
Fri, 4 Nov 2016 05:46:03 +0000 (16:46 +1100)
committerShaohua Li <shli@fb.com>
Mon, 7 Nov 2016 23:08:23 +0000 (15:08 -0800)
commit85c9ccd4f026aad8e91ec1c182206e807cff932d
tree4e8e6bf92d4fae8c3e171f1dfba3fe9f0aeedad1
parenta9ae93c8cc0b63d8283f335604362f903d2244e2
md/bitmap: Don't write bitmap while earlier writes might be in-flight

As we don't wait for writes to complete in bitmap_daemon_work, they
could still be in-flight when bitmap_unplug writes again.  Or when
bitmap_daemon_work tries to write again.
This can be confusing and could risk the wrong data being written last.

So make sure we wait for old writes to complete before new writes start.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Shaohua Li <shli@fb.com>
drivers/md/bitmap.c