]> sourceware.org Git - dm.git/commitdiff
o b_bdev_private patch for ext3
authorAlasdair Kergon <agk@redhat.com>
Mon, 4 Mar 2002 17:24:21 +0000 (17:24 +0000)
committerAlasdair Kergon <agk@redhat.com>
Mon, 4 Mar 2002 17:24:21 +0000 (17:24 +0000)
o makefiles include snapshot code etc.

kernel/Makefile.in
kernel/common/dm.c.in
patches/ioctl/linux-2.4.16-b_bdev_private.patch [new file with mode: 0644]
patches/ioctl/linux-2.4.16-makefile.patch
patches/ioctl/linux-2.4.17-b_bdev_private.patch [new file with mode: 0644]
patches/ioctl/linux-2.4.17-makefile.patch

index d7eeacc85a948ea885051872b268db5cf1a7456e..d62aa9f3a9d9184b76d75dcda48fa8ac4bccb3d7 100644 (file)
@@ -32,6 +32,7 @@ FS=dmfs-error.c dmfs-lv.c dmfs-root.c dmfs-status.c \
    dmfs-super.c dmfs-suspend.c dmfs-table.c dmfs.h
 
 COMMON=device-mapper.h dm-linear.c dm-stripe.c \
+       dm-mirror.c dm-origin.c dm-snapshot.c kcopyd.c \
        dm-table.c dm-target.c dm.c dm.h
 
 IOCTL=dm-ioctl.c
index 045095bf49d15debd5ed6e5bdd9b98b2453ee9d5..02b5a90b49eea3db97f8cd515f8560aa835b0b48 100644 (file)
@@ -440,7 +440,7 @@ static inline int call_err_fn(struct io_hook *ih, struct buffer_head *bh)
  */
 static void dec_pending(struct buffer_head *bh, int uptodate)
 {
-       struct io_hook *ih = bh->b_private;
+       struct io_hook *ih = bh->b_bdev_private;
 
        if (!uptodate && call_err_fn(ih, bh))
                return;
@@ -450,7 +450,7 @@ static void dec_pending(struct buffer_head *bh, int uptodate)
                wake_up(&ih->md->wait);
 
        bh->b_end_io = ih->end_io;
-       bh->b_private = ih->context;
+       bh->b_bdev_private = ih->context;
        free_io_hook(ih);
 
        bh->b_end_io(bh, uptodate);
@@ -514,7 +514,7 @@ static inline int __map_buffer(struct mapped_device *md,
        ih->rw = rw;
        ih->target = ti;
        ih->end_io = bh->b_end_io;
-       ih->context = bh->b_private;
+       ih->context = bh->b_bdev_private;
 
        r = fn(bh, rw, context);
 
@@ -522,7 +522,7 @@ static inline int __map_buffer(struct mapped_device *md,
                /* hook the end io request fn */
                atomic_inc(&md->pending);
                bh->b_end_io = dec_pending;
-               bh->b_private = ih;
+               bh->b_bdev_private = ih;
 
        } else if (r == 0)
                /* we don't need to hook */
@@ -681,7 +681,7 @@ static int dm_user_bmap(struct inode *inode, struct lv_bmap *lvb)
                return r;
 
        if (put_user(kdev_t_to_nr(r_dev), &lvb->lv_dev) ||
-           put_user(r_block, &lvb->lv_block)) 
+           put_user(r_block, &lvb->lv_block))
                return -EFAULT;
 
        return 0;
diff --git a/patches/ioctl/linux-2.4.16-b_bdev_private.patch b/patches/ioctl/linux-2.4.16-b_bdev_private.patch
new file mode 100644 (file)
index 0000000..10ff6cd
--- /dev/null
@@ -0,0 +1,15 @@
+diff -ruN linux-2.4.16/include/linux/fs.h linux/include/linux/fs.h
+--- linux-2.4.16/include/linux/fs.h    Tue Feb 19 15:24:57 2002
++++ linux/include/linux/fs.h   Thu Feb 21 12:34:42 2002
+@@ -257,7 +257,10 @@
+       char * b_data;                  /* pointer to data block */
+       struct page *b_page;            /* the page this bh is mapped to */
+       void (*b_end_io)(struct buffer_head *bh, int uptodate); /* I/O completion */
+-      void *b_private;                /* reserved for b_end_io */
++      void *b_private;                /* reserved for b_end_io, also used by ext3 */
++      void *b_bdev_private;           /* a hack to get around ext3 using b_private
++                                       * after handing the buffer_head to the
++                                       * block layer */
+       unsigned long b_rsector;        /* Real buffer location on disk */
+       wait_queue_head_t b_wait;
index 055ff73bdb8f65b7cf2dff5a85a1484bc4df9387..a93d0cb5043220ef62ec02fb399753e5539e8400 100644 (file)
@@ -1,20 +1,21 @@
 diff -ruN -X /home/thornber/packages/2.4/dontdiff linux/drivers/md/Makefile linux-dm/drivers/md/Makefile
 --- linux/drivers/md/Makefile  Fri Sep 14 22:22:18 2001
 +++ linux-dm/drivers/md/Makefile       Wed Oct 31 18:09:02 2001
-@@ -4,9 +4,11 @@
+@@ -4,9 +4,12 @@
  
  O_TARGET      := mddev.o
  
 -export-objs   := md.o xor.o
-+export-objs   := md.o xor.o dm-table.o dm-target.o
++export-objs   := md.o xor.o dm-table.o dm-target.o kcopyd.o
  list-multi    := lvm-mod.o
  lvm-mod-objs  := lvm.o lvm-snap.o lvm-fs.o
 +dm-mod-objs   := dm.o dm-table.o dm-target.o dm-ioctl.o \
-+                 dm-linear.o dm-stripe.o
++                 dm-linear.o dm-stripe.o dm-snapshot.o \
++                 dm-origin.o dm-mirror.o kcopyd.o
  
  # Note: link order is important.  All raid personalities
  # and xor.o must come before md.o, as they each initialise 
-@@ -20,8 +22,12 @@
+@@ -20,8 +23,12 @@
  obj-$(CONFIG_MD_MULTIPATH)    += multipath.o
  obj-$(CONFIG_BLK_DEV_MD)      += md.o
  obj-$(CONFIG_BLK_DEV_LVM)     += lvm-mod.o
diff --git a/patches/ioctl/linux-2.4.17-b_bdev_private.patch b/patches/ioctl/linux-2.4.17-b_bdev_private.patch
new file mode 100644 (file)
index 0000000..cedecf9
--- /dev/null
@@ -0,0 +1,15 @@
+diff -ruN linux-2.4.17/include/linux/fs.h linux/include/linux/fs.h
+--- linux-2.4.17/include/linux/fs.h    Tue Feb 19 15:24:57 2002
++++ linux/include/linux/fs.h   Thu Feb 21 12:34:42 2002
+@@ -257,7 +257,10 @@
+       char * b_data;                  /* pointer to data block */
+       struct page *b_page;            /* the page this bh is mapped to */
+       void (*b_end_io)(struct buffer_head *bh, int uptodate); /* I/O completion */
+-      void *b_private;                /* reserved for b_end_io */
++      void *b_private;                /* reserved for b_end_io, also used by ext3 */
++      void *b_bdev_private;           /* a hack to get around ext3 using b_private
++                                       * after handing the buffer_head to the
++                                       * block layer */
+       unsigned long b_rsector;        /* Real buffer location on disk */
+       wait_queue_head_t b_wait;
index 8a475f367df030167a29df510c1a0561f0baea2a..d15bf6cee39dc3f638fd28cfdb91ba8d53b84b43 100644 (file)
@@ -1,20 +1,21 @@
 diff -ruN linux-2.4.17/drivers/md/Makefile linux/drivers/md/Makefile
 --- linux-2.4.17/drivers/md/Makefile   Thu Dec  6 15:57:55 2001
 +++ linux/drivers/md/Makefile  Wed Jan  2 19:25:16 2002
-@@ -4,9 +4,11 @@
+@@ -4,9 +4,12 @@
  
  O_TARGET      := mddev.o
  
 -export-objs   := md.o xor.o
-+export-objs   := md.o xor.o dm-table.o dm-target.o
++export-objs   := md.o xor.o dm-table.o dm-target.o kcopyd.o
  list-multi    := lvm-mod.o
  lvm-mod-objs  := lvm.o lvm-snap.o lvm-fs.o
 +dm-mod-objs   := dm.o dm-table.o dm-target.o dm-ioctl.o \
-+                 dm-linear.o dm-stripe.o
++                 dm-linear.o dm-stripe.o dm-snapshot.o \
++                 dm-origin.o dm-mirror.o kcopyd.o
  
  # Note: link order is important.  All raid personalities
  # and xor.o must come before md.o, as they each initialise 
-@@ -20,8 +22,12 @@
+@@ -20,8 +23,12 @@
  obj-$(CONFIG_MD_MULTIPATH)    += multipath.o
  obj-$(CONFIG_BLK_DEV_MD)      += md.o
  obj-$(CONFIG_BLK_DEV_LVM)     += lvm-mod.o
This page took 0.033189 seconds and 5 git commands to generate.