]> git.baikalelectronics.ru Git - kernel.git/commit
dm cache policy smq: handle races with queuing background_work
authorJoe Thornber <ejt@redhat.com>
Wed, 8 Nov 2017 10:56:11 +0000 (05:56 -0500)
committerMike Snitzer <snitzer@redhat.com>
Fri, 10 Nov 2017 20:45:01 +0000 (15:45 -0500)
commitcdf75de6da5ed4431973309ee9708ca456cfeb6d
tree8cac372c0bc3793760bda1f6f54e612974042217
parent50b439041b5eee54ae5665b0941f59fb09112f1b
dm cache policy smq: handle races with queuing background_work

The background_tracker holds a set of promotions/demotions that the
cache policy wishes the core target to implement.

When adding a new operation to the tracker it's possible that an
operation on the same block is already present (but in practise this
doesn't appear to be happening).  Catch these situations and do the
appropriate cleanup.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-cache-policy-smq.c