• A
    [PATCH] dm snapshot: fix kcopyd destructor · 138728dc
    Alasdair G Kergon 提交于
    Before removing a snapshot, wait for the completion of any kcopyd jobs using
    it.
    
    Do this by maintaining a count (nr_jobs) of how many outstanding jobs each
    kcopyd_client has.
    
    The snapshot destructor first unregisters the snapshot so that no new kcopyd
    jobs (created by writes to the origin) will reference that particular
    snapshot.  kcopyd_client_destroy() is now run next to wait for the completion
    of any outstanding jobs before the snapshot exception structures (that those
    jobs reference) are freed.
    Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
    Signed-off-by: NAndrew Morton <akpm@osdl.org>
    Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
    138728dc
dm-snap.c 27.6 KB