]> git.baikalelectronics.ru Git - kernel.git/commit
dm snapshot: workaround for a false positive lockdep warning
authorMikulas Patocka <mpatocka@redhat.com>
Wed, 18 Sep 2013 23:14:22 +0000 (19:14 -0400)
committerMike Snitzer <snitzer@redhat.com>
Fri, 20 Sep 2013 14:36:34 +0000 (10:36 -0400)
commit9910a663ad58ce1b15dc5099ebd5677ca466ecaf
tree8579f306b45641432a1f4b7f3f4e73e6d2bb9ce7
parent1c60169182f3fe2d4b85ae7aaf9a1e8aee313a19
dm snapshot: workaround for a false positive lockdep warning

The kernel reports a lockdep warning if a snapshot is invalidated because
it runs out of space.

The lockdep warning was triggered by commit 00d9fb51861b21b599c069c94015
("workqueue: Catch more locking problems with flush_work()") in v3.5.

The warning is false positive.  The real cause for the warning is that
the lockdep engine treats different instances of md->lock as a single
lock.

This patch is a workaround - we use flush_workqueue instead of flush_work.
This code path is not performance sensitive (it is called only on
initialization or invalidation), thus it doesn't matter that we flush the
whole workqueue.

The real fix for the problem would be to teach the lockdep engine to treat
different instances of md->lock as separate locks.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Acked-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Cc: stable@vger.kernel.org # 3.5+
drivers/md/dm-snap-persistent.c