]> git.baikalelectronics.ru Git - kernel.git/commit
dm snapshot: fix oversights in optional discard support
authorMike Snitzer <snitzer@redhat.com>
Wed, 17 Jul 2019 15:12:30 +0000 (11:12 -0400)
committerMike Snitzer <snitzer@redhat.com>
Wed, 17 Jul 2019 15:12:30 +0000 (11:12 -0400)
commit42d065d0fc95768c8c3bf04ee35d40afd87f71fa
treeba1c9bde48555434b3343143d2f84fcf8770c037
parent0561d792ef385065a6f2cefc8650d3e65a0db144
dm snapshot: fix oversights in optional discard support

__find_snapshots_sharing_cow() should always be used with _origins_lock
held so fix snapshot_io_hints() accordingly.  Also, once a snapshot is
being merged discards must not be allowed -- otherwise incorrect or
duplicate work will be performed.

Fixes: 03d91511ec10a8 ("dm snapshot: add optional discard support features")
Reported-by: Nikos Tsironis <ntsironis@arrikto.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-snap.c