dm exception store: move chunk_fields

Previous thread: dm exception store: introduce registry by Linux Kernel Mailing List on Friday, April 3, 2009 - 11:08 am. (1 message)

Next thread: dm snapshot: remove dm_snap header use by Linux Kernel Mailing List on Friday, April 3, 2009 - 11:08 am. (1 message)
From: Linux Kernel Mailing List
Date: Friday, April 3, 2009 - 11:08 am

Gitweb:     http://git.kernel.org/linus/d0216849519bec8dc96301a3cd80316e71243839
Commit:     d0216849519bec8dc96301a3cd80316e71243839
Parent:     0cea9c78270cdf1d2ad74ce0e083d5555a0842e8
Author:     Jonathan Brassow <jbrassow@redhat.com>
AuthorDate: Thu Apr 2 19:55:32 2009 +0100
Committer:  Alasdair G Kergon <agk@redhat.com>
CommitDate: Thu Apr 2 19:55:32 2009 +0100

    dm exception store: move chunk_fields
    
    Move chunk fields from snapshot to exception store.
    
    Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
    Signed-off-by: Alasdair G Kergon <agk@redhat.com>
---
 drivers/md/dm-exception-store.c |    6 +++++
 drivers/md/dm-exception-store.h |    7 +++++
 drivers/md/dm-snap-persistent.c |   47 ++++++++++++++++++++-------------------
 drivers/md/dm-snap-transient.c  |    4 +-
 drivers/md/dm-snap.c            |   47 +++++++++++++++++++++-----------------
 drivers/md/dm-snap.h            |    9 +-----
 6 files changed, 67 insertions(+), 53 deletions(-)

diff --git a/drivers/md/dm-exception-store.c b/drivers/md/dm-exception-store.c
index fe0cfa6..59c949b 100644
--- a/drivers/md/dm-exception-store.c
+++ b/drivers/md/dm-exception-store.c
@@ -138,6 +138,8 @@ int dm_exception_store_type_unregister(struct dm_exception_store_type *type)
 EXPORT_SYMBOL(dm_exception_store_type_unregister);
 
 int dm_exception_store_create(const char *type_name, struct dm_target *ti,
+			      chunk_t chunk_size, chunk_t chunk_mask,
+			      chunk_t chunk_shift,
 			      struct dm_exception_store **store)
 {
 	int r = 0;
@@ -157,6 +159,10 @@ int dm_exception_store_create(const char *type_name, struct dm_target *ti,
 	tmp_store->type = type;
 	tmp_store->ti = ti;
 
+	tmp_store->chunk_size = chunk_size;
+	tmp_store->chunk_mask = chunk_mask;
+	tmp_store->chunk_shift = chunk_shift;
+
 	r = type->ctr(tmp_store, 0, NULL);
 	if (r) {
 		put_type(type);
diff --git a/drivers/md/dm-exception-store.h b/drivers/md/dm-exception-store.h
index 4b7f7d4..449a1e4 100644
--- ...
Previous thread: dm exception store: introduce registry by Linux Kernel Mailing List on Friday, April 3, 2009 - 11:08 am. (1 message)

Next thread: dm snapshot: remove dm_snap header use by Linux Kernel Mailing List on Friday, April 3, 2009 - 11:08 am. (1 message)