-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
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
#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
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);
* 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);
/*
dm_dtr_fn dtr;
dm_map_fn map;
dm_err_fn err;
+ dm_status_fn status;
};
int dm_register_target(struct target_type *t);
#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 */
};
/*
*/
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.
* 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
#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 */
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
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 */
};
#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)
#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 */
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
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);
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)
{
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
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);
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 *);
__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)
{
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);
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 *);
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
-lib/libdevmapper.so.0.95*
+lib/libdevmapper.so*
#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:
--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
# 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