[PATCH 3/4] Add dm_snap_origin function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add dm_snap_origin function

Add function dm_snap_origin, it will be used for checking chunk size against
origin sector size.

Signed-off-by: Mikulas Patocka <mpatocka@xxxxxxxxxx>

---
 drivers/md/dm-exception-store.h |    3 ++-
 drivers/md/dm-snap.c            |    6 ++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

Index: linux-2.6.34-rc1-devel/drivers/md/dm-exception-store.h
===================================================================
--- linux-2.6.34-rc1-devel.orig/drivers/md/dm-exception-store.h	2010-03-12 14:41:37.000000000 +0100
+++ linux-2.6.34-rc1-devel/drivers/md/dm-exception-store.h	2010-03-12 14:42:11.000000000 +0100
@@ -126,8 +126,9 @@ struct dm_exception_store {
 };
 
 /*
- * Obtain the cow device used by a given snapshot.
+ * Obtain the origin and cow device used by a given snapshot.
  */
+struct dm_dev *dm_snap_origin(struct dm_snapshot *snap);
 struct dm_dev *dm_snap_cow(struct dm_snapshot *snap);
 
 /*
Index: linux-2.6.34-rc1-devel/drivers/md/dm-snap.c
===================================================================
--- linux-2.6.34-rc1-devel.orig/drivers/md/dm-snap.c	2010-03-12 14:41:20.000000000 +0100
+++ linux-2.6.34-rc1-devel/drivers/md/dm-snap.c	2010-03-12 14:42:37.000000000 +0100
@@ -148,6 +148,12 @@ struct dm_snapshot {
 #define RUNNING_MERGE          0
 #define SHUTDOWN_MERGE         1
 
+struct dm_dev *dm_snap_origin(struct dm_snapshot *s)
+{
+	return s->origin;
+}
+EXPORT_SYMBOL(dm_snap_origin);
+
 struct dm_dev *dm_snap_cow(struct dm_snapshot *s)
 {
 	return s->cow;

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel

[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux