===================================================================
@@ -32,6 +32,8 @@ struct dm_exception_store_type {
void (*dtr) (struct dm_exception_store *store);
int (*resume) (struct dm_exception_store *store);
+ void (*presuspend) (struct dm_exception_store *store);
+ void (*postsuspend) (struct dm_exception_store *store);
/*
* Find somewhere to store the next exception.
===================================================================
@@ -1001,6 +1001,22 @@ static void snapshot_resume(struct dm_ta
up_write(&s->lock);
}
+static void snapshot_presuspend(struct dm_target *ti)
+{
+ struct dm_snapshot *s = ti->private;
+
+ if(s->store->type->presuspend)
+ s->store->type->presuspend(s->store);
+}
+
+static void snapshot_postsuspend(struct dm_target *ti)
+{
+ struct dm_snapshot *s = ti->private;
+
+ if (s->store->type->postsuspend)
+ s->store->type->postsuspend(s->store);
+}
+
static int snapshot_status(struct dm_target *ti, status_type_t type,
char *result, unsigned int maxlen)
{
@@ -1280,6 +1296,8 @@ static struct target_type snapshot_targe
.map = snapshot_map,
.end_io = snapshot_end_io,
.resume = snapshot_resume,
+ .presuspend = snapshot_presuspend,
+ .postsuspend = snapshot_postsuspend,
.status = snapshot_status,
};