All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3/4] Add dm_snap_origin function
@ 2010-03-15  6:01 Mikulas Patocka
  2010-03-15 14:20 ` Mike Snitzer
  0 siblings, 1 reply; 2+ messages in thread
From: Mikulas Patocka @ 2010-03-15  6:01 UTC (permalink / raw)
  To: dm-devel; +Cc: Alasdair G Kergon

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@redhat.com>

---
 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;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 3/4] Add dm_snap_origin function
  2010-03-15  6:01 [PATCH 3/4] Add dm_snap_origin function Mikulas Patocka
@ 2010-03-15 14:20 ` Mike Snitzer
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Snitzer @ 2010-03-15 14:20 UTC (permalink / raw)
  To: device-mapper development; +Cc: Alasdair G Kergon

On Mon, Mar 15 2010 at  2:01am -0400,
Mikulas Patocka <mpatocka@redhat.com> wrote:

> 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@redhat.com>

Reviewed-by: Mike Snitzer <snitzer@redhat.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-03-15 14:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-15  6:01 [PATCH 3/4] Add dm_snap_origin function Mikulas Patocka
2010-03-15 14:20 ` Mike Snitzer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.