diff options
author | Alasdair G Kergon <agk@redhat.com> | 2005-07-12 18:53:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-12 19:19:11 -0400 |
commit | d5e404c10a98fc2979643476851e9cbdb1944812 (patch) | |
tree | 1d7d846b43a6a8a022e5cf4fd5453b27abf0de94 /drivers/md | |
parent | 93c534aefb906824d71ea779ed0c7f1573843f4e (diff) |
[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: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/dm-snap.c | 4 | ||||
-rw-r--r-- | drivers/md/dm-table.c | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c index 594d1f6b4789..ab54f99b7c3b 100644 --- a/drivers/md/dm-snap.c +++ b/drivers/md/dm-snap.c | |||
@@ -931,6 +931,10 @@ static int __origin_write(struct list_head *snapshots, struct bio *bio) | |||
931 | if (!snap->valid) | 931 | if (!snap->valid) |
932 | continue; | 932 | continue; |
933 | 933 | ||
934 | /* Nothing to do if writing beyond end of snapshot */ | ||
935 | if (bio->bi_sector >= dm_table_get_size(snap->table)) | ||
936 | continue; | ||
937 | |||
934 | down_write(&snap->lock); | 938 | down_write(&snap->lock); |
935 | 939 | ||
936 | /* | 940 | /* |
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c index 18e9b9953fcd..a5a4c0ed8a14 100644 --- a/drivers/md/dm-table.c +++ b/drivers/md/dm-table.c | |||
@@ -943,6 +943,7 @@ EXPORT_SYMBOL(dm_vcalloc); | |||
943 | EXPORT_SYMBOL(dm_get_device); | 943 | EXPORT_SYMBOL(dm_get_device); |
944 | EXPORT_SYMBOL(dm_put_device); | 944 | EXPORT_SYMBOL(dm_put_device); |
945 | EXPORT_SYMBOL(dm_table_event); | 945 | EXPORT_SYMBOL(dm_table_event); |
946 | EXPORT_SYMBOL(dm_table_get_size); | ||
946 | EXPORT_SYMBOL(dm_table_get_mode); | 947 | EXPORT_SYMBOL(dm_table_get_mode); |
947 | EXPORT_SYMBOL(dm_table_put); | 948 | EXPORT_SYMBOL(dm_table_put); |
948 | EXPORT_SYMBOL(dm_table_get); | 949 | EXPORT_SYMBOL(dm_table_get); |