]> git.baikalelectronics.ru Git - kernel.git/commit
dm log writes: make sure super sector log updates are written in order
authorzhangyi (F) <yi.zhang@huawei.com>
Wed, 5 Jun 2019 13:27:08 +0000 (21:27 +0800)
committerMike Snitzer <snitzer@redhat.com>
Tue, 25 Jun 2019 18:09:13 +0000 (14:09 -0400)
commit2b506d646eb95db8451b51fbc792c9faefd96aee
tree885221a90ef43a449871fbd4b886dbfa154660f9
parent533047b6a864b14530c2fa37cf97f9f5b16230ce
dm log writes: make sure super sector log updates are written in order

Currently, although we submit super bios in order (and super.nr_entries
is incremented by each logged entry), submit_bio() is async so each
super sector may not be written to log device in order and then the
final nr_entries may be smaller than it should be.

This problem can be reproduced by the xfstests generic/455 with ext4:

  QA output created by 455
 -Silence is golden
 +mark 'end' does not exist

Fix this by serializing submission of super sectors to make sure each
is written to the log disk in order.

Fixes: 6b031bb4688d2 ("dm: add log writes target")
Cc: stable@vger.kernel.org
Signed-off-by: zhangyi (F) <yi.zhang@huawei.com>
Suggested-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-log-writes.c