]> sourceware.org Git - dm.git/commitdiff
Bring combined patches into line. rel1_00_03
authorAlasdair Kergon <agk@redhat.com>
Wed, 20 Aug 2003 14:09:33 +0000 (14:09 +0000)
committerAlasdair Kergon <agk@redhat.com>
Wed, 20 Aug 2003 14:09:33 +0000 (14:09 +0000)
VERSION
patches/common/linux-2.4.20-arch64.patch
patches/linux-2.4.20-devmapper-ioctl.patch
patches/linux-2.4.21-devmapper-ioctl.patch

diff --git a/VERSION b/VERSION
index 12ea96b6692ca1fe0b6f03c3d3ae7ad0cb02ca59..a0fb25f0d65a5bc164295f59ebb2b8252c2bf3db 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.00.02-cvs (2003-07-12)
+1.00.03-cvs (2003-08-19)
index 557a4a1c0a7e0feac795da302b60a19ee59e5ae2..341561a823863b21c76ed4eb0ba00c6a1bc16675 100644 (file)
@@ -9,7 +9,7 @@ diff -ruN linux-2.4.20/arch/mips64/kernel/ioctl32.c linux/arch/mips64/kernel/ioc
  
  #include <scsi/scsi.h>
  #undef __KERNEL__             /* This file was born to be ugly ...  */
-@@ -914,6 +915,21 @@
+@@ -914,6 +915,22 @@
        IOCTL32_DEFAULT(STOP_ARRAY_RO),
        IOCTL32_DEFAULT(RESTART_ARRAY_RW),
  #endif /* CONFIG_MD */
@@ -26,6 +26,7 @@ diff -ruN linux-2.4.20/arch/mips64/kernel/ioctl32.c linux/arch/mips64/kernel/ioc
 +      IOCTL32_DEFAULT(DM_DEV_STATUS),
 +      IOCTL32_DEFAULT(DM_TABLE_STATUS),
 +      IOCTL32_DEFAULT(DM_DEV_WAIT),
++      IOCTL32_DEFAULT(DM_LIST_DEVICES),
 +      IOCTL32_DEFAULT(DM_TABLE_CLEAR),
 +#endif /* CONFIG_BLK_DEV_DM */
  
@@ -42,7 +43,7 @@ diff -ruN linux-2.4.20/arch/parisc/kernel/ioctl32.c linux/arch/parisc/kernel/ioc
  
  #include <scsi/scsi.h>
  /* Ugly hack. */
-@@ -3415,6 +3416,21 @@
+@@ -3415,6 +3416,22 @@
  COMPATIBLE_IOCTL(LV_BMAP)
  COMPATIBLE_IOCTL(LV_SNAPSHOT_USE_RATE)
  #endif /* LVM */
@@ -59,6 +60,7 @@ diff -ruN linux-2.4.20/arch/parisc/kernel/ioctl32.c linux/arch/parisc/kernel/ioc
 +COMPATIBLE_IOCTL(DM_DEV_STATUS)
 +COMPATIBLE_IOCTL(DM_TABLE_STATUS)
 +COMPATIBLE_IOCTL(DM_DEV_WAIT)
++COMPATIBLE_IOCTL(DM_LIST_DEVICES)
 +COMPATIBLE_IOCTL(DM_TABLE_CLEAR)
 +#endif /* CONFIG_BLK_DEV_DM */
  #if defined(CONFIG_DRM) || defined(CONFIG_DRM_MODULE)
@@ -75,7 +77,7 @@ diff -ruN linux-2.4.20/arch/ppc64/kernel/ioctl32.c linux/arch/ppc64/kernel/ioctl
  
  #include <scsi/scsi.h>
  /* Ugly hack. */
-@@ -4362,6 +4363,21 @@
+@@ -4362,6 +4363,22 @@
  COMPATIBLE_IOCTL(NBD_PRINT_DEBUG),
  COMPATIBLE_IOCTL(NBD_SET_SIZE_BLOCKS),
  COMPATIBLE_IOCTL(NBD_DISCONNECT),
@@ -92,6 +94,7 @@ diff -ruN linux-2.4.20/arch/ppc64/kernel/ioctl32.c linux/arch/ppc64/kernel/ioctl
 +COMPATIBLE_IOCTL(DM_DEV_STATUS),
 +COMPATIBLE_IOCTL(DM_TABLE_STATUS),
 +COMPATIBLE_IOCTL(DM_DEV_WAIT),
++COMPATIBLE_IOCTL(DM_LIST_DEVICES),
 +COMPATIBLE_IOCTL(DM_TABLE_CLEAR),
 +#endif /* CONFIG_BLK_DEV_DM */
  /* Remove *PRIVATE in 2.5 */
@@ -108,7 +111,7 @@ diff -ruN linux-2.4.20/arch/s390x/kernel/ioctl32.c linux/arch/s390x/kernel/ioctl
  #include <asm/types.h>
  #include <asm/uaccess.h>
  #include <asm/dasd.h>
-@@ -507,6 +508,19 @@
+@@ -507,6 +508,20 @@
        IOCTL32_DEFAULT(VT_UNLOCKSWITCH),
  
        IOCTL32_DEFAULT(SIOCGSTAMP),
@@ -124,6 +127,7 @@ diff -ruN linux-2.4.20/arch/s390x/kernel/ioctl32.c linux/arch/s390x/kernel/ioctl
 +      IOCTL32_DEFAULT(DM_DEV_STATUS),
 +      IOCTL32_DEFAULT(DM_TABLE_STATUS),
 +      IOCTL32_DEFAULT(DM_DEV_WAIT),
++      IOCTL32_DEFAULT(DM_LIST_DEVICES),
 +      IOCTL32_DEFAULT(DM_TABLE_CLEAR),
  
        IOCTL32_HANDLER(SIOCGIFNAME, dev_ifname32),
@@ -139,7 +143,7 @@ diff -ruN linux-2.4.20/arch/sparc64/kernel/ioctl32.c linux/arch/sparc64/kernel/i
  
  #include <scsi/scsi.h>
  /* Ugly hack. */
-@@ -5023,6 +5024,22 @@
+@@ -5023,6 +5024,23 @@
  COMPATIBLE_IOCTL(NBD_PRINT_DEBUG)
  COMPATIBLE_IOCTL(NBD_SET_SIZE_BLOCKS)
  COMPATIBLE_IOCTL(NBD_DISCONNECT)
@@ -156,6 +160,7 @@ diff -ruN linux-2.4.20/arch/sparc64/kernel/ioctl32.c linux/arch/sparc64/kernel/i
 +COMPATIBLE_IOCTL(DM_DEV_STATUS)
 +COMPATIBLE_IOCTL(DM_TABLE_STATUS)
 +COMPATIBLE_IOCTL(DM_DEV_WAIT)
++COMPATIBLE_IOCTL(DM_LIST_DEVICES)
 +COMPATIBLE_IOCTL(DM_TABLE_CLEAR)
 +#endif /* CONFIG_BLK_DEV_DM */
 +
@@ -173,7 +178,7 @@ diff -ruN linux-2.4.20/arch/x86_64/ia32/ia32_ioctl.c linux/arch/x86_64/ia32/ia32
  
  #include <scsi/scsi.h>
  /* Ugly hack. */
-@@ -3776,6 +3777,21 @@
+@@ -3776,6 +3777,22 @@
  COMPATIBLE_IOCTL(LV_BMAP)
  COMPATIBLE_IOCTL(LV_SNAPSHOT_USE_RATE)
  #endif /* LVM */
@@ -190,6 +195,7 @@ diff -ruN linux-2.4.20/arch/x86_64/ia32/ia32_ioctl.c linux/arch/x86_64/ia32/ia32
 +COMPATIBLE_IOCTL(DM_DEV_STATUS)
 +COMPATIBLE_IOCTL(DM_TABLE_STATUS)
 +COMPATIBLE_IOCTL(DM_DEV_WAIT)
++COMPATIBLE_IOCTL(DM_LIST_DEVICES)
 +COMPATIBLE_IOCTL(DM_TABLE_CLEAR)
 +#endif /* CONFIG_BLK_DEV_DM */
  #if defined(CONFIG_DRM) || defined(CONFIG_DRM_MODULE)
index 71cba0726d9edc72b4cf7036a6224050220105db..c9294a55e2a1a771458fbb80083da756adc4c3f1 100644 (file)
@@ -1,5 +1,5 @@
 --- linux-2.4.20/Documentation/Configure.help  Fri Jan 10 16:33:55 2003
-+++ linux/Documentation/Configure.help Sat Jul 12 18:13:15 2003
++++ linux/Documentation/Configure.help Wed Aug 20 14:54:31 2003
 @@ -1822,6 +1822,20 @@
    want), say M here and read <file:Documentation/modules.txt>.  The
    module will be called lvm-mod.o.
@@ -22,7 +22,7 @@
  CONFIG_MD
    Support multiple physical spindles through a single logical device.
 --- linux-2.4.20/MAINTAINERS   Fri Jan 10 16:33:49 2003
-+++ linux/MAINTAINERS  Sat Jul 12 18:13:15 2003
++++ linux/MAINTAINERS  Wed Aug 20 14:54:30 2003
 @@ -439,6 +439,13 @@
  W:    http://www.debian.org/~dz/i8k/
  S:    Maintained
@@ -38,7 +38,7 @@
  P:    H. Peter Anvin
  M:    hpa@zytor.com
 --- linux-2.4.20/arch/mips64/kernel/ioctl32.c  Fri Jan 10 16:34:18 2003
-+++ linux/arch/mips64/kernel/ioctl32.c Sat Jul 12 18:13:05 2003
++++ linux/arch/mips64/kernel/ioctl32.c Wed Aug 20 15:06:12 2003
 @@ -33,6 +33,7 @@
  #include <linux/auto_fs.h>
  #include <linux/ext2_fs.h>
@@ -47,7 +47,7 @@
  
  #include <scsi/scsi.h>
  #undef __KERNEL__             /* This file was born to be ugly ...  */
-@@ -914,6 +915,21 @@
+@@ -914,6 +915,22 @@
        IOCTL32_DEFAULT(STOP_ARRAY_RO),
        IOCTL32_DEFAULT(RESTART_ARRAY_RW),
  #endif /* CONFIG_MD */
 +      IOCTL32_DEFAULT(DM_DEV_STATUS),
 +      IOCTL32_DEFAULT(DM_TABLE_STATUS),
 +      IOCTL32_DEFAULT(DM_DEV_WAIT),
++      IOCTL32_DEFAULT(DM_LIST_DEVICES),
 +      IOCTL32_DEFAULT(DM_TABLE_CLEAR),
 +#endif /* CONFIG_BLK_DEV_DM */
  
        IOCTL32_DEFAULT(MTIOCTOP),                      /* mtio.h ioctls  */
        IOCTL32_HANDLER(MTIOCGET32, mt_ioctl_trans),
 --- linux-2.4.20/arch/parisc/kernel/ioctl32.c  Fri Jan 10 16:34:19 2003
-+++ linux/arch/parisc/kernel/ioctl32.c Sat Jul 12 18:13:05 2003
++++ linux/arch/parisc/kernel/ioctl32.c Wed Aug 20 15:06:12 2003
 @@ -55,6 +55,7 @@
  #define max max */
  #include <linux/lvm.h>
@@ -79,7 +80,7 @@
  
  #include <scsi/scsi.h>
  /* Ugly hack. */
-@@ -3415,6 +3416,21 @@
+@@ -3415,6 +3416,22 @@
  COMPATIBLE_IOCTL(LV_BMAP)
  COMPATIBLE_IOCTL(LV_SNAPSHOT_USE_RATE)
  #endif /* LVM */
 +COMPATIBLE_IOCTL(DM_DEV_STATUS)
 +COMPATIBLE_IOCTL(DM_TABLE_STATUS)
 +COMPATIBLE_IOCTL(DM_DEV_WAIT)
++COMPATIBLE_IOCTL(DM_LIST_DEVICES)
 +COMPATIBLE_IOCTL(DM_TABLE_CLEAR)
 +#endif /* CONFIG_BLK_DEV_DM */
  #if defined(CONFIG_DRM) || defined(CONFIG_DRM_MODULE)
  COMPATIBLE_IOCTL(DRM_IOCTL_GET_MAGIC)
  COMPATIBLE_IOCTL(DRM_IOCTL_IRQ_BUSID)
 --- linux-2.4.20/arch/ppc64/kernel/ioctl32.c   Fri Jan 10 16:34:24 2003
-+++ linux/arch/ppc64/kernel/ioctl32.c  Sat Jul 12 18:13:05 2003
++++ linux/arch/ppc64/kernel/ioctl32.c  Wed Aug 20 15:06:12 2003
 @@ -66,6 +66,7 @@
  #if defined(CONFIG_BLK_DEV_LVM) || defined(CONFIG_BLK_DEV_LVM_MODULE)
  #include <linux/lvm.h>
  
  #include <scsi/scsi.h>
  /* Ugly hack. */
-@@ -4362,6 +4363,21 @@
+@@ -4362,6 +4363,22 @@
  COMPATIBLE_IOCTL(NBD_PRINT_DEBUG),
  COMPATIBLE_IOCTL(NBD_SET_SIZE_BLOCKS),
  COMPATIBLE_IOCTL(NBD_DISCONNECT),
 +COMPATIBLE_IOCTL(DM_DEV_STATUS),
 +COMPATIBLE_IOCTL(DM_TABLE_STATUS),
 +COMPATIBLE_IOCTL(DM_DEV_WAIT),
++COMPATIBLE_IOCTL(DM_LIST_DEVICES),
 +COMPATIBLE_IOCTL(DM_TABLE_CLEAR),
 +#endif /* CONFIG_BLK_DEV_DM */
  /* Remove *PRIVATE in 2.5 */
  COMPATIBLE_IOCTL(SIOCDEVPRIVATE),
  COMPATIBLE_IOCTL(SIOCDEVPRIVATE+1),
 --- linux-2.4.20/arch/s390x/kernel/ioctl32.c   Fri Jan 10 16:34:26 2003
-+++ linux/arch/s390x/kernel/ioctl32.c  Sat Jul 12 18:13:05 2003
++++ linux/arch/s390x/kernel/ioctl32.c  Wed Aug 20 15:06:12 2003
 @@ -25,6 +25,7 @@
  #include <linux/ext2_fs.h>
  #include <linux/hdreg.h>
  #include <asm/types.h>
  #include <asm/uaccess.h>
  #include <asm/dasd.h>
-@@ -507,6 +508,19 @@
+@@ -507,6 +508,20 @@
        IOCTL32_DEFAULT(VT_UNLOCKSWITCH),
  
        IOCTL32_DEFAULT(SIOCGSTAMP),
 +      IOCTL32_DEFAULT(DM_DEV_STATUS),
 +      IOCTL32_DEFAULT(DM_TABLE_STATUS),
 +      IOCTL32_DEFAULT(DM_DEV_WAIT),
++      IOCTL32_DEFAULT(DM_LIST_DEVICES),
 +      IOCTL32_DEFAULT(DM_TABLE_CLEAR),
  
        IOCTL32_HANDLER(SIOCGIFNAME, dev_ifname32),
        IOCTL32_HANDLER(SIOCGIFCONF, dev_ifconf),
 --- linux-2.4.20/arch/sparc64/kernel/ioctl32.c Fri Jan 10 16:34:30 2003
-+++ linux/arch/sparc64/kernel/ioctl32.c        Sat Jul 12 18:13:05 2003
++++ linux/arch/sparc64/kernel/ioctl32.c        Wed Aug 20 15:06:12 2003
 @@ -55,6 +55,7 @@
  #if defined(CONFIG_BLK_DEV_LVM) || defined(CONFIG_BLK_DEV_LVM_MODULE)
  #include <linux/lvm.h>
  
  #include <scsi/scsi.h>
  /* Ugly hack. */
-@@ -5023,6 +5024,22 @@
+@@ -5023,6 +5024,23 @@
  COMPATIBLE_IOCTL(NBD_PRINT_DEBUG)
  COMPATIBLE_IOCTL(NBD_SET_SIZE_BLOCKS)
  COMPATIBLE_IOCTL(NBD_DISCONNECT)
 +COMPATIBLE_IOCTL(DM_DEV_STATUS)
 +COMPATIBLE_IOCTL(DM_TABLE_STATUS)
 +COMPATIBLE_IOCTL(DM_DEV_WAIT)
++COMPATIBLE_IOCTL(DM_LIST_DEVICES)
 +COMPATIBLE_IOCTL(DM_TABLE_CLEAR)
 +#endif /* CONFIG_BLK_DEV_DM */
 +
  HANDLE_IOCTL(MEMREADOOB32, mtd_rw_oob)
  HANDLE_IOCTL(MEMWRITEOOB32, mtd_rw_oob)
 --- linux-2.4.20/arch/x86_64/ia32/ia32_ioctl.c Fri Jan 10 16:34:32 2003
-+++ linux/arch/x86_64/ia32/ia32_ioctl.c        Sat Jul 12 18:13:05 2003
++++ linux/arch/x86_64/ia32/ia32_ioctl.c        Wed Aug 20 15:06:12 2003
 @@ -62,6 +62,7 @@
  #define max max
  #include <linux/lvm.h>
  
  #include <scsi/scsi.h>
  /* Ugly hack. */
-@@ -3776,6 +3777,21 @@
+@@ -3776,6 +3777,22 @@
  COMPATIBLE_IOCTL(LV_BMAP)
  COMPATIBLE_IOCTL(LV_SNAPSHOT_USE_RATE)
  #endif /* LVM */
 +COMPATIBLE_IOCTL(DM_DEV_STATUS)
 +COMPATIBLE_IOCTL(DM_TABLE_STATUS)
 +COMPATIBLE_IOCTL(DM_DEV_WAIT)
++COMPATIBLE_IOCTL(DM_LIST_DEVICES)
 +COMPATIBLE_IOCTL(DM_TABLE_CLEAR)
 +#endif /* CONFIG_BLK_DEV_DM */
  #if defined(CONFIG_DRM) || defined(CONFIG_DRM_MODULE)
  COMPATIBLE_IOCTL(DRM_IOCTL_GET_MAGIC)
  COMPATIBLE_IOCTL(DRM_IOCTL_IRQ_BUSID)
 --- linux-2.4.20/drivers/md/Config.in  Fri Jan 10 16:34:50 2003
-+++ linux/drivers/md/Config.in Sat Jul 12 18:13:15 2003
-@@ -14,5 +14,9 @@
++++ linux/drivers/md/Config.in Wed Aug 20 14:54:30 2003
+@@ -14,5 +14,7 @@
  dep_tristate '  Multipath I/O support' CONFIG_MD_MULTIPATH $CONFIG_BLK_DEV_MD
  
  dep_tristate ' Logical volume manager (LVM) support' CONFIG_BLK_DEV_LVM $CONFIG_MD
-+if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-+   dep_tristate ' Device-mapper support (EXPERIMENTAL)' CONFIG_BLK_DEV_DM $CONFIG_MD
-+   dep_tristate '  Mirror (RAID-1) support (EXPERIMENTAL)' CONFIG_BLK_DEV_DM_MIRROR $CONFIG_BLK_DEV_DM
-+fi
++dep_tristate ' Device-mapper support' CONFIG_BLK_DEV_DM $CONFIG_MD
++dep_tristate '  Mirror (RAID-1) support' CONFIG_BLK_DEV_DM_MIRROR $CONFIG_BLK_DEV_DM
  
  endmenu
 --- linux-2.4.20/drivers/md/Makefile   Fri Jan 10 16:34:50 2003
-+++ linux/drivers/md/Makefile  Sat Jul 12 18:13:25 2003
++++ linux/drivers/md/Makefile  Wed Aug 20 14:54:39 2003
 @@ -4,24 +4,41 @@
  
  O_TARGET      := mddev.o
 +      $(LD) -r -o $@ $(dm-mirror-mod-objs)
 +
 --- linux-2.4.20/drivers/md/dm-daemon.c        Thu Jan  1 01:00:00 1970
-+++ linux/drivers/md/dm-daemon.c       Sat Jul 12 18:13:20 2003
++++ linux/drivers/md/dm-daemon.c       Wed Aug 20 14:54:35 2003
 @@ -0,0 +1,113 @@
 +/*
 + * Copyright (C) 2003 Sistina Software
 +      down(&dd->start_lock);
 +      pid = kernel_thread(daemon, dd, 0);
 +      if (pid <= 0) {
-+              DMERR("Failed to start kcopyd thread");
++              DMERR("Failed to start %s thread", name);
 +              return -EAGAIN;
 +      }
 +
 +EXPORT_SYMBOL(dm_daemon_stop);
 +EXPORT_SYMBOL(dm_daemon_wake);
 --- linux-2.4.20/drivers/md/dm-daemon.h        Thu Jan  1 01:00:00 1970
-+++ linux/drivers/md/dm-daemon.h       Sat Jul 12 18:13:20 2003
++++ linux/drivers/md/dm-daemon.h       Wed Aug 20 14:54:35 2003
 @@ -0,0 +1,29 @@
 +/*
 + * Copyright (C) 2003 Sistina Software
 +
 +#endif
 --- linux-2.4.20/drivers/md/dm-exception-store.c       Thu Jan  1 01:00:00 1970
-+++ linux/drivers/md/dm-exception-store.c      Sat Jul 12 18:13:20 2003
-@@ -0,0 +1,675 @@
++++ linux/drivers/md/dm-exception-store.c      Wed Aug 20 14:54:35 2003
+@@ -0,0 +1,673 @@
 +/*
 + * dm-snapshot.c
 + *
 +              r = insert_exceptions(ps, &full);
 +              if (r)
 +                      return r;
-+
-+              area++;
 +      }
 +
 +      return 0;
 +      return 0;
 +}
 --- linux-2.4.20/drivers/md/dm-io.c    Thu Jan  1 01:00:00 1970
-+++ linux/drivers/md/dm-io.c   Sat Jul 12 18:13:20 2003
++++ linux/drivers/md/dm-io.c   Wed Aug 20 14:54:35 2003
 @@ -0,0 +1,344 @@
 +/*
 + * Copyright (C) 2003 Sistina Software
 +EXPORT_SYMBOL(dm_io_sync);
 +EXPORT_SYMBOL(dm_io_async);
 --- linux-2.4.20/drivers/md/dm-io.h    Thu Jan  1 01:00:00 1970
-+++ linux/drivers/md/dm-io.h   Sat Jul 12 18:13:20 2003
++++ linux/drivers/md/dm-io.h   Wed Aug 20 14:54:35 2003
 @@ -0,0 +1,86 @@
 +/*
 + * Copyright (C) 2003 Sistina Software
 +
 +#endif
 --- linux-2.4.20/drivers/md/dm-ioctl.c Thu Jan  1 01:00:00 1970
-+++ linux/drivers/md/dm-ioctl.c        Sat Jul 12 18:13:20 2003
-@@ -0,0 +1,1272 @@
++++ linux/drivers/md/dm-ioctl.c        Wed Aug 20 14:54:35 2003
+@@ -0,0 +1,1284 @@
 +/*
 + * Copyright (C) 2001, 2002 Sistina Software (UK) Limited.
 + *
 +      return dm_hash_rename(param->name, new_name);
 +}
 +
-+static int suspend(struct dm_ioctl *param)
++static int do_suspend(struct dm_ioctl *param)
 +{
 +      int r = 0;
 +      struct mapped_device *md;
 +      return r;
 +}
 +
-+static int resume(struct dm_ioctl *param)
++static int do_resume(struct dm_ioctl *param)
 +{
 +      int r = 0;
 +      struct hash_cell *hc;
 +static int dev_suspend(struct dm_ioctl *param, size_t param_size)
 +{
 +      if (param->flags & DM_SUSPEND_FLAG)
-+              return suspend(param);
++              return do_suspend(param);
 +
-+      return resume(param);
++      return do_resume(param);
 +}
 +
 +/*
 +      return r;
 +}
 +
-+/*
-+ * Wait for a device to report an event
-+ */
-+static int dev_wait(struct dm_ioctl *param, size_t param_size)
-+{
-+      int r;
-+      struct mapped_device *md;
-+      DECLARE_WAITQUEUE(wq, current);
-+
-+      md = find_device(param);
-+      if (!md)
-+              return -ENXIO;
-+
-+      /*
-+       * Wait for a notification event
-+       */
-+      set_current_state(TASK_INTERRUPTIBLE);
-+      if (!dm_add_wait_queue(md, &wq, param->event_nr)) {
-+              schedule();
-+              dm_remove_wait_queue(md, &wq);
-+      }
-+      set_current_state(TASK_RUNNING);
-+
-+      /*
-+       * The userland program is going to want to know what
-+       * changed to trigger the event, so we may as well tell
-+       * him and save an ioctl.
-+       */
-+      r = __dev_status(md, param);
-+
-+      dm_put(md);
-+      return r;
-+}
-+
 +static inline int get_mode(struct dm_ioctl *param)
 +{
 +      int mode = FMODE_READ | FMODE_WRITE;
 +              return -ENXIO;
 +      }
 +
++      if (hc->new_map)
++              dm_table_put(hc->new_map);
 +      hc->new_map = t;
 +      param->flags |= DM_INACTIVE_PRESENT_FLAG;
 +
 +      return r;
 +}
 +
++/*
++ * Wait for a device to report an event
++ */
++static int dev_wait(struct dm_ioctl *param, size_t param_size)
++{
++      int r;
++      struct mapped_device *md;
++      struct dm_table *table;
++      DECLARE_WAITQUEUE(wq, current);
++
++      md = find_device(param);
++      if (!md)
++              return -ENXIO;
++
++      /*
++       * Wait for a notification event
++       */
++      set_current_state(TASK_INTERRUPTIBLE);
++      if (!dm_add_wait_queue(md, &wq, param->event_nr)) {
++              schedule();
++              dm_remove_wait_queue(md, &wq);
++      }
++      set_current_state(TASK_RUNNING);
++
++      /*
++       * The userland program is going to want to know what
++       * changed to trigger the event, so we may as well tell
++       * him and save an ioctl.
++       */
++      r = __dev_status(md, param);
++      if (r)
++              goto out;
++
++      table = dm_get_table(md);
++      if (table) {
++              retrieve_status(table, param, param_size);
++              dm_table_put(table);
++      }
++
++ out:
++      dm_put(md);
++      return r;
++}
++
 +/*-----------------------------------------------------------------
 + * Implementation of open/close/ioctl on the special char
 + * device.
 +      dm_hash_exit();
 +}
 --- linux-2.4.20/drivers/md/dm-linear.c        Thu Jan  1 01:00:00 1970
-+++ linux/drivers/md/dm-linear.c       Sat Jul 12 18:13:20 2003
++++ linux/drivers/md/dm-linear.c       Wed Aug 20 14:54:35 2003
 @@ -0,0 +1,123 @@
 +/*
 + * Copyright (C) 2001 Sistina Software (UK) Limited.
 +      struct linear_c *lc;
 +
 +      if (argc != 2) {
-+              ti->error = "dm-linear: Not enough arguments";
++              ti->error = "dm-linear: Invalid argument count";
 +              return -EINVAL;
 +      }
 +
 +              DMERR("linear: unregister failed %d", r);
 +}
 --- linux-2.4.20/drivers/md/dm-log.c   Thu Jan  1 01:00:00 1970
-+++ linux/drivers/md/dm-log.c  Sat Jul 12 18:13:20 2003
++++ linux/drivers/md/dm-log.c  Wed Aug 20 14:54:35 2003
 @@ -0,0 +1,302 @@
 +/*
 + * Copyright (C) 2003 Sistina Software
 +EXPORT_SYMBOL(dm_create_dirty_log);
 +EXPORT_SYMBOL(dm_destroy_dirty_log);
 --- linux-2.4.20/drivers/md/dm-log.h   Thu Jan  1 01:00:00 1970
-+++ linux/drivers/md/dm-log.h  Sat Jul 12 18:13:20 2003
++++ linux/drivers/md/dm-log.h  Wed Aug 20 14:54:35 2003
 @@ -0,0 +1,112 @@
 +/*
 + * Copyright (C) 2003 Sistina Software
 +
 +#endif
 --- linux-2.4.20/drivers/md/dm-raid1.c Thu Jan  1 01:00:00 1970
-+++ linux/drivers/md/dm-raid1.c        Sat Jul 12 18:13:20 2003
++++ linux/drivers/md/dm-raid1.c        Wed Aug 20 14:54:35 2003
 @@ -0,0 +1,1297 @@
 +/*
 + * Copyright (C) 2003 Sistina Software Limited.
 +MODULE_AUTHOR("Heinz Mauelshagen <mge@sistina.com>");
 +MODULE_LICENSE("GPL");
 --- linux-2.4.20/drivers/md/dm-snapshot.c      Thu Jan  1 01:00:00 1970
-+++ linux/drivers/md/dm-snapshot.c     Sat Jul 12 18:13:20 2003
++++ linux/drivers/md/dm-snapshot.c     Wed Aug 20 14:54:35 2003
 @@ -0,0 +1,1235 @@
 +/*
 + * dm-snapshot.c
 +      kmem_cache_destroy(exception_cache);
 +}
 --- linux-2.4.20/drivers/md/dm-snapshot.h      Thu Jan  1 01:00:00 1970
-+++ linux/drivers/md/dm-snapshot.h     Sat Jul 12 18:13:20 2003
++++ linux/drivers/md/dm-snapshot.h     Wed Aug 20 14:54:35 2003
 @@ -0,0 +1,158 @@
 +/*
 + * dm-snapshot.c
 +
 +#endif
 --- linux-2.4.20/drivers/md/dm-stripe.c        Thu Jan  1 01:00:00 1970
-+++ linux/drivers/md/dm-stripe.c       Sat Jul 12 18:13:20 2003
++++ linux/drivers/md/dm-stripe.c       Wed Aug 20 14:54:35 2003
 @@ -0,0 +1,258 @@
 +/*
 + * Copyright (C) 2001 Sistina Software (UK) Limited.
 +      return;
 +}
 --- linux-2.4.20/drivers/md/dm-table.c Thu Jan  1 01:00:00 1970
-+++ linux/drivers/md/dm-table.c        Sat Jul 12 18:13:20 2003
-@@ -0,0 +1,687 @@
++++ linux/drivers/md/dm-table.c        Wed Aug 20 14:54:35 2003
+@@ -0,0 +1,708 @@
 +/*
 + * Copyright (C) 2001 Sistina Software (UK) Limited.
 + *
 +#define NODE_SIZE L1_CACHE_BYTES
 +#define KEYS_PER_NODE (NODE_SIZE / sizeof(sector_t))
 +#define CHILDREN_PER_NODE (KEYS_PER_NODE + 1)
++#define MAX_TARGET_ARGS 64
 +
 +struct dm_table {
 +      atomic_t holders;
 +/*
 + * Destructively splits up the argument list to pass to ctr.
 + */
-+static int split_args(int max, int *argc, char **argv, char *input)
++static int split_args(int *argc, char ***argvp, char *input)
 +{
 +      char *start, *end = input, *out;
++      char **argv;
++      int max_args = MAX_TARGET_ARGS;
++
 +      *argc = 0;
++      argv = kmalloc(sizeof(*argv) * max_args, GFP_NOIO);
++      if (!argv)
++              return -ENOMEM;
 +
 +      while (1) {
 +              start = end;
 +              }
 +
 +              /* have we already filled the array ? */
-+              if ((*argc + 1) > max)
-+                      return -EINVAL;
++              if ((*argc + 1) > max_args) {
++                      char **argv2;
++                      
++                      max_args *= 2;
++                      argv2 = kmalloc(sizeof(*argv2) * max_args, GFP_NOIO);
++                      if (!argv2) {
++                              kfree(argv);
++                              return -ENOMEM;
++                      }
++
++                      memcpy(argv2, argv, sizeof(*argv) * *argc);
++                      kfree(argv);
++                      argv = argv2;
++              }
 +
 +              /* we know this is whitespace */
 +              if (*end)
 +              (*argc)++;
 +      }
 +
++      *argvp = argv;
 +      return 0;
 +}
 +
 +                      sector_t start, sector_t len, char *params)
 +{
 +      int r = -EINVAL, argc;
-+      char *argv[32];
++      char **argv;
 +      struct dm_target *tgt;
 +
 +      if ((r = check_space(t)))
 +              goto bad;
 +      }
 +
-+      r = split_args(ARRAY_SIZE(argv), &argc, argv, params);
++      r = split_args(&argc, &argv, params);
 +      if (r) {
-+              tgt->error = "couldn't split parameters";
++              tgt->error = "couldn't split parameters (insufficient memory)";
 +              goto bad;
 +      }
 +
 +      r = tgt->type->ctr(tgt, argc, argv);
++      kfree(argv);
 +      if (r)
 +              goto bad;
 +
 +EXPORT_SYMBOL(dm_table_event);
 +EXPORT_SYMBOL(dm_table_get_mode);
 --- linux-2.4.20/drivers/md/dm-target.c        Thu Jan  1 01:00:00 1970
-+++ linux/drivers/md/dm-target.c       Sat Jul 12 18:13:20 2003
++++ linux/drivers/md/dm-target.c       Wed Aug 20 14:54:35 2003
 @@ -0,0 +1,188 @@
 +/*
 + * Copyright (C) 2001 Sistina Software (UK) Limited
 +EXPORT_SYMBOL(dm_register_target);
 +EXPORT_SYMBOL(dm_unregister_target);
 --- linux-2.4.20/drivers/md/dm.c       Thu Jan  1 01:00:00 1970
-+++ linux/drivers/md/dm.c      Sat Jul 12 18:13:20 2003
++++ linux/drivers/md/dm.c      Wed Aug 20 14:54:35 2003
 @@ -0,0 +1,1115 @@
 +/*
 + * Copyright (C) 2001, 2002 Sistina Software (UK) Limited.
 +
 +EXPORT_SYMBOL(dm_kdevname);
 --- linux-2.4.20/drivers/md/dm.h       Thu Jan  1 01:00:00 1970
-+++ linux/drivers/md/dm.h      Sat Jul 12 18:13:20 2003
++++ linux/drivers/md/dm.h      Wed Aug 20 14:54:35 2003
 @@ -0,0 +1,175 @@
 +/*
 + * Internal header file for device mapper
 +
 +#endif
 --- linux-2.4.20/drivers/md/kcopyd.c   Thu Jan  1 01:00:00 1970
-+++ linux/drivers/md/kcopyd.c  Sat Jul 12 18:13:20 2003
++++ linux/drivers/md/kcopyd.c  Wed Aug 20 14:54:35 2003
 @@ -0,0 +1,650 @@
 +/*
 + * Copyright (C) 2002 Sistina Software (UK) Limited.
 +/* FIXME: this should scale with the number of pages */
 +#define MIN_JOBS 512
 +
-+static kmem_cache_t *_job_cache = NULL;
-+static mempool_t *_job_pool = NULL;
++static kmem_cache_t *_job_cache;
++static mempool_t *_job_pool;
 +
 +/*
 + * We maintain three lists of jobs:
 +EXPORT_SYMBOL(kcopyd_copy);
 +EXPORT_SYMBOL(kcopyd_cancel);
 --- linux-2.4.20/drivers/md/kcopyd.h   Thu Jan  1 01:00:00 1970
-+++ linux/drivers/md/kcopyd.h  Sat Jul 12 18:13:20 2003
++++ linux/drivers/md/kcopyd.h  Wed Aug 20 14:54:35 2003
 @@ -0,0 +1,47 @@
 +/*
 + * Copyright (C) 2001 Sistina Software
 +
 +#endif
 --- linux-2.4.20/fs/buffer.c   Fri Jan 10 16:35:24 2003
-+++ linux/fs/buffer.c  Sat Jul 12 18:13:10 2003
++++ linux/fs/buffer.c  Wed Aug 20 14:54:27 2003
 @@ -586,9 +586,10 @@
  void buffer_insert_inode_queue(struct buffer_head *bh, struct inode *inode)
  {
        if (nr_unused_buffer_heads >= MAX_UNUSED_BUFFERS) {
                kmem_cache_free(bh_cachep, bh);
 --- linux-2.4.20/fs/jbd/journal.c      Fri Jan 10 16:35:27 2003
-+++ linux/fs/jbd/journal.c     Sat Jul 12 18:13:10 2003
++++ linux/fs/jbd/journal.c     Wed Aug 20 14:54:27 2003
 @@ -1664,8 +1664,8 @@
   *
   * Whenever a buffer has an attached journal_head, its ->b_state:BH_JBD bit
                        clear_bit(BH_JBD, &bh->b_state);
                        __brelse(bh);
 --- linux-2.4.20/include/linux/device-mapper.h Thu Jan  1 01:00:00 1970
-+++ linux/include/linux/device-mapper.h        Sat Jul 12 18:13:20 2003
++++ linux/include/linux/device-mapper.h        Wed Aug 20 14:54:35 2003
 @@ -0,0 +1,104 @@
 +/*
 + * Copyright (C) 2001 Sistina Software (UK) Limited.
 +
 +#endif                                /* _LINUX_DEVICE_MAPPER_H */
 --- linux-2.4.20/include/linux/dm-ioctl.h      Thu Jan  1 01:00:00 1970
-+++ linux/include/linux/dm-ioctl.h     Sat Jul 12 18:13:20 2003
++++ linux/include/linux/dm-ioctl.h     Wed Aug 20 14:54:35 2003
 @@ -0,0 +1,237 @@
 +/*
 + * Copyright (C) 2001 - 2003 Sistina Software (UK) Limited.
 +
 +#define DM_VERSION_MAJOR      4
 +#define DM_VERSION_MINOR      0
-+#define DM_VERSION_PATCHLEVEL 1
-+#define DM_VERSION_EXTRA      "-ioctl (2003-07-12)"
++#define DM_VERSION_PATCHLEVEL 2
++#define DM_VERSION_EXTRA      "-ioctl (2003-08-19)"
 +
 +/* Status bits */
 +#define DM_READONLY_FLAG      (1 << 0) /* In/Out */
 +
 +#endif                                /* _LINUX_DM_IOCTL_H */
 --- linux-2.4.20/include/linux/fs.h    Fri Jan 10 16:35:55 2003
-+++ linux/include/linux/fs.h   Sat Jul 12 18:13:10 2003
++++ linux/include/linux/fs.h   Wed Aug 20 14:54:27 2003
 @@ -220,6 +220,7 @@
        BH_Wait_IO,     /* 1 if we should write out this buffer */
        BH_Launder,     /* 1 if we can throttle on this buffer */
  
  /*
 --- linux-2.4.20/include/linux/jbd.h   Fri Jan 10 16:35:55 2003
-+++ linux/include/linux/jbd.h  Sat Jul 12 18:13:10 2003
++++ linux/include/linux/jbd.h  Wed Aug 20 14:54:27 2003
 @@ -254,7 +254,7 @@
  
  static inline struct journal_head *bh2jh(struct buffer_head *bh)
  
  #define HAVE_JOURNAL_CALLBACK_STATUS
 --- linux-2.4.20/include/linux/mempool.h       Thu Jan  1 01:00:00 1970
-+++ linux/include/linux/mempool.h      Sat Jul 12 18:13:29 2003
++++ linux/include/linux/mempool.h      Wed Aug 20 14:54:42 2003
 @@ -0,0 +1,31 @@
 +/*
 + * memory buffer pool support
 +
 +#endif /* _LINUX_MEMPOOL_H */
 --- linux-2.4.20/include/linux/vmalloc.h       Fri Jan 10 16:35:58 2003
-+++ linux/include/linux/vmalloc.h      Sat Jul 12 18:13:38 2003
++++ linux/include/linux/vmalloc.h      Wed Aug 20 14:54:48 2003
 @@ -26,6 +26,7 @@
  extern void vmfree_area_pages(unsigned long address, unsigned long size);
  extern int vmalloc_area_pages(unsigned long address, unsigned long size,
  /*
   *    Allocate any pages
 --- linux-2.4.20/kernel/ksyms.c        Fri Jan 10 16:36:02 2003
-+++ linux/kernel/ksyms.c       Sat Jul 12 18:13:38 2003
++++ linux/kernel/ksyms.c       Wed Aug 20 14:54:48 2003
 @@ -111,6 +111,7 @@
  EXPORT_SYMBOL(vfree);
  EXPORT_SYMBOL(__vmalloc);
  EXPORT_SYMBOL(remap_page_range);
  EXPORT_SYMBOL(max_mapnr);
 --- linux-2.4.20/mm/Makefile   Fri Jan 10 16:36:02 2003
-+++ linux/mm/Makefile  Sat Jul 12 18:13:29 2003
++++ linux/mm/Makefile  Wed Aug 20 14:54:42 2003
 @@ -9,12 +9,12 @@
  
  O_TARGET := mm.o
  obj-$(CONFIG_HIGHMEM) += highmem.o
  
 --- linux-2.4.20/mm/filemap.c  Fri Jan 10 16:36:03 2003
-+++ linux/mm/filemap.c Sat Jul 12 18:13:33 2003
++++ linux/mm/filemap.c Wed Aug 20 14:54:45 2003
 @@ -1700,8 +1700,10 @@
                        retval = generic_file_direct_IO(READ, filp, buf, count, pos);
                        if (retval > 0)
        if (file->f_flags & O_DIRECT)
                goto o_direct;
 --- linux-2.4.20/mm/mempool.c  Thu Jan  1 01:00:00 1970
-+++ linux/mm/mempool.c Sat Jul 12 18:13:29 2003
++++ linux/mm/mempool.c Wed Aug 20 14:54:42 2003
 @@ -0,0 +1,299 @@
 +/*
 + *  linux/mm/mempool.c
 +EXPORT_SYMBOL(mempool_alloc_slab);
 +EXPORT_SYMBOL(mempool_free_slab);
 --- linux-2.4.20/mm/vmalloc.c  Fri Jan 10 16:36:03 2003
-+++ linux/mm/vmalloc.c Sat Jul 12 18:13:38 2003
++++ linux/mm/vmalloc.c Wed Aug 20 14:54:48 2003
 @@ -327,3 +327,22 @@
        read_unlock(&vmlist_lock);
        return buf - buf_start;
index cda4750a968bb830992782349d1e2108efa8b17c..27609ad0d9a5a28a46a727a25e5070864fb96996 100644 (file)
@@ -1,6 +1,5 @@
-diff -ruN linux-2.4.21-dm-real/Documentation/Configure.help linux-2.4.21/Documentation/Configure.help
---- linux-2.4.21-dm-real/Documentation/Configure.help  Fri Jun 13 16:32:30 2003
-+++ linux-2.4.21/Documentation/Configure.help  Sat Jul 12 18:14:01 2003
+--- linux-2.4.21/Documentation/Configure.help  Fri Jun 13 16:32:30 2003
++++ linux/Documentation/Configure.help Wed Aug 20 14:41:36 2003
 @@ -1839,6 +1839,20 @@
    want), say M here and read <file:Documentation/modules.txt>.  The
    module will be called lvm-mod.o.
@@ -22,9 +21,8 @@ diff -ruN linux-2.4.21-dm-real/Documentation/Configure.help linux-2.4.21/Documen
  Multiple devices driver support (RAID and LVM)
  CONFIG_MD
    Support multiple physical spindles through a single logical device.
-diff -ruN linux-2.4.21-dm-real/MAINTAINERS linux-2.4.21/MAINTAINERS
---- linux-2.4.21-dm-real/MAINTAINERS   Fri Jun 13 16:32:30 2003
-+++ linux-2.4.21/MAINTAINERS   Sat Jul 12 18:14:01 2003
+--- linux-2.4.21/MAINTAINERS   Fri Jun 13 16:32:30 2003
++++ linux/MAINTAINERS  Wed Aug 20 14:41:36 2003
 @@ -476,6 +476,13 @@
  W:    http://www.debian.org/~dz/i8k/
  S:    Maintained
@@ -39,9 +37,8 @@ diff -ruN linux-2.4.21-dm-real/MAINTAINERS linux-2.4.21/MAINTAINERS
  DEVICE NUMBER REGISTRY
  P:    H. Peter Anvin
  M:    hpa@zytor.com
-diff -ruN linux-2.4.21-dm-real/arch/mips64/kernel/ioctl32.c linux-2.4.21/arch/mips64/kernel/ioctl32.c
---- linux-2.4.21-dm-real/arch/mips64/kernel/ioctl32.c  Fri Jan 10 16:34:18 2003
-+++ linux-2.4.21/arch/mips64/kernel/ioctl32.c  Sat Jul 12 18:13:51 2003
+--- linux-2.4.21/arch/mips64/kernel/ioctl32.c  Fri Jan 10 16:34:18 2003
++++ linux/arch/mips64/kernel/ioctl32.c Wed Aug 20 14:41:28 2003
 @@ -33,6 +33,7 @@
  #include <linux/auto_fs.h>
  #include <linux/ext2_fs.h>
@@ -73,9 +70,8 @@ diff -ruN linux-2.4.21-dm-real/arch/mips64/kernel/ioctl32.c linux-2.4.21/arch/mi
  
        IOCTL32_DEFAULT(MTIOCTOP),                      /* mtio.h ioctls  */
        IOCTL32_HANDLER(MTIOCGET32, mt_ioctl_trans),
-diff -ruN linux-2.4.21-dm-real/arch/parisc/kernel/ioctl32.c linux-2.4.21/arch/parisc/kernel/ioctl32.c
---- linux-2.4.21-dm-real/arch/parisc/kernel/ioctl32.c  Fri Jun 13 16:32:32 2003
-+++ linux-2.4.21/arch/parisc/kernel/ioctl32.c  Sat Jul 12 18:13:51 2003
+--- linux-2.4.21/arch/parisc/kernel/ioctl32.c  Fri Jun 13 16:32:32 2003
++++ linux/arch/parisc/kernel/ioctl32.c Wed Aug 20 14:41:28 2003
 @@ -55,6 +55,7 @@
  #define max max */
  #include <linux/lvm.h>
@@ -107,9 +103,8 @@ diff -ruN linux-2.4.21-dm-real/arch/parisc/kernel/ioctl32.c linux-2.4.21/arch/pa
  #if defined(CONFIG_DRM) || defined(CONFIG_DRM_MODULE)
  COMPATIBLE_IOCTL(DRM_IOCTL_GET_MAGIC)
  COMPATIBLE_IOCTL(DRM_IOCTL_IRQ_BUSID)
-diff -ruN linux-2.4.21-dm-real/arch/ppc64/kernel/ioctl32.c linux-2.4.21/arch/ppc64/kernel/ioctl32.c
---- linux-2.4.21-dm-real/arch/ppc64/kernel/ioctl32.c   Fri Jun 13 16:32:33 2003
-+++ linux-2.4.21/arch/ppc64/kernel/ioctl32.c   Sat Jul 12 18:13:51 2003
+--- linux-2.4.21/arch/ppc64/kernel/ioctl32.c   Fri Jun 13 16:32:33 2003
++++ linux/arch/ppc64/kernel/ioctl32.c  Wed Aug 20 14:41:29 2003
 @@ -66,6 +66,7 @@
  #if defined(CONFIG_BLK_DEV_LVM) || defined(CONFIG_BLK_DEV_LVM_MODULE)
  #include <linux/lvm.h>
@@ -141,9 +136,8 @@ diff -ruN linux-2.4.21-dm-real/arch/ppc64/kernel/ioctl32.c linux-2.4.21/arch/ppc
  /* Remove *PRIVATE in 2.5 */
  COMPATIBLE_IOCTL(SIOCDEVPRIVATE),
  COMPATIBLE_IOCTL(SIOCDEVPRIVATE+1),
-diff -ruN linux-2.4.21-dm-real/arch/s390x/kernel/ioctl32.c linux-2.4.21/arch/s390x/kernel/ioctl32.c
---- linux-2.4.21-dm-real/arch/s390x/kernel/ioctl32.c   Fri Jan 10 16:34:26 2003
-+++ linux-2.4.21/arch/s390x/kernel/ioctl32.c   Sat Jul 12 18:13:51 2003
+--- linux-2.4.21/arch/s390x/kernel/ioctl32.c   Fri Jan 10 16:34:26 2003
++++ linux/arch/s390x/kernel/ioctl32.c  Wed Aug 20 14:41:29 2003
 @@ -25,6 +25,7 @@
  #include <linux/ext2_fs.h>
  #include <linux/hdreg.h>
@@ -173,9 +167,8 @@ diff -ruN linux-2.4.21-dm-real/arch/s390x/kernel/ioctl32.c linux-2.4.21/arch/s39
  
        IOCTL32_HANDLER(SIOCGIFNAME, dev_ifname32),
        IOCTL32_HANDLER(SIOCGIFCONF, dev_ifconf),
-diff -ruN linux-2.4.21-dm-real/arch/sparc64/kernel/ioctl32.c linux-2.4.21/arch/sparc64/kernel/ioctl32.c
---- linux-2.4.21-dm-real/arch/sparc64/kernel/ioctl32.c Fri Jun 13 16:32:34 2003
-+++ linux-2.4.21/arch/sparc64/kernel/ioctl32.c Sat Jul 12 18:13:51 2003
+--- linux-2.4.21/arch/sparc64/kernel/ioctl32.c Fri Jun 13 16:32:34 2003
++++ linux/arch/sparc64/kernel/ioctl32.c        Wed Aug 20 14:41:29 2003
 @@ -56,6 +56,7 @@
  #if defined(CONFIG_BLK_DEV_LVM) || defined(CONFIG_BLK_DEV_LVM_MODULE)
  #include <linux/lvm.h>
@@ -207,9 +200,8 @@ diff -ruN linux-2.4.21-dm-real/arch/sparc64/kernel/ioctl32.c linux-2.4.21/arch/s
  /* Linux-1394 */
  #if defined(CONFIG_IEEE1394) || defined(CONFIG_IEEE1394_MODULE)
  COMPATIBLE_IOCTL(AMDTP_IOC_CHANNEL)
-diff -ruN linux-2.4.21-dm-real/arch/x86_64/ia32/ia32_ioctl.c linux-2.4.21/arch/x86_64/ia32/ia32_ioctl.c
---- linux-2.4.21-dm-real/arch/x86_64/ia32/ia32_ioctl.c Fri Jun 13 16:32:35 2003
-+++ linux-2.4.21/arch/x86_64/ia32/ia32_ioctl.c Sat Jul 12 18:13:51 2003
+--- linux-2.4.21/arch/x86_64/ia32/ia32_ioctl.c Fri Jun 13 16:32:35 2003
++++ linux/arch/x86_64/ia32/ia32_ioctl.c        Wed Aug 20 14:41:29 2003
 @@ -67,6 +67,7 @@
  #define max max
  #include <linux/lvm.h>
@@ -241,22 +233,18 @@ diff -ruN linux-2.4.21-dm-real/arch/x86_64/ia32/ia32_ioctl.c linux-2.4.21/arch/x
  #ifdef CONFIG_AUTOFS_FS
  COMPATIBLE_IOCTL(AUTOFS_IOC_READY)
  COMPATIBLE_IOCTL(AUTOFS_IOC_FAIL)
-diff -ruN linux-2.4.21-dm-real/drivers/md/Config.in linux-2.4.21/drivers/md/Config.in
---- linux-2.4.21-dm-real/drivers/md/Config.in  Fri Jan 10 16:34:50 2003
-+++ linux-2.4.21/drivers/md/Config.in  Sat Jul 12 18:14:01 2003
-@@ -14,5 +14,9 @@
+--- linux-2.4.21/drivers/md/Config.in  Fri Jan 10 16:34:50 2003
++++ linux/drivers/md/Config.in Wed Aug 20 14:41:36 2003
+@@ -14,5 +14,7 @@
  dep_tristate '  Multipath I/O support' CONFIG_MD_MULTIPATH $CONFIG_BLK_DEV_MD
  
  dep_tristate ' Logical volume manager (LVM) support' CONFIG_BLK_DEV_LVM $CONFIG_MD
-+if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-+   dep_tristate ' Device-mapper support (EXPERIMENTAL)' CONFIG_BLK_DEV_DM $CONFIG_MD
-+   dep_tristate '  Mirror (RAID-1) support (EXPERIMENTAL)' CONFIG_BLK_DEV_DM_MIRROR $CONFIG_BLK_DEV_DM
-+fi
++dep_tristate ' Device-mapper support' CONFIG_BLK_DEV_DM $CONFIG_MD
++dep_tristate '  Mirror (RAID-1) support' CONFIG_BLK_DEV_DM_MIRROR $CONFIG_BLK_DEV_DM
  
  endmenu
-diff -ruN linux-2.4.21-dm-real/drivers/md/Makefile linux-2.4.21/drivers/md/Makefile
---- linux-2.4.21-dm-real/drivers/md/Makefile   Fri Jan 10 16:34:50 2003
-+++ linux-2.4.21/drivers/md/Makefile   Sat Jul 12 18:14:11 2003
+--- linux-2.4.21/drivers/md/Makefile   Fri Jan 10 16:34:50 2003
++++ linux/drivers/md/Makefile  Wed Aug 20 14:41:44 2003
 @@ -4,24 +4,41 @@
  
  O_TARGET      := mddev.o
@@ -308,9 +296,8 @@ diff -ruN linux-2.4.21-dm-real/drivers/md/Makefile linux-2.4.21/drivers/md/Makef
 +dm-mirror.o: $(dm-mirror-mod-objs)
 +      $(LD) -r -o $@ $(dm-mirror-mod-objs)
 +
-diff -ruN linux-2.4.21-dm-real/drivers/md/dm-daemon.c linux-2.4.21/drivers/md/dm-daemon.c
---- linux-2.4.21-dm-real/drivers/md/dm-daemon.c        Thu Jan  1 01:00:00 1970
-+++ linux-2.4.21/drivers/md/dm-daemon.c        Sat Jul 12 18:14:05 2003
+--- linux-2.4.21/drivers/md/dm-daemon.c        Thu Jan  1 01:00:00 1970
++++ linux/drivers/md/dm-daemon.c       Wed Aug 20 14:41:38 2003
 @@ -0,0 +1,113 @@
 +/*
 + * Copyright (C) 2003 Sistina Software
@@ -395,7 +382,7 @@ diff -ruN linux-2.4.21-dm-real/drivers/md/dm-daemon.c linux-2.4.21/drivers/md/dm
 +      down(&dd->start_lock);
 +      pid = kernel_thread(daemon, dd, 0);
 +      if (pid <= 0) {
-+              DMERR("Failed to start kcopyd thread");
++              DMERR("Failed to start %s thread", name);
 +              return -EAGAIN;
 +      }
 +
@@ -425,9 +412,8 @@ diff -ruN linux-2.4.21-dm-real/drivers/md/dm-daemon.c linux-2.4.21/drivers/md/dm
 +EXPORT_SYMBOL(dm_daemon_start);
 +EXPORT_SYMBOL(dm_daemon_stop);
 +EXPORT_SYMBOL(dm_daemon_wake);
-diff -ruN linux-2.4.21-dm-real/drivers/md/dm-daemon.h linux-2.4.21/drivers/md/dm-daemon.h
---- linux-2.4.21-dm-real/drivers/md/dm-daemon.h        Thu Jan  1 01:00:00 1970
-+++ linux-2.4.21/drivers/md/dm-daemon.h        Sat Jul 12 18:14:05 2003
+--- linux-2.4.21/drivers/md/dm-daemon.h        Thu Jan  1 01:00:00 1970
++++ linux/drivers/md/dm-daemon.h       Wed Aug 20 14:41:38 2003
 @@ -0,0 +1,29 @@
 +/*
 + * Copyright (C) 2003 Sistina Software
@@ -458,10 +444,9 @@ diff -ruN linux-2.4.21-dm-real/drivers/md/dm-daemon.h linux-2.4.21/drivers/md/dm
 +int dm_daemon_running(struct dm_daemon *dd);
 +
 +#endif
-diff -ruN linux-2.4.21-dm-real/drivers/md/dm-exception-store.c linux-2.4.21/drivers/md/dm-exception-store.c
---- linux-2.4.21-dm-real/drivers/md/dm-exception-store.c       Thu Jan  1 01:00:00 1970
-+++ linux-2.4.21/drivers/md/dm-exception-store.c       Sat Jul 12 18:14:05 2003
-@@ -0,0 +1,675 @@
+--- linux-2.4.21/drivers/md/dm-exception-store.c       Thu Jan  1 01:00:00 1970
++++ linux/drivers/md/dm-exception-store.c      Wed Aug 20 14:41:38 2003
+@@ -0,0 +1,673 @@
 +/*
 + * dm-snapshot.c
 + *
@@ -833,8 +818,6 @@ diff -ruN linux-2.4.21-dm-real/drivers/md/dm-exception-store.c linux-2.4.21/driv
 +              r = insert_exceptions(ps, &full);
 +              if (r)
 +                      return r;
-+
-+              area++;
 +      }
 +
 +      return 0;
@@ -1137,9 +1120,8 @@ diff -ruN linux-2.4.21-dm-real/drivers/md/dm-exception-store.c linux-2.4.21/driv
 +
 +      return 0;
 +}
-diff -ruN linux-2.4.21-dm-real/drivers/md/dm-io.c linux-2.4.21/drivers/md/dm-io.c
---- linux-2.4.21-dm-real/drivers/md/dm-io.c    Thu Jan  1 01:00:00 1970
-+++ linux-2.4.21/drivers/md/dm-io.c    Sat Jul 12 18:14:05 2003
+--- linux-2.4.21/drivers/md/dm-io.c    Thu Jan  1 01:00:00 1970
++++ linux/drivers/md/dm-io.c   Wed Aug 20 14:41:38 2003
 @@ -0,0 +1,344 @@
 +/*
 + * Copyright (C) 2003 Sistina Software
@@ -1485,9 +1467,8 @@ diff -ruN linux-2.4.21-dm-real/drivers/md/dm-io.c linux-2.4.21/drivers/md/dm-io.
 +EXPORT_SYMBOL(dm_io_put);
 +EXPORT_SYMBOL(dm_io_sync);
 +EXPORT_SYMBOL(dm_io_async);
-diff -ruN linux-2.4.21-dm-real/drivers/md/dm-io.h linux-2.4.21/drivers/md/dm-io.h
---- linux-2.4.21-dm-real/drivers/md/dm-io.h    Thu Jan  1 01:00:00 1970
-+++ linux-2.4.21/drivers/md/dm-io.h    Sat Jul 12 18:14:05 2003
+--- linux-2.4.21/drivers/md/dm-io.h    Thu Jan  1 01:00:00 1970
++++ linux/drivers/md/dm-io.h   Wed Aug 20 14:41:38 2003
 @@ -0,0 +1,86 @@
 +/*
 + * Copyright (C) 2003 Sistina Software
@@ -1575,10 +1556,9 @@ diff -ruN linux-2.4.21-dm-real/drivers/md/dm-io.h linux-2.4.21/drivers/md/dm-io.
 +              io_notify_fn fn, void *context);
 +
 +#endif
-diff -ruN linux-2.4.21-dm-real/drivers/md/dm-ioctl.c linux-2.4.21/drivers/md/dm-ioctl.c
---- linux-2.4.21-dm-real/drivers/md/dm-ioctl.c Thu Jan  1 01:00:00 1970
-+++ linux-2.4.21/drivers/md/dm-ioctl.c Sat Jul 12 18:14:05 2003
-@@ -0,0 +1,1272 @@
+--- linux-2.4.21/drivers/md/dm-ioctl.c Thu Jan  1 01:00:00 1970
++++ linux/drivers/md/dm-ioctl.c        Wed Aug 20 14:41:38 2003
+@@ -0,0 +1,1284 @@
 +/*
 + * Copyright (C) 2001, 2002 Sistina Software (UK) Limited.
 + *
@@ -2174,7 +2154,7 @@ diff -ruN linux-2.4.21-dm-real/drivers/md/dm-ioctl.c linux-2.4.21/drivers/md/dm-
 +      return dm_hash_rename(param->name, new_name);
 +}
 +
-+static int suspend(struct dm_ioctl *param)
++static int do_suspend(struct dm_ioctl *param)
 +{
 +      int r = 0;
 +      struct mapped_device *md;
@@ -2193,7 +2173,7 @@ diff -ruN linux-2.4.21-dm-real/drivers/md/dm-ioctl.c linux-2.4.21/drivers/md/dm-
 +      return r;
 +}
 +
-+static int resume(struct dm_ioctl *param)
++static int do_resume(struct dm_ioctl *param)
 +{
 +      int r = 0;
 +      struct hash_cell *hc;
@@ -2256,9 +2236,9 @@ diff -ruN linux-2.4.21-dm-real/drivers/md/dm-ioctl.c linux-2.4.21/drivers/md/dm-
 +static int dev_suspend(struct dm_ioctl *param, size_t param_size)
 +{
 +      if (param->flags & DM_SUSPEND_FLAG)
-+              return suspend(param);
++              return do_suspend(param);
 +
-+      return resume(param);
++      return do_resume(param);
 +}
 +
 +/*
@@ -2279,40 +2259,6 @@ diff -ruN linux-2.4.21-dm-real/drivers/md/dm-ioctl.c linux-2.4.21/drivers/md/dm-
 +      return r;
 +}
 +
-+/*
-+ * Wait for a device to report an event
-+ */
-+static int dev_wait(struct dm_ioctl *param, size_t param_size)
-+{
-+      int r;
-+      struct mapped_device *md;
-+      DECLARE_WAITQUEUE(wq, current);
-+
-+      md = find_device(param);
-+      if (!md)
-+              return -ENXIO;
-+
-+      /*
-+       * Wait for a notification event
-+       */
-+      set_current_state(TASK_INTERRUPTIBLE);
-+      if (!dm_add_wait_queue(md, &wq, param->event_nr)) {
-+              schedule();
-+              dm_remove_wait_queue(md, &wq);
-+      }
-+      set_current_state(TASK_RUNNING);
-+
-+      /*
-+       * The userland program is going to want to know what
-+       * changed to trigger the event, so we may as well tell
-+       * him and save an ioctl.
-+       */
-+      r = __dev_status(md, param);
-+
-+      dm_put(md);
-+      return r;
-+}
-+
 +static inline int get_mode(struct dm_ioctl *param)
 +{
 +      int mode = FMODE_READ | FMODE_WRITE;
@@ -2397,6 +2343,8 @@ diff -ruN linux-2.4.21-dm-real/drivers/md/dm-ioctl.c linux-2.4.21/drivers/md/dm-
 +              return -ENXIO;
 +      }
 +
++      if (hc->new_map)
++              dm_table_put(hc->new_map);
 +      hc->new_map = t;
 +      param->flags |= DM_INACTIVE_PRESENT_FLAG;
 +
@@ -2589,6 +2537,50 @@ diff -ruN linux-2.4.21-dm-real/drivers/md/dm-ioctl.c linux-2.4.21/drivers/md/dm-
 +      return r;
 +}
 +
++/*
++ * Wait for a device to report an event
++ */
++static int dev_wait(struct dm_ioctl *param, size_t param_size)
++{
++      int r;
++      struct mapped_device *md;
++      struct dm_table *table;
++      DECLARE_WAITQUEUE(wq, current);
++
++      md = find_device(param);
++      if (!md)
++              return -ENXIO;
++
++      /*
++       * Wait for a notification event
++       */
++      set_current_state(TASK_INTERRUPTIBLE);
++      if (!dm_add_wait_queue(md, &wq, param->event_nr)) {
++              schedule();
++              dm_remove_wait_queue(md, &wq);
++      }
++      set_current_state(TASK_RUNNING);
++
++      /*
++       * The userland program is going to want to know what
++       * changed to trigger the event, so we may as well tell
++       * him and save an ioctl.
++       */
++      r = __dev_status(md, param);
++      if (r)
++              goto out;
++
++      table = dm_get_table(md);
++      if (table) {
++              retrieve_status(table, param, param_size);
++              dm_table_put(table);
++      }
++
++ out:
++      dm_put(md);
++      return r;
++}
++
 +/*-----------------------------------------------------------------
 + * Implementation of open/close/ioctl on the special char
 + * device.
@@ -2851,9 +2843,8 @@ diff -ruN linux-2.4.21-dm-real/drivers/md/dm-ioctl.c linux-2.4.21/drivers/md/dm-
 +
 +      dm_hash_exit();
 +}
-diff -ruN linux-2.4.21-dm-real/drivers/md/dm-linear.c linux-2.4.21/drivers/md/dm-linear.c
---- linux-2.4.21-dm-real/drivers/md/dm-linear.c        Thu Jan  1 01:00:00 1970
-+++ linux-2.4.21/drivers/md/dm-linear.c        Sat Jul 12 18:14:05 2003
+--- linux-2.4.21/drivers/md/dm-linear.c        Thu Jan  1 01:00:00 1970
++++ linux/drivers/md/dm-linear.c       Wed Aug 20 14:41:38 2003
 @@ -0,0 +1,123 @@
 +/*
 + * Copyright (C) 2001 Sistina Software (UK) Limited.
@@ -2884,7 +2875,7 @@ diff -ruN linux-2.4.21-dm-real/drivers/md/dm-linear.c linux-2.4.21/drivers/md/dm
 +      struct linear_c *lc;
 +
 +      if (argc != 2) {
-+              ti->error = "dm-linear: Not enough arguments";
++              ti->error = "dm-linear: Invalid argument count";
 +              return -EINVAL;
 +      }
 +
@@ -2978,9 +2969,8 @@ diff -ruN linux-2.4.21-dm-real/drivers/md/dm-linear.c linux-2.4.21/drivers/md/dm
 +      if (r < 0)
 +              DMERR("linear: unregister failed %d", r);
 +}
-diff -ruN linux-2.4.21-dm-real/drivers/md/dm-log.c linux-2.4.21/drivers/md/dm-log.c
---- linux-2.4.21-dm-real/drivers/md/dm-log.c   Thu Jan  1 01:00:00 1970
-+++ linux-2.4.21/drivers/md/dm-log.c   Sat Jul 12 18:14:05 2003
+--- linux-2.4.21/drivers/md/dm-log.c   Thu Jan  1 01:00:00 1970
++++ linux/drivers/md/dm-log.c  Wed Aug 20 14:41:38 2003
 @@ -0,0 +1,302 @@
 +/*
 + * Copyright (C) 2003 Sistina Software
@@ -3284,9 +3274,8 @@ diff -ruN linux-2.4.21-dm-real/drivers/md/dm-log.c linux-2.4.21/drivers/md/dm-lo
 +EXPORT_SYMBOL(dm_dirty_log_exit);
 +EXPORT_SYMBOL(dm_create_dirty_log);
 +EXPORT_SYMBOL(dm_destroy_dirty_log);
-diff -ruN linux-2.4.21-dm-real/drivers/md/dm-log.h linux-2.4.21/drivers/md/dm-log.h
---- linux-2.4.21-dm-real/drivers/md/dm-log.h   Thu Jan  1 01:00:00 1970
-+++ linux-2.4.21/drivers/md/dm-log.h   Sat Jul 12 18:14:05 2003
+--- linux-2.4.21/drivers/md/dm-log.h   Thu Jan  1 01:00:00 1970
++++ linux/drivers/md/dm-log.h  Wed Aug 20 14:41:38 2003
 @@ -0,0 +1,112 @@
 +/*
 + * Copyright (C) 2003 Sistina Software
@@ -3400,9 +3389,8 @@ diff -ruN linux-2.4.21-dm-real/drivers/md/dm-log.h linux-2.4.21/drivers/md/dm-lo
 +void dm_dirty_log_exit(void);
 +
 +#endif
-diff -ruN linux-2.4.21-dm-real/drivers/md/dm-raid1.c linux-2.4.21/drivers/md/dm-raid1.c
---- linux-2.4.21-dm-real/drivers/md/dm-raid1.c Thu Jan  1 01:00:00 1970
-+++ linux-2.4.21/drivers/md/dm-raid1.c Sat Jul 12 18:14:05 2003
+--- linux-2.4.21/drivers/md/dm-raid1.c Thu Jan  1 01:00:00 1970
++++ linux/drivers/md/dm-raid1.c        Wed Aug 20 14:41:38 2003
 @@ -0,0 +1,1297 @@
 +/*
 + * Copyright (C) 2003 Sistina Software Limited.
@@ -4701,9 +4689,8 @@ diff -ruN linux-2.4.21-dm-real/drivers/md/dm-raid1.c linux-2.4.21/drivers/md/dm-
 +MODULE_DESCRIPTION(DM_NAME " mirror target");
 +MODULE_AUTHOR("Heinz Mauelshagen <mge@sistina.com>");
 +MODULE_LICENSE("GPL");
-diff -ruN linux-2.4.21-dm-real/drivers/md/dm-snapshot.c linux-2.4.21/drivers/md/dm-snapshot.c
---- linux-2.4.21-dm-real/drivers/md/dm-snapshot.c      Thu Jan  1 01:00:00 1970
-+++ linux-2.4.21/drivers/md/dm-snapshot.c      Sat Jul 12 18:14:05 2003
+--- linux-2.4.21/drivers/md/dm-snapshot.c      Thu Jan  1 01:00:00 1970
++++ linux/drivers/md/dm-snapshot.c     Wed Aug 20 14:41:38 2003
 @@ -0,0 +1,1235 @@
 +/*
 + * dm-snapshot.c
@@ -5940,9 +5927,8 @@ diff -ruN linux-2.4.21-dm-real/drivers/md/dm-snapshot.c linux-2.4.21/drivers/md/
 +      kmem_cache_destroy(pending_cache);
 +      kmem_cache_destroy(exception_cache);
 +}
-diff -ruN linux-2.4.21-dm-real/drivers/md/dm-snapshot.h linux-2.4.21/drivers/md/dm-snapshot.h
---- linux-2.4.21-dm-real/drivers/md/dm-snapshot.h      Thu Jan  1 01:00:00 1970
-+++ linux-2.4.21/drivers/md/dm-snapshot.h      Sat Jul 12 18:14:05 2003
+--- linux-2.4.21/drivers/md/dm-snapshot.h      Thu Jan  1 01:00:00 1970
++++ linux/drivers/md/dm-snapshot.h     Wed Aug 20 14:41:38 2003
 @@ -0,0 +1,158 @@
 +/*
 + * dm-snapshot.c
@@ -6102,9 +6088,8 @@ diff -ruN linux-2.4.21-dm-real/drivers/md/dm-snapshot.h linux-2.4.21/drivers/md/
 +}
 +
 +#endif
-diff -ruN linux-2.4.21-dm-real/drivers/md/dm-stripe.c linux-2.4.21/drivers/md/dm-stripe.c
---- linux-2.4.21-dm-real/drivers/md/dm-stripe.c        Thu Jan  1 01:00:00 1970
-+++ linux-2.4.21/drivers/md/dm-stripe.c        Sat Jul 12 18:14:05 2003
+--- linux-2.4.21/drivers/md/dm-stripe.c        Thu Jan  1 01:00:00 1970
++++ linux/drivers/md/dm-stripe.c       Wed Aug 20 14:41:38 2003
 @@ -0,0 +1,258 @@
 +/*
 + * Copyright (C) 2001 Sistina Software (UK) Limited.
@@ -6364,10 +6349,9 @@ diff -ruN linux-2.4.21-dm-real/drivers/md/dm-stripe.c linux-2.4.21/drivers/md/dm
 +
 +      return;
 +}
-diff -ruN linux-2.4.21-dm-real/drivers/md/dm-table.c linux-2.4.21/drivers/md/dm-table.c
---- linux-2.4.21-dm-real/drivers/md/dm-table.c Thu Jan  1 01:00:00 1970
-+++ linux-2.4.21/drivers/md/dm-table.c Sat Jul 12 18:14:05 2003
-@@ -0,0 +1,687 @@
+--- linux-2.4.21/drivers/md/dm-table.c Thu Jan  1 01:00:00 1970
++++ linux/drivers/md/dm-table.c        Wed Aug 20 14:41:38 2003
+@@ -0,0 +1,708 @@
 +/*
 + * Copyright (C) 2001 Sistina Software (UK) Limited.
 + *
@@ -6387,6 +6371,7 @@ diff -ruN linux-2.4.21-dm-real/drivers/md/dm-table.c linux-2.4.21/drivers/md/dm-
 +#define NODE_SIZE L1_CACHE_BYTES
 +#define KEYS_PER_NODE (NODE_SIZE / sizeof(sector_t))
 +#define CHILDREN_PER_NODE (KEYS_PER_NODE + 1)
++#define MAX_TARGET_ARGS 64
 +
 +struct dm_table {
 +      atomic_t holders;
@@ -6813,10 +6798,16 @@ diff -ruN linux-2.4.21-dm-real/drivers/md/dm-table.c linux-2.4.21/drivers/md/dm-
 +/*
 + * Destructively splits up the argument list to pass to ctr.
 + */
-+static int split_args(int max, int *argc, char **argv, char *input)
++static int split_args(int *argc, char ***argvp, char *input)
 +{
 +      char *start, *end = input, *out;
++      char **argv;
++      int max_args = MAX_TARGET_ARGS;
++
 +      *argc = 0;
++      argv = kmalloc(sizeof(*argv) * max_args, GFP_NOIO);
++      if (!argv)
++              return -ENOMEM;
 +
 +      while (1) {
 +              start = end;
@@ -6845,8 +6836,20 @@ diff -ruN linux-2.4.21-dm-real/drivers/md/dm-table.c linux-2.4.21/drivers/md/dm-
 +              }
 +
 +              /* have we already filled the array ? */
-+              if ((*argc + 1) > max)
-+                      return -EINVAL;
++              if ((*argc + 1) > max_args) {
++                      char **argv2;
++                      
++                      max_args *= 2;
++                      argv2 = kmalloc(sizeof(*argv2) * max_args, GFP_NOIO);
++                      if (!argv2) {
++                              kfree(argv);
++                              return -ENOMEM;
++                      }
++
++                      memcpy(argv2, argv, sizeof(*argv) * *argc);
++                      kfree(argv);
++                      argv = argv2;
++              }
 +
 +              /* we know this is whitespace */
 +              if (*end)
@@ -6858,6 +6861,7 @@ diff -ruN linux-2.4.21-dm-real/drivers/md/dm-table.c linux-2.4.21/drivers/md/dm-
 +              (*argc)++;
 +      }
 +
++      *argvp = argv;
 +      return 0;
 +}
 +
@@ -6865,7 +6869,7 @@ diff -ruN linux-2.4.21-dm-real/drivers/md/dm-table.c linux-2.4.21/drivers/md/dm-
 +                      sector_t start, sector_t len, char *params)
 +{
 +      int r = -EINVAL, argc;
-+      char *argv[32];
++      char **argv;
 +      struct dm_target *tgt;
 +
 +      if ((r = check_space(t)))
@@ -6894,13 +6898,14 @@ diff -ruN linux-2.4.21-dm-real/drivers/md/dm-table.c linux-2.4.21/drivers/md/dm-
 +              goto bad;
 +      }
 +
-+      r = split_args(ARRAY_SIZE(argv), &argc, argv, params);
++      r = split_args(&argc, &argv, params);
 +      if (r) {
-+              tgt->error = "couldn't split parameters";
++              tgt->error = "couldn't split parameters (insufficient memory)";
 +              goto bad;
 +      }
 +
 +      r = tgt->type->ctr(tgt, argc, argv);
++      kfree(argv);
 +      if (r)
 +              goto bad;
 +
@@ -7055,9 +7060,8 @@ diff -ruN linux-2.4.21-dm-real/drivers/md/dm-table.c linux-2.4.21/drivers/md/dm-
 +EXPORT_SYMBOL(dm_put_device);
 +EXPORT_SYMBOL(dm_table_event);
 +EXPORT_SYMBOL(dm_table_get_mode);
-diff -ruN linux-2.4.21-dm-real/drivers/md/dm-target.c linux-2.4.21/drivers/md/dm-target.c
---- linux-2.4.21-dm-real/drivers/md/dm-target.c        Thu Jan  1 01:00:00 1970
-+++ linux-2.4.21/drivers/md/dm-target.c        Sat Jul 12 18:14:05 2003
+--- linux-2.4.21/drivers/md/dm-target.c        Thu Jan  1 01:00:00 1970
++++ linux/drivers/md/dm-target.c       Wed Aug 20 14:41:38 2003
 @@ -0,0 +1,188 @@
 +/*
 + * Copyright (C) 2001 Sistina Software (UK) Limited
@@ -7247,9 +7251,8 @@ diff -ruN linux-2.4.21-dm-real/drivers/md/dm-target.c linux-2.4.21/drivers/md/dm
 +
 +EXPORT_SYMBOL(dm_register_target);
 +EXPORT_SYMBOL(dm_unregister_target);
-diff -ruN linux-2.4.21-dm-real/drivers/md/dm.c linux-2.4.21/drivers/md/dm.c
---- linux-2.4.21-dm-real/drivers/md/dm.c       Thu Jan  1 01:00:00 1970
-+++ linux-2.4.21/drivers/md/dm.c       Sat Jul 12 18:14:05 2003
+--- linux-2.4.21/drivers/md/dm.c       Thu Jan  1 01:00:00 1970
++++ linux/drivers/md/dm.c      Wed Aug 20 14:41:38 2003
 @@ -0,0 +1,1115 @@
 +/*
 + * Copyright (C) 2001, 2002 Sistina Software (UK) Limited.
@@ -8366,9 +8369,8 @@ diff -ruN linux-2.4.21-dm-real/drivers/md/dm.c linux-2.4.21/drivers/md/dm.c
 +MODULE_LICENSE("GPL");
 +
 +EXPORT_SYMBOL(dm_kdevname);
-diff -ruN linux-2.4.21-dm-real/drivers/md/dm.h linux-2.4.21/drivers/md/dm.h
---- linux-2.4.21-dm-real/drivers/md/dm.h       Thu Jan  1 01:00:00 1970
-+++ linux-2.4.21/drivers/md/dm.h       Sat Jul 12 18:14:05 2003
+--- linux-2.4.21/drivers/md/dm.h       Thu Jan  1 01:00:00 1970
++++ linux/drivers/md/dm.h      Wed Aug 20 14:41:38 2003
 @@ -0,0 +1,175 @@
 +/*
 + * Internal header file for device mapper
@@ -8545,9 +8547,8 @@ diff -ruN linux-2.4.21-dm-real/drivers/md/dm.h linux-2.4.21/drivers/md/dm.h
 +void dm_snapshot_exit(void);
 +
 +#endif
-diff -ruN linux-2.4.21-dm-real/drivers/md/kcopyd.c linux-2.4.21/drivers/md/kcopyd.c
---- linux-2.4.21-dm-real/drivers/md/kcopyd.c   Thu Jan  1 01:00:00 1970
-+++ linux-2.4.21/drivers/md/kcopyd.c   Sat Jul 12 18:14:05 2003
+--- linux-2.4.21/drivers/md/kcopyd.c   Thu Jan  1 01:00:00 1970
++++ linux/drivers/md/kcopyd.c  Wed Aug 20 14:41:38 2003
 @@ -0,0 +1,650 @@
 +/*
 + * Copyright (C) 2002 Sistina Software (UK) Limited.
@@ -8734,8 +8735,8 @@ diff -ruN linux-2.4.21-dm-real/drivers/md/kcopyd.c linux-2.4.21/drivers/md/kcopy
 +/* FIXME: this should scale with the number of pages */
 +#define MIN_JOBS 512
 +
-+static kmem_cache_t *_job_cache = NULL;
-+static mempool_t *_job_pool = NULL;
++static kmem_cache_t *_job_cache;
++static mempool_t *_job_pool;
 +
 +/*
 + * We maintain three lists of jobs:
@@ -9199,9 +9200,8 @@ diff -ruN linux-2.4.21-dm-real/drivers/md/kcopyd.c linux-2.4.21/drivers/md/kcopy
 +EXPORT_SYMBOL(kcopyd_client_destroy);
 +EXPORT_SYMBOL(kcopyd_copy);
 +EXPORT_SYMBOL(kcopyd_cancel);
-diff -ruN linux-2.4.21-dm-real/drivers/md/kcopyd.h linux-2.4.21/drivers/md/kcopyd.h
---- linux-2.4.21-dm-real/drivers/md/kcopyd.h   Thu Jan  1 01:00:00 1970
-+++ linux-2.4.21/drivers/md/kcopyd.h   Sat Jul 12 18:14:05 2003
+--- linux-2.4.21/drivers/md/kcopyd.h   Thu Jan  1 01:00:00 1970
++++ linux/drivers/md/kcopyd.h  Wed Aug 20 14:41:38 2003
 @@ -0,0 +1,47 @@
 +/*
 + * Copyright (C) 2001 Sistina Software
@@ -9250,9 +9250,8 @@ diff -ruN linux-2.4.21-dm-real/drivers/md/kcopyd.h linux-2.4.21/drivers/md/kcopy
 +              unsigned int flags, kcopyd_notify_fn fn, void *context);
 +
 +#endif
-diff -ruN linux-2.4.21-dm-real/fs/buffer.c linux-2.4.21/fs/buffer.c
---- linux-2.4.21-dm-real/fs/buffer.c   Fri Jun 13 16:32:48 2003
-+++ linux-2.4.21/fs/buffer.c   Sat Jul 12 18:13:56 2003
+--- linux-2.4.21/fs/buffer.c   Fri Jun 13 16:32:48 2003
++++ linux/fs/buffer.c  Wed Aug 20 14:41:32 2003
 @@ -735,6 +735,7 @@
        bh->b_list = BUF_CLEAN;
        bh->b_end_io = handler;
@@ -9261,9 +9260,8 @@ diff -ruN linux-2.4.21-dm-real/fs/buffer.c linux-2.4.21/fs/buffer.c
  }
  
  static void end_buffer_io_async(struct buffer_head * bh, int uptodate)
-diff -ruN linux-2.4.21-dm-real/fs/jbd/journal.c linux-2.4.21/fs/jbd/journal.c
---- linux-2.4.21-dm-real/fs/jbd/journal.c      Fri Jun 13 16:32:48 2003
-+++ linux-2.4.21/fs/jbd/journal.c      Sat Jul 12 18:13:56 2003
+--- linux-2.4.21/fs/jbd/journal.c      Fri Jun 13 16:32:48 2003
++++ linux/fs/jbd/journal.c     Wed Aug 20 14:41:32 2003
 @@ -1802,9 +1802,9 @@
  
                if (buffer_jbd(bh)) {
@@ -9303,9 +9301,8 @@ diff -ruN linux-2.4.21-dm-real/fs/jbd/journal.c linux-2.4.21/fs/jbd/journal.c
                        jh->b_bh = NULL;        /* debug, really */
                        clear_bit(BH_JBD, &bh->b_state);
                        __brelse(bh);
-diff -ruN linux-2.4.21-dm-real/include/linux/device-mapper.h linux-2.4.21/include/linux/device-mapper.h
---- linux-2.4.21-dm-real/include/linux/device-mapper.h Thu Jan  1 01:00:00 1970
-+++ linux-2.4.21/include/linux/device-mapper.h Sat Jul 12 18:14:05 2003
+--- linux-2.4.21/include/linux/device-mapper.h Thu Jan  1 01:00:00 1970
++++ linux/include/linux/device-mapper.h        Wed Aug 20 14:41:38 2003
 @@ -0,0 +1,104 @@
 +/*
 + * Copyright (C) 2001 Sistina Software (UK) Limited.
@@ -9411,9 +9408,8 @@ diff -ruN linux-2.4.21-dm-real/include/linux/device-mapper.h linux-2.4.21/includ
 +int dm_unregister_target(struct target_type *t);
 +
 +#endif                                /* _LINUX_DEVICE_MAPPER_H */
-diff -ruN linux-2.4.21-dm-real/include/linux/dm-ioctl.h linux-2.4.21/include/linux/dm-ioctl.h
---- linux-2.4.21-dm-real/include/linux/dm-ioctl.h      Thu Jan  1 01:00:00 1970
-+++ linux-2.4.21/include/linux/dm-ioctl.h      Sat Jul 12 18:14:05 2003
+--- linux-2.4.21/include/linux/dm-ioctl.h      Thu Jan  1 01:00:00 1970
++++ linux/include/linux/dm-ioctl.h     Wed Aug 20 14:41:38 2003
 @@ -0,0 +1,237 @@
 +/*
 + * Copyright (C) 2001 - 2003 Sistina Software (UK) Limited.
@@ -9624,8 +9620,8 @@ diff -ruN linux-2.4.21-dm-real/include/linux/dm-ioctl.h linux-2.4.21/include/lin
 +
 +#define DM_VERSION_MAJOR      4
 +#define DM_VERSION_MINOR      0
-+#define DM_VERSION_PATCHLEVEL 1
-+#define DM_VERSION_EXTRA      "-ioctl (2003-07-12)"
++#define DM_VERSION_PATCHLEVEL 2
++#define DM_VERSION_EXTRA      "-ioctl (2003-08-19)"
 +
 +/* Status bits */
 +#define DM_READONLY_FLAG      (1 << 0) /* In/Out */
@@ -9652,9 +9648,8 @@ diff -ruN linux-2.4.21-dm-real/include/linux/dm-ioctl.h linux-2.4.21/include/lin
 +#define DM_BUFFER_FULL_FLAG   (1 << 8) /* Out */
 +
 +#endif                                /* _LINUX_DM_IOCTL_H */
-diff -ruN linux-2.4.21-dm-real/include/linux/fs.h linux-2.4.21/include/linux/fs.h
---- linux-2.4.21-dm-real/include/linux/fs.h    Fri Jun 13 16:32:51 2003
-+++ linux-2.4.21/include/linux/fs.h    Sat Jul 12 18:13:56 2003
+--- linux-2.4.21/include/linux/fs.h    Fri Jun 13 16:32:51 2003
++++ linux/include/linux/fs.h   Wed Aug 20 14:41:32 2003
 @@ -263,7 +263,7 @@
        struct page *b_page;            /* the page this bh is mapped to */
        void (*b_end_io)(struct buffer_head *bh, int uptodate); /* I/O completion */
@@ -9664,9 +9659,8 @@ diff -ruN linux-2.4.21-dm-real/include/linux/fs.h linux-2.4.21/include/linux/fs.
        unsigned long b_rsector;        /* Real buffer location on disk */
        wait_queue_head_t b_wait;
  
-diff -ruN linux-2.4.21-dm-real/include/linux/jbd.h linux-2.4.21/include/linux/jbd.h
---- linux-2.4.21-dm-real/include/linux/jbd.h   Fri Jun 13 16:32:51 2003
-+++ linux-2.4.21/include/linux/jbd.h   Sat Jul 12 18:13:56 2003
+--- linux-2.4.21/include/linux/jbd.h   Fri Jun 13 16:32:51 2003
++++ linux/include/linux/jbd.h  Wed Aug 20 14:41:32 2003
 @@ -311,7 +311,7 @@
  
  static inline struct journal_head *bh2jh(struct buffer_head *bh)
@@ -9676,9 +9670,8 @@ diff -ruN linux-2.4.21-dm-real/include/linux/jbd.h linux-2.4.21/include/linux/jb
  }
  
  #define HAVE_JOURNAL_CALLBACK_STATUS
-diff -ruN linux-2.4.21-dm-real/include/linux/mempool.h linux-2.4.21/include/linux/mempool.h
---- linux-2.4.21-dm-real/include/linux/mempool.h       Thu Jan  1 01:00:00 1970
-+++ linux-2.4.21/include/linux/mempool.h       Sat Jul 12 18:14:17 2003
+--- linux-2.4.21/include/linux/mempool.h       Thu Jan  1 01:00:00 1970
++++ linux/include/linux/mempool.h      Wed Aug 20 14:41:48 2003
 @@ -0,0 +1,31 @@
 +/*
 + * memory buffer pool support
@@ -9711,9 +9704,8 @@ diff -ruN linux-2.4.21-dm-real/include/linux/mempool.h linux-2.4.21/include/linu
 +
 +
 +#endif /* _LINUX_MEMPOOL_H */
-diff -ruN linux-2.4.21-dm-real/include/linux/vmalloc.h linux-2.4.21/include/linux/vmalloc.h
---- linux-2.4.21-dm-real/include/linux/vmalloc.h       Fri Jan 10 16:35:58 2003
-+++ linux-2.4.21/include/linux/vmalloc.h       Sat Jul 12 18:14:25 2003
+--- linux-2.4.21/include/linux/vmalloc.h       Fri Jan 10 16:35:58 2003
++++ linux/include/linux/vmalloc.h      Wed Aug 20 14:41:57 2003
 @@ -26,6 +26,7 @@
  extern void vmfree_area_pages(unsigned long address, unsigned long size);
  extern int vmalloc_area_pages(unsigned long address, unsigned long size,
@@ -9722,9 +9714,8 @@ diff -ruN linux-2.4.21-dm-real/include/linux/vmalloc.h linux-2.4.21/include/linu
  
  /*
   *    Allocate any pages
-diff -ruN linux-2.4.21-dm-real/kernel/ksyms.c linux-2.4.21/kernel/ksyms.c
---- linux-2.4.21-dm-real/kernel/ksyms.c        Fri Jun 13 16:32:52 2003
-+++ linux-2.4.21/kernel/ksyms.c        Sat Jul 12 18:14:25 2003
+--- linux-2.4.21/kernel/ksyms.c        Fri Jun 13 16:32:52 2003
++++ linux/kernel/ksyms.c       Wed Aug 20 14:41:57 2003
 @@ -112,6 +112,7 @@
  EXPORT_SYMBOL(vfree);
  EXPORT_SYMBOL(__vmalloc);
@@ -9733,9 +9724,8 @@ diff -ruN linux-2.4.21-dm-real/kernel/ksyms.c linux-2.4.21/kernel/ksyms.c
  EXPORT_SYMBOL(mem_map);
  EXPORT_SYMBOL(remap_page_range);
  EXPORT_SYMBOL(max_mapnr);
-diff -ruN linux-2.4.21-dm-real/mm/Makefile linux-2.4.21/mm/Makefile
---- linux-2.4.21-dm-real/mm/Makefile   Fri Jan 10 16:36:02 2003
-+++ linux-2.4.21/mm/Makefile   Sat Jul 12 18:14:17 2003
+--- linux-2.4.21/mm/Makefile   Fri Jan 10 16:36:02 2003
++++ linux/mm/Makefile  Wed Aug 20 14:41:48 2003
 @@ -9,12 +9,12 @@
  
  O_TARGET := mm.o
@@ -9751,9 +9741,8 @@ diff -ruN linux-2.4.21-dm-real/mm/Makefile linux-2.4.21/mm/Makefile
  
  obj-$(CONFIG_HIGHMEM) += highmem.o
  
-diff -ruN linux-2.4.21-dm-real/mm/filemap.c linux-2.4.21/mm/filemap.c
---- linux-2.4.21-dm-real/mm/filemap.c  Fri Jun 13 16:33:25 2003
-+++ linux-2.4.21/mm/filemap.c  Sat Jul 12 18:14:21 2003
+--- linux-2.4.21/mm/filemap.c  Fri Jun 13 16:33:25 2003
++++ linux/mm/filemap.c Wed Aug 20 14:41:53 2003
 @@ -1704,8 +1704,10 @@
                        retval = generic_file_direct_IO(READ, filp, buf, count, pos);
                        if (retval > 0)
@@ -9781,9 +9770,8 @@ diff -ruN linux-2.4.21-dm-real/mm/filemap.c linux-2.4.21/mm/filemap.c
  
        if (file->f_flags & O_DIRECT)
                goto o_direct;
-diff -ruN linux-2.4.21-dm-real/mm/mempool.c linux-2.4.21/mm/mempool.c
---- linux-2.4.21-dm-real/mm/mempool.c  Thu Jan  1 01:00:00 1970
-+++ linux-2.4.21/mm/mempool.c  Sat Jul 12 18:14:17 2003
+--- linux-2.4.21/mm/mempool.c  Thu Jan  1 01:00:00 1970
++++ linux/mm/mempool.c Wed Aug 20 14:41:48 2003
 @@ -0,0 +1,299 @@
 +/*
 + *  linux/mm/mempool.c
@@ -10084,9 +10072,8 @@ diff -ruN linux-2.4.21-dm-real/mm/mempool.c linux-2.4.21/mm/mempool.c
 +EXPORT_SYMBOL(mempool_free);
 +EXPORT_SYMBOL(mempool_alloc_slab);
 +EXPORT_SYMBOL(mempool_free_slab);
-diff -ruN linux-2.4.21-dm-real/mm/vmalloc.c linux-2.4.21/mm/vmalloc.c
---- linux-2.4.21-dm-real/mm/vmalloc.c  Fri Jun 13 16:33:25 2003
-+++ linux-2.4.21/mm/vmalloc.c  Sat Jul 12 18:14:25 2003
+--- linux-2.4.21/mm/vmalloc.c  Fri Jun 13 16:33:25 2003
++++ linux/mm/vmalloc.c Wed Aug 20 14:41:57 2003
 @@ -327,3 +327,22 @@
        read_unlock(&vmlist_lock);
        return buf - buf_start;
This page took 0.073501 seconds and 5 git commands to generate.