]> sourceware.org Git - dm.git/commitdiff
synch w/ what's in debian; no longer 6 months out of date
authorAndres Salomon <dilinger@voxel.net>
Sun, 1 Sep 2002 23:17:47 +0000 (23:17 +0000)
committerAndres Salomon <dilinger@voxel.net>
Sun, 1 Sep 2002 23:17:47 +0000 (23:17 +0000)
debian/changelog
debian/control
debian/include/linux/device-mapper.h
debian/include/linux/dm-ioctl.h
debian/include/linux/fs.h
debian/kernel-patch-device-mapper.kpatches
debian/libdevmapper0.files
debian/rules

index 4a6c4eaf2d866cbb5f338b99d80ec4a714586df3..86dcd2de645737b205cd4290b110a4126eff46bd 100644 (file)
@@ -1,10 +1,10 @@
-devmapper (0.95.11-1) unstable; urgency=low
+devmapper (0.96.04-1) unstable; urgency=low
 
-  * New upstream release (Beta3).
-  * Update build kernel headers.
-  * Update kpatch (2.4.18 -> 2.4.19-pre8, due to VM bug in 2.4.18).
+  * New upstream release (Beta5).
+  * Update kernel headers to 2.4.19.
+  * Update kpatch to 2.4.19.
 
- -- Andres Salomon <dilinger@mp3revolution.net>  Thu, 23 May 2002 03:34:45 -0500
+ -- Andres Salomon <dilinger@mp3revolution.net>  Thu, 15 Aug 2002 00:26:20 -0400
 
 devmapper (0.95.07-3) unstable; urgency=low
 
index 9545fbf9c9348b5f3e5c52878d7d339621c4efa0..36fb4bcad7f6b88d2c0294f98850fa6c3ed558a3 100644 (file)
@@ -9,7 +9,7 @@ Package: kernel-patch-device-mapper
 Section: devel
 Architecture: any
 Depends: patch
-Suggests: libdevmapper0, kernel-source-2.4.18
+Suggests: libdevmapper0, kernel-source-2.4.19
 Description: The Linux Kernel Device Mapper kernel patch
  The Linux Kernel Device Mapper is the LVM (Linux Logical Volume Management)
  Team's implementation of a minimalistic kernel-space driver that handles
index 2f714278364f4a8a167911f72cb0c64ca7341ad5..c6651efb6400e423aea5990d50d7d0aa0bb2e397 100644 (file)
@@ -7,7 +7,7 @@
 #ifndef _LINUX_DEVICE_MAPPER_H
 #define _LINUX_DEVICE_MAPPER_H
 
-#define DM_DIR "device-mapper" /* Slashes not supported */
+#define DM_DIR "mapper"        /* Slashes not supported */
 #define DM_MAX_TYPE_NAME 16
 #define DM_NAME_LEN 128
 #define DM_UUID_LEN 129
@@ -18,16 +18,18 @@ struct dm_table;
 struct dm_dev;
 typedef unsigned long offset_t;
 
+typedef enum { STATUSTYPE_INFO, STATUSTYPE_TABLE } status_type_t;
 
 /*
  * Prototypes for functions for a target
  */
-typedef int (*dm_ctr_fn)(struct dm_table *t, offset_t b, offset_t l,
-                        int argc, char **argv, void **context);
-typedef void (*dm_dtr_fn)(struct dm_table *t, void *c);
-typedef int (*dm_map_fn)(struct buffer_head *bh, int rw, void *context);
-typedef int (*dm_err_fn)(struct buffer_head *bh, int rw, void *context);
-
+typedef int (*dm_ctr_fn) (struct dm_table *t, offset_t b, offset_t l,
+                         int argc, char **argv, void **context);
+typedef void (*dm_dtr_fn) (struct dm_table *t, void *c);
+typedef int (*dm_map_fn) (struct buffer_head *bh, int rw, void *context);
+typedef int (*dm_err_fn) (struct buffer_head *bh, int rw, void *context);
+typedef int (*dm_status_fn) (status_type_t status_type, char *result,
+                            int maxlen, void *context);
 
 void dm_error(const char *message);
 
@@ -36,7 +38,8 @@ void dm_error(const char *message);
  * are opened/closed correctly
  */
 int dm_table_get_device(struct dm_table *t, const char *path,
-                       offset_t start, offset_t len, struct dm_dev **result);
+                       offset_t start, offset_t len,
+                       int mode, struct dm_dev **result);
 void dm_table_put_device(struct dm_table *table, struct dm_dev *d);
 
 /*
@@ -49,6 +52,7 @@ struct target_type {
        dm_dtr_fn dtr;
        dm_map_fn map;
        dm_err_fn err;
+       dm_status_fn status;
 };
 
 int dm_register_target(struct target_type *t);
index 85d25c902e56c68a97d59e0692e684935547f1d1..68c0246f897c995346ccab3e4f02316e5a6e657c 100644 (file)
@@ -8,6 +8,7 @@
 #define _LINUX_DM_IOCTL_H
 
 #include "device-mapper.h"
+#include <linux/types.h>
 
 /*
  * Implements a traditional ioctl interface to the device mapper.
 
 /*
  * All ioctl arguments consist of a single chunk of memory, with
- * this structure at the start.
+ * this structure at the start.  If a uuid is specified any
+ * lookup (eg. for a DM_INFO) will be done on that, *not* the
+ * name.
  */
 struct dm_ioctl {
-       char version[16];
-
-       unsigned long data_size;        /* total size of data passed in
-                                        * including this struct */
-
-       unsigned long data_start;       /* offset to start of data
-                                        * relative to start of this struct */
+       /*
+        * The version number is made up of three parts:
+        * major - no backward or forward compatibility,
+        * minor - only backwards compatible,
+        * patch - both backwards and forwards compatible.
+        *
+        * All clients of the ioctl interface should fill in the
+        * version number of the interface that they were
+        * compiled with.
+        *
+        * All recognised ioctl commands (ie. those that don't
+        * return -ENOTTY) fill out this field, even if the
+        * command failed.
+        */
+       uint32_t version[3];    /* in/out */
+       uint32_t data_size;     /* total size of data passed in
+                                * including this struct */
 
-       char name[DM_NAME_LEN];         /* device name */
+       uint32_t data_start;    /* offset to start of data
+                                * relative to start of this struct */
 
-       unsigned int target_count;      /* in/out */
-       unsigned int open_count;        /* out */
-       unsigned int flags;             /* in/out */
+       uint32_t target_count;  /* in/out */
+       uint32_t open_count;    /* out */
+       uint32_t flags;         /* in/out */
 
-       __kernel_dev_t dev;             /* in/out */
+       __kernel_dev_t dev;     /* in/out */
 
-       char uuid[DM_UUID_LEN];         /* unique identifier for
-                                        * the block device */
+       char name[DM_NAME_LEN]; /* device name */
+       char uuid[DM_UUID_LEN]; /* unique identifier for
+                                * the block device */
 };
 
 /*
@@ -44,12 +59,16 @@ struct dm_ioctl {
  */
 struct dm_target_spec {
        int32_t status;         /* used when reading from kernel only */
-       unsigned long long sector_start;
-       unsigned long long length;
+       uint64_t sector_start;
+       uint32_t length;
 
-       char target_type[DM_MAX_TYPE_NAME];
+       /*
+        * Offset in bytes (from the start of this struct) to
+        * next target_spec.
+        */
+       uint32_t next;
 
-       unsigned long next;     /* offset in bytes to next target_spec */
+       char target_type[DM_MAX_TYPE_NAME];
 
        /*
         * Parameter string starts immediately after this object.
@@ -62,37 +81,54 @@ struct dm_target_spec {
  * Used to retrieve the target dependencies.
  */
 struct dm_target_deps {
-       unsigned int count;
+       uint32_t count;
 
        __kernel_dev_t dev[0];  /* out */
 };
 
-#define DM_IOCTL 0xfd
-
+/*
+ * If you change this make sure you make the corresponding change
+ * to dm-ioctl.c:lookup_ioctl()
+ */
 enum {
-       DM_CREATE_CMD = 0,
-       DM_REMOVE_CMD,
-       DM_SUSPEND_CMD,
-       DM_RELOAD_CMD,
-       DM_INFO_CMD,
-       DM_RENAME_CMD,
-       DM_VERSION_CMD,
-       DM_DEPS_CMD,
-       DM_REMOVE_ALL_CMD
+       /* Top level cmds */
+       DM_VERSION_CMD = 0,
+       DM_REMOVE_ALL_CMD,
+
+       /* device level cmds */
+       DM_DEV_CREATE_CMD,
+       DM_DEV_REMOVE_CMD,
+       DM_DEV_RELOAD_CMD,
+       DM_DEV_RENAME_CMD,
+       DM_DEV_SUSPEND_CMD,
+       DM_DEV_DEPS_CMD,
+       DM_DEV_STATUS_CMD,
+
+       /* target level cmds */
+       DM_TARGET_STATUS_CMD,
+       DM_TARGET_WAIT_CMD
 };
 
-#define        DM_CREATE       _IOWR(DM_IOCTL, DM_CREATE_CMD, struct dm_ioctl)
-#define        DM_REMOVE       _IOW(DM_IOCTL, DM_REMOVE_CMD, struct dm_ioctl)
-#define        DM_SUSPEND      _IOW(DM_IOCTL, DM_SUSPEND_CMD, struct dm_ioctl)
-#define        DM_RELOAD       _IOW(DM_IOCTL, DM_RELOAD_CMD, struct dm_ioctl)
-#define DM_INFO                _IOWR(DM_IOCTL, DM_INFO_CMD, struct dm_ioctl)
-#define DM_RENAME      _IOW(DM_IOCTL, DM_RENAME_CMD, struct dm_ioctl)
-#define DM_VERSION     _IOR(DM_IOCTL, DM_VERSION_CMD, struct dm_ioctl)
-#define DM_DEPS                _IOR(DM_IOCTL, DM_DEPS_CMD, struct dm_ioctl)
-#define DM_REMOVE_ALL  _IOR(DM_IOCTL, DM_REMOVE_ALL_CMD, struct dm_ioctl)
+#define DM_IOCTL 0xfd
+
+#define DM_VERSION       _IOWR(DM_IOCTL, DM_VERSION_CMD, struct dm_ioctl)
+#define DM_REMOVE_ALL    _IOWR(DM_IOCTL, DM_REMOVE_ALL_CMD, struct dm_ioctl)
+
+#define DM_DEV_CREATE    _IOWR(DM_IOCTL, DM_DEV_CREATE_CMD, struct dm_ioctl)
+#define DM_DEV_REMOVE    _IOWR(DM_IOCTL, DM_DEV_REMOVE_CMD, struct dm_ioctl)
+#define DM_DEV_RELOAD    _IOWR(DM_IOCTL, DM_DEV_RELOAD_CMD, struct dm_ioctl)
+#define DM_DEV_SUSPEND   _IOWR(DM_IOCTL, DM_DEV_SUSPEND_CMD, struct dm_ioctl)
+#define DM_DEV_RENAME    _IOWR(DM_IOCTL, DM_DEV_RENAME_CMD, struct dm_ioctl)
+#define DM_DEV_DEPS      _IOWR(DM_IOCTL, DM_DEV_DEPS_CMD, struct dm_ioctl)
+#define DM_DEV_STATUS    _IOWR(DM_IOCTL, DM_DEV_STATUS_CMD, struct dm_ioctl)
 
-#define DM_IOCTL_VERSION "0.94"
-#define DM_DRIVER_VERSION "0.94.10-ioctl (2002-04-23)"
+#define DM_TARGET_STATUS _IOWR(DM_IOCTL, DM_TARGET_STATUS_CMD, struct dm_ioctl)
+#define DM_TARGET_WAIT   _IOWR(DM_IOCTL, DM_TARGET_WAIT_CMD, struct dm_ioctl)
+
+#define DM_VERSION_MAJOR       1
+#define DM_VERSION_MINOR       0
+#define DM_VERSION_PATCHLEVEL  3
+#define DM_VERSION_EXTRA       "-ioctl (2002-08-14)"
 
 /* Status bits */
 #define DM_READONLY_FLAG       0x00000001
@@ -100,4 +136,10 @@ enum {
 #define DM_EXISTS_FLAG         0x00000004
 #define DM_PERSISTENT_DEV_FLAG 0x00000008
 
+/*
+ * Flag passed into ioctl STATUS command to get table information
+ * rather than current status.
+ */
+#define DM_STATUS_TABLE_FLAG   0x00000010
+
 #endif                         /* _LINUX_DM_IOCTL_H */
index 01b25b0cc955275817db2839f9d22cc845bf3fd0..4f92bc3c73b5553519cd83b138923a17d4519097 100644 (file)
@@ -217,14 +217,17 @@ enum bh_state_bits {
        BH_New,         /* 1 if the buffer is new and not yet written out */
        BH_Async,       /* 1 if the buffer is under end_buffer_io_async I/O */
        BH_Wait_IO,     /* 1 if we should write out this buffer */
-       BH_launder,     /* 1 if we should throttle on this buffer */
+       BH_Launder,     /* 1 if we can throttle on this buffer */
        BH_JBD,         /* 1 if it has an attached journal_head */
+       BH_Inode,       /* 1 if it is attached to i_dirty[_data]_buffers */
 
        BH_PrivateStart,/* not a state bit, but the first bit available
                         * for private allocation by other entities
                         */
 };
 
+#define MAX_BUF_PER_PAGE (PAGE_CACHE_SIZE / 512)
+
 /*
  * Try to keep the most commonly used fields in single cache lines (16
  * bytes) to improve performance.  This ordering should be
@@ -258,15 +261,11 @@ struct buffer_head {
        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, 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 */
-
+       void *b_private;                /* reserved for b_end_io */
+       void *b_journal_head;           /* ext3 journal_heads */
        unsigned long b_rsector;        /* Real buffer location on disk */
        wait_queue_head_t b_wait;
 
-       struct inode *       b_inode;
        struct list_head     b_inode_buffers;   /* doubly linked list of inode dirty buffers */
 };
 
@@ -282,6 +281,7 @@ void init_buffer(struct buffer_head *, bh_end_io_t *, void *);
 #define buffer_mapped(bh)      __buffer_state(bh,Mapped)
 #define buffer_new(bh)         __buffer_state(bh,New)
 #define buffer_async(bh)       __buffer_state(bh,Async)
+#define buffer_launder(bh)     __buffer_state(bh,Launder)
 
 #define bh_offset(bh)          ((unsigned long)(bh)->b_data & ~PAGE_MASK)
 
@@ -553,6 +553,14 @@ extern int init_private_file(struct file *, struct dentry *, int);
 
 #define        MAX_NON_LFS     ((1UL<<31) - 1)
 
+/* Page cache limit. The filesystems should put that into their s_maxbytes 
+   limits, otherwise bad things can happen in VM. */ 
+#if BITS_PER_LONG==32
+#define MAX_LFS_FILESIZE       (((u64)PAGE_CACHE_SIZE << (BITS_PER_LONG-1))-1) 
+#elif BITS_PER_LONG==64
+#define MAX_LFS_FILESIZE       0x7fffffffffffffff
+#endif
+
 #define FL_POSIX       1
 #define FL_FLOCK       2
 #define FL_BROKEN      4       /* broken flock() emulation */
@@ -987,6 +995,7 @@ extern int unregister_filesystem(struct file_system_type *);
 extern struct vfsmount *kern_mount(struct file_system_type *);
 extern int may_umount(struct vfsmount *);
 extern long do_mount(char *, char *, char *, unsigned long, void *);
+extern void umount_tree(struct vfsmount *);
 
 #define kern_umount mntput
 
@@ -1105,7 +1114,7 @@ extern struct file_operations rdwr_pipe_fops;
 
 extern int fs_may_remount_ro(struct super_block *);
 
-extern int try_to_free_buffers(struct page *, unsigned int);
+extern int FASTCALL(try_to_free_buffers(struct page *, unsigned int));
 extern void refile_buffer(struct buffer_head * buf);
 extern void create_empty_buffers(struct page *, kdev_t, unsigned long);
 extern void end_buffer_io_sync(struct buffer_head *bh, int uptodate);
@@ -1156,9 +1165,13 @@ static inline void mark_buffer_clean(struct buffer_head * bh)
 extern void FASTCALL(__mark_dirty(struct buffer_head *bh));
 extern void FASTCALL(__mark_buffer_dirty(struct buffer_head *bh));
 extern void FASTCALL(mark_buffer_dirty(struct buffer_head *bh));
+extern void FASTCALL(buffer_insert_inode_queue(struct buffer_head *, struct inode *));
 extern void FASTCALL(buffer_insert_inode_data_queue(struct buffer_head *, struct inode *));
 
-#define atomic_set_buffer_dirty(bh) test_and_set_bit(BH_Dirty, &(bh)->b_state)
+static inline int atomic_set_buffer_dirty(struct buffer_head *bh)
+{
+       return test_and_set_bit(BH_Dirty, &bh->b_state);
+}
 
 static inline void mark_buffer_async(struct buffer_head * bh, int on)
 {
@@ -1168,6 +1181,21 @@ static inline void mark_buffer_async(struct buffer_head * bh, int on)
                clear_bit(BH_Async, &bh->b_state);
 }
 
+static inline void set_buffer_inode(struct buffer_head *bh)
+{
+       set_bit(BH_Inode, &bh->b_state);
+}
+
+static inline void clear_buffer_inode(struct buffer_head *bh)
+{
+       clear_bit(BH_Inode, &bh->b_state);
+}
+
+static inline int buffer_inode(struct buffer_head *bh)
+{
+       return test_bit(BH_Inode, &bh->b_state);
+}
+
 /*
  * If an error happens during the make_request, this function
  * has to be recalled. It marks the buffer as clean and not
@@ -1183,7 +1211,6 @@ static inline void buffer_IO_error(struct buffer_head * bh)
        bh->b_end_io(bh, 0);
 }
 
-extern void buffer_insert_inode_queue(struct buffer_head *, struct inode *);
 static inline void mark_buffer_dirty_inode(struct buffer_head *bh, struct inode *inode)
 {
        mark_buffer_dirty(bh);
@@ -1211,10 +1238,15 @@ extern int fsync_dev(kdev_t);
 extern int fsync_super(struct super_block *);
 extern int fsync_no_super(kdev_t);
 extern void sync_inodes_sb(struct super_block *);
-extern int osync_inode_buffers(struct inode *);
-extern int osync_inode_data_buffers(struct inode *);
-extern int fsync_inode_buffers(struct inode *);
-extern int fsync_inode_data_buffers(struct inode *);
+extern int fsync_buffers_list(struct list_head *);
+static inline int fsync_inode_buffers(struct inode *inode)
+{
+       return fsync_buffers_list(&inode->i_dirty_buffers);
+}
+static inline int fsync_inode_data_buffers(struct inode *inode)
+{
+       return fsync_buffers_list(&inode->i_dirty_data_buffers);
+}
 extern int inode_has_buffers(struct inode *);
 extern int filemap_fdatasync(struct address_space *);
 extern int filemap_fdatawait(struct address_space *);
@@ -1368,6 +1400,8 @@ static inline void bforget(struct buffer_head *buf)
                __bforget(buf);
 }
 extern int set_blocksize(kdev_t, int);
+extern int sb_set_blocksize(struct super_block *, int);
+extern int sb_min_blocksize(struct super_block *, int);
 extern struct buffer_head * bread(kdev_t, int, int);
 static inline struct buffer_head * sb_bread(struct super_block *sb, int block)
 {
@@ -1430,7 +1464,12 @@ extern int page_follow_link(struct dentry *, struct nameidata *);
 extern struct inode_operations page_symlink_inode_operations;
 
 extern int vfs_readdir(struct file *, filldir_t, void *);
+extern int dcache_dir_open(struct inode *, struct file *);
+extern int dcache_dir_close(struct inode *, struct file *);
+extern loff_t dcache_dir_lseek(struct file *, loff_t, int);
+extern int dcache_dir_fsync(struct file *, struct dentry *, int);
 extern int dcache_readdir(struct file *, void *, filldir_t);
+extern struct file_operations dcache_dir_ops;
 
 extern struct file_system_type *get_fs_type(const char *name);
 extern struct super_block *get_super(kdev_t);
@@ -1451,11 +1490,9 @@ extern char root_device_name[];
 
 
 extern void show_buffers(void);
-extern void mount_root(void);
 
 #ifdef CONFIG_BLK_DEV_INITRD
 extern unsigned int real_root_dev;
-extern int change_root(kdev_t, const char *);
 #endif
 
 extern ssize_t char_read(struct file *, char *, size_t, loff_t *);
index 7a7bf50a32169cab0c425cc88cef8016e6d2de82..5d039b8233348d110cfeecdde5455df6285ab5f9 100644 (file)
@@ -3,5 +3,5 @@ Patch-id: device-mapper
 Path-strip-level: 1
 Architecture: all
 
-Patch-file: patches/linux-2.4.19-pre8-devmapper-ioctl.patch
-Kernel-version: 2.4.19-pre8
+Patch-file: patches/linux-2.4.19-devmapper-ioctl.patch
+Kernel-version: 2.4.19
index b293877d355f9168c16f0e0f665036bb7f61b6fa..3d863e07592a52bf7a3933cd0b4d2324a64542f7 100644 (file)
@@ -1 +1 @@
-lib/libdevmapper.so.0.95*
+lib/libdevmapper.so*
index 29b73a69b11d6b67ee653d6e5cbe472dc142a377..cf276782a7c1bc2f96daf98b718ef5fd7226d46c 100755 (executable)
@@ -30,15 +30,17 @@ major=2
 #major=`ls src/.libs/lib*.so.* | \
 # awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
 
+KERNEL=2.4.19
+
 header-update:
        # This isn't actually used; it's here for my own personal reference.
-       rm -f debian/include/linux/*.h
-       cd debian && tar jxvf /usr/src/kernel-source-2.4.18.tar.bz2 && \
+       rm -rf debian/include/*
+       cd debian && tar jxvf /usr/src/kernel-source-$(KERNEL).tar.bz2 && \
                        ./scripts/strippatch.pl \
-                       ../patches/linux-2.4.18-devmapper-ioctl.patch | \
-                       ./scripts/includes.pl kernel-source-2.4.18/ | \
+                       ../patches/linux-$(KERNEL)-devmapper-ioctl.patch  | \
+                       ./scripts/includes.pl kernel-source-$(KERNEL)/ | \
                        patch -p1 && \
-                       rm -rf kernel-source-2.4.18
+                       rm -rf kernel-source-$(KERNEL)/
 
 configure: configure-stamp
 configure-stamp:
@@ -50,7 +52,7 @@ configure-stamp:
                        --infodir=\$${prefix}/share/info \
                        --libdir=$(CURDIR)/debian/tmp/lib \
                        --with-kernel-dir=$(CURDIR)/debian \
-                       --with-kernel-version=2.4.18
+                       --with-kernel-version=$(KERNEL)
        touch configure-stamp
 
 build: build-stamp
@@ -86,10 +88,12 @@ install: build
        # Add here commands to install the package into debian/tmp
        $(MAKE) install prefix=$(CURDIR)/debian/tmp/usr
 
-       # libdevmapper-dev should have its .so in /usr.
+       # libdevmapper-dev should have its .so in /usr/lib.
+       rm -f $(CURDIR)/debian/tmp/lib/libdevmapper.so
        install -d $(CURDIR)/debian/tmp/usr/lib
-       ln -s /lib/libdevmapper.so.0.95 \
+       ln -s /lib/libdevmapper.so.0.96 \
                        $(CURDIR)/debian/tmp/usr/lib/libdevmapper.so
+       ln -s libdevmapper.so.0.96 $(CURDIR)/debian/tmp/lib/libdevmapper.so.0
 
 # Build architecture-independent files here.
 binary-indep: build install
This page took 0.046361 seconds and 5 git commands to generate.