Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d5e404c1 authored by Alasdair G Kergon's avatar Alasdair G Kergon Committed by Linus Torvalds
Browse files

[PATCH] device-mapper snapshots: Handle origin extension



Handle writes to a snapshot-origin device that has been extended since the
snapshot was taken.

Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 93c534ae
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -931,6 +931,10 @@ static int __origin_write(struct list_head *snapshots, struct bio *bio)
		if (!snap->valid)
			continue;

		/* Nothing to do if writing beyond end of snapshot */
		if (bio->bi_sector >= dm_table_get_size(snap->table))
			continue;

		down_write(&snap->lock);

		/*
+1 −0
Original line number Diff line number Diff line
@@ -943,6 +943,7 @@ EXPORT_SYMBOL(dm_vcalloc);
EXPORT_SYMBOL(dm_get_device);
EXPORT_SYMBOL(dm_put_device);
EXPORT_SYMBOL(dm_table_event);
EXPORT_SYMBOL(dm_table_get_size);
EXPORT_SYMBOL(dm_table_get_mode);
EXPORT_SYMBOL(dm_table_put);
EXPORT_SYMBOL(dm_table_get);