From aa14edeb994f8f7e223d02ad14780bf2fa719f6d Mon Sep 17 00:00:00 2001 From: Alasdair G Kergon Date: Wed, 1 Feb 2006 03:04:50 -0800 Subject: [PATCH] device-mapper snapshot: load metadata on creation Move snapshot metadata loading to happen when the table is created instead of when the device is resumed. Writes to the origin device don't trigger exceptions until each snapshot table becomes active when resume() is called on each snapshot. If you're using lvm2, for this patch to work properly you should update to lvm2 version 2.02.01 or later and device-mapper version 1.02.02 or later. Signed-off-by: Alasdair G Kergon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/md/dm-snap.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'drivers/md/dm-snap.h') diff --git a/drivers/md/dm-snap.h b/drivers/md/dm-snap.h index 375aa24d4d7d..fdec1e2dc871 100644 --- a/drivers/md/dm-snap.h +++ b/drivers/md/dm-snap.h @@ -99,7 +99,9 @@ struct dm_snapshot { /* You can't use a snapshot if this is 0 (e.g. if full) */ int valid; - int have_metadata; + + /* Origin writes don't trigger exceptions until this is set */ + int active; /* Used for display of table */ char type; -- cgit v1.2.3