From: Daniel Phillips <phill...@google.com>

  +config DM_DDSNAP

---

Index: linux-2.6.29-rc2/drivers/md/dm.c
===================================================================
--- linux-2.6.29-rc2.orig/drivers/md/dm.c
+++ linux-2.6.29-rc2/drivers/md/dm.c
@@ -991,6 +991,15 @@ static int dm_any_congested(void *conges
        return r;
 }
 
+unsigned dm_inflight_total(struct dm_target *target)
+{
+       struct mapped_device *md = dm_table_get_md(target->table);
+       int inflight = dm_disk(md)->in_flight;
+       dm_put(md);
+       return inflight;
+}
+EXPORT_SYMBOL_GPL(dm_inflight_total);
+
 /*-----------------------------------------------------------------
  * An IDR is used to keep track of allocated minor numbers.
  *---------------------------------------------------------------*/
@@ -1621,6 +1630,7 @@ out_unlock:
        mutex_unlock(&md->suspend_lock);
        return r;
 }
+EXPORT_SYMBOL_GPL(dm_suspend);
 
 int dm_resume(struct mapped_device *md)
 {
@@ -1730,6 +1740,7 @@ int dm_suspended(struct mapped_device *m
 {
        return test_bit(DMF_SUSPENDED, &md->flags);
 }
+EXPORT_SYMBOL_GPL(dm_suspended);
 
 int dm_noflush_suspending(struct dm_target *ti)
 {
Index: linux-2.6.29-rc2/drivers/md/dm-ioctl.c
===================================================================
--- linux-2.6.29-rc2.orig/drivers/md/dm-ioctl.c
+++ linux-2.6.29-rc2/drivers/md/dm-ioctl.c
@@ -1559,3 +1559,4 @@ out:
 
        return r;
 }
+EXPORT_SYMBOL_GPL(dm_copy_name_and_uuid);
Index: linux-2.6.29-rc2/drivers/md/Kconfig
===================================================================
--- linux-2.6.29-rc2.orig/drivers/md/Kconfig
+++ linux-2.6.29-rc2/drivers/md/Kconfig
@@ -289,4 +289,13 @@ config DM_UEVENT
        ---help---
        Generate udev events for DM events.
 
+config DM_DDSNAP
+       tristate "Distributed Data Snapshot target (EXPERIMENTAL)"
+       depends on BLK_DEV_DM && EXPERIMENTAL
+       ---help---
+         This device-mapper target allows you to take multiple simultaneous
+         read/write snapshots of a clustered or non-clustered block devices.
+         If unsure, say N.
+
+
 endif # MD
Index: linux-2.6.29-rc2/drivers/md/Makefile
===================================================================
--- linux-2.6.29-rc2.orig/drivers/md/Makefile
+++ linux-2.6.29-rc2/drivers/md/Makefile
@@ -37,6 +37,7 @@ obj-$(CONFIG_DM_MULTIPATH)    += dm-multipa
 obj-$(CONFIG_DM_SNAPSHOT)      += dm-snapshot.o
 obj-$(CONFIG_DM_MIRROR)                += dm-mirror.o dm-log.o dm-region-hash.o
 obj-$(CONFIG_DM_ZERO)          += dm-zero.o
+obj-$(CONFIG_DM_DDSNAP)                += dm-ddsnap.o
 
 quiet_cmd_unroll = UNROLL  $@
       cmd_unroll = $(PERL) $(srctree)/$(src)/unroll.pl $(UNROLL) \
Index: linux-2.6.29-rc2/include/linux/device-mapper.h
===================================================================
--- linux-2.6.29-rc2.orig/include/linux/device-mapper.h
+++ linux-2.6.29-rc2/include/linux/device-mapper.h
@@ -227,6 +227,7 @@ int dm_copy_name_and_uuid(struct mapped_
 struct gendisk *dm_disk(struct mapped_device *md);
 int dm_suspended(struct mapped_device *md);
 int dm_noflush_suspending(struct dm_target *ti);
+unsigned dm_inflight_total(struct dm_target *target);
 union map_info *dm_get_mapinfo(struct bio *bio);
 
 /*
Index: linux-2.6.29-rc2/include/linux/prctl.h
===================================================================
--- linux-2.6.29-rc2.orig/include/linux/prctl.h
+++ linux-2.6.29-rc2/include/linux/prctl.h
@@ -85,4 +85,8 @@
 #define PR_SET_TIMERSLACK 29
 #define PR_GET_TIMERSLACK 30
 
+/* set process less throttleL: see PF_LESS_THROTTLE */
+#define PR_SET_LESS_THROTTLE 25
+#define PR_SET_MEMALLOC 26
+
 #endif /* _LINUX_PRCTL_H */
Index: linux-2.6.29-rc2/kernel/sys.c
===================================================================
--- linux-2.6.29-rc2.orig/kernel/sys.c
+++ linux-2.6.29-rc2/kernel/sys.c
@@ -1671,7 +1671,16 @@ static void k_getrusage(struct task_stru
                                t = next_thread(t);
                        } while (t != p);
                        break;
-
+               case PR_SET_LESS_THROTTLE: {
+                       current->flags |= PF_LESS_THROTTLE;
+                       return 0;
+               }
+                       
+               case PR_SET_MEMALLOC: {
+                       current->flags |= PF_MEMALLOC;
+                       printk("set PF_MEMALLOC for process %s[%i]\n", 
current->comm, current->pid);
+                       return 0;
+               }
                default:
                        BUG();
        }

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Zumastor" group.
To post to this group, send email to zumastor@googlegroups.com
To unsubscribe from this group, send email to 
zumastor+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/zumastor?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to