mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 14:42:37 +02:00
dm snapshot: flush disk cache when merging
commit 762a80d9fc upstream.
This patch makes dm-snapshot flush disk cache when writing metadata for
merging snapshot.
Without cache flushing the disk may reorder metadata write and other
data writes and there is a possibility of data corruption in case of
power fault.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
ee607aa21a
commit
b41ed9c38a
|
|
@ -753,7 +753,7 @@ static int persistent_commit_merge(struct dm_exception_store *store,
|
|||
for (i = 0; i < nr_merged; i++)
|
||||
clear_exception(ps, ps->current_committed - 1 - i);
|
||||
|
||||
r = area_io(ps, WRITE);
|
||||
r = area_io(ps, WRITE_FLUSH_FUA);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user