dm and 2.4.21-rc2-xfs
Subsystems (7)
Hi Joe and all the rest on [linux-lvm],
i upgraded my kernel to 2.4.21-rc2-xfs with the dm-patches (dm-2.4.20-10) and had hard crashes on booting while mounting my ext3-boot-partition (don't use xfs for root, var, usr, opt due to earlier problems, for everything other, its the fs of my choice though :-)) .
Any suggestions about patches for the jbd code (there where some changes in it from 2.4.20 to 2.4.21.x and i confess, i'm to lazy finding it out on my own, but, when nobody else did it, beharps i'll have to, booting to ext2 doesn't make me sleep too well :-) ).
My first (hum, and only) try was just leaving all the patches concerning journal_heads to jbh.h and buffer.c (and all the few other i found it in) out. Result was, that i came further, but also to a crash.
Regards
Klaus
Signature · 5 lines
Klaus Strebel UNIX-Engineer [email protected] EIGNER - Precision Lifecycle Management - <http://www.eigner.com>
Quoted 1 line · Klaus Strebel
Any suggestions about patches for the jbd code (there where some changes in it from 2.4.20 to 2.4.21.x and i confess, i'm to lazy finding it out on my own, but, when nobody else did it, beharps i'll have to, booting to ext2 doesn't make me sleep too well :-) ).
Hi all,
got no answer :-( so i investigated myself ... and got it going :-).
Some chages (all stuff around BH_Inode in the buffer_head struct) is allready in the 2.4.21-rc? stuff ( cheer, cheer !) but all with different names (humble humble). The only thing that's needed from the 2.4.20-dm-10/00001.patch is the logic twiggling the usage of b_private out of the journal code. So ... remove the patches against :
fs/buffer.cfs/jbd/journal.cinclude/linux/fs.hinclude/linux/jbd.h
and use this instead :
fs/jbd/journal.c 2002-11-29 09:44:59.000000000 +0000 renamed from fs/jbd/journal.c 2002-11-29 09:36:46.000000000 +0000 +5 -5
@@ -1802,9 +1802,9 @@ if (buffer_jbd(bh)) { /* Someone did it for us! */ - J_ASSERT_BH(bh, bh->b_private != NULL); + J_ASSERT_BH(bh, bh->b_journal_head != NULL); journal_free_journal_head(jh); - jh = bh->b_private; + jh = bh->b_journal_head; } else { /* * We actually don't need jh_splice_lock when
@@ -1812,7 +1812,7 @@ */ spin_lock(&jh_splice_lock); set_bit(BH_JBD, &bh->b_state); - bh->b_private = jh; + bh->b_journal_head = jh; jh->b_bh = bh; atomic_inc(&bh->b_count); spin_unlock(&jh_splice_lock);
@@ -1821,7 +1821,7 @@ } jh->b_jcount++; spin_unlock(&journal_datalist_lock); - return bh->b_private; + return bh->b_journal_head; } /*
@@ -1854,7 +1854,7 @@ J_ASSERT_BH(bh, jh2bh(jh) == bh); BUFFER_TRACE(bh, "remove journal_head"); spin_lock(&jh_splice_lock); - bh->b_private = NULL; + bh->b_journal_head = NULL; jh->b_bh = NULL; /* debug, really */ clear_bit(BH_JBD, &bh->b_state); __brelse(bh);
include/linux/fs.h 2002-11-29 09:44:59.000000000 +0000 renamed from include/linux/fs.h 2002-11-29 09:36:47.000000000 +0000 +0 -0
@@ -267,4 +267,4 @@ void (*b_end_io)(struct buffer_head *bh, int uptodate); /* I/O
completion */
void *b_private; /* reserved for b_end_io */
-
+ void *b_journal_head; /* ext3 journal_heads */
unsigned long b_rsector; /* Real buffer location on disk */
include/linux/jbd.h 2002-11-29 09:44:59.000000000 +0000 renamed from include/linux/jbd.h 2002-11-29 09:36:47.000000000 +0000 +1 -1
@@ -254,7 +254,7 @@ static inline struct journal_head *bh2jh(struct buffer_head *bh) { - return bh->b_private; + return bh->b_journal_head; } #define HAVE_JOURNAL_CALLBACK_STATUS
I added my 00001.patch for 2.4.21-rc?-xfs.
Cheers
Klaus
Signature · 5 lines
Klaus Strebel UNIX-Engineer [email protected] EIGNER - Precision Lifecycle Management - <http://www.eigner.com>
Documentation/Configure.help +14 -0
@@ -1822,6 +1822,20 @@ want), say M here and read <file:Documentation/modules.txt>. The module will be called lvm-mod.o. +Device-mapper support +CONFIG_BLK_DEV_DM + Device-mapper is a low level volume manager. It works by allowing + people to specify mappings for ranges of logical sectors. Various + mapping types are available, in addition people may write their own + modules containing custom mappings if they wish. + + Higher level volume managers such as LVM2 use this driver. + + If you want to compile this as a module, say M here and read + <file:Documentation/modules.txt>. The module will be called dm-mod.o. + + If unsure, say N. + Multiple devices driver support (RAID and LVM) CONFIG_MD Support multiple physical spindles through a single logical device.
MAINTAINERS +7 -0
@@ -439,6 +439,13 @@ W: http://www.debian.org/~dz/i8k/ S: Maintained +DEVICE MAPPER +P: Joe Thornber +M: [email protected] +L: [email protected] +W: http://www.sistina.com/lvm +S: Maintained + DEVICE NUMBER REGISTRY P: H. Peter Anvin M: [email protected]
drivers/md/Config.in +3 -0
@@ -14,5 +14,8 @@ 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 +fi endmenu
drivers/md/Makefile +8 -1
@@ -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 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-snapshot.o dm-exception-store.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 +23,12 @@ obj-$(CONFIG_MD_MULTIPATH) += multipath.o obj-$(CONFIG_BLK_DEV_MD) += md.o obj-$(CONFIG_BLK_DEV_LVM) += lvm-mod.o +obj-$(CONFIG_BLK_DEV_DM) += dm-mod.o include $(TOPDIR)/Rules.make lvm-mod.o: $(lvm-mod-objs) $(LD) -r -o $@ $(lvm-mod-objs) + +dm-mod.o: $(dm-mod-objs) + $(LD) -r -o $@ $(dm-mod-objs)
fs/jbd/journal.c +5 -5
@@ -1802,9 +1802,9 @@if (buffer_jbd (bh)) {/* Someone did it for us! */ -J_ASSERT_BH (bh, bh->b_private !=NULL ); +J_ASSERT_BH (bh, bh->b_journal_head !=NULL );journal_free_journal_head (jh); - jh = bh->b_private; + jh = bh->b_journal_head; }else {/* * We actually don't need jh_splice_lock when
@@ -1812,7 +1812,7 @@*/ spin_lock (&jh_splice_lock);set_bit (BH_JBD , &bh->b_state); - bh->b_private = jh; + bh->b_journal_head = jh; jh->b_bh = bh;atomic_inc (&bh->b_count);spin_unlock (&jh_splice_lock);
@@ -1821,7 +1821,7 @@ } jh->b_jcount++;spin_unlock (&journal_datalist_lock); -return bh->b_private; +return bh->b_journal_head; }/*
@@ -1854,7 +1854,7 @@J_ASSERT_BH (bh,jh2bh (jh) == bh);BUFFER_TRACE (bh,"remove journal_head" );spin_lock (&jh_splice_lock); - bh->b_private =NULL ; + bh->b_journal_head =NULL ; jh->b_bh =NULL ;/* debug, really */ clear_bit (BH_JBD , &bh->b_state);__brelse (bh);
include/linux/fs.h +0 -0
@@ -267,4 +267,4 @@void (*b_end_io)(struct buffer_head *bh,int uptodate);/* I/O completion */
void *b_private; /* reserved for b_end_io */
-
+ void *b_journal_head; /* ext3 journal_heads */
unsigned long b_rsector; /* Real buffer location on disk */
include/linux/jbd.h +1 -1
@@ -254,7 +254,7 @@static inline struct journal_head *bh2jh (struct buffer_head *bh) { -return bh->b_private; +return bh->b_journal_head; }#define HAVE_JOURNAL_CALLBACK_STATUS
include/linux/vmalloc.h +1 -0
@@ -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,int gfp_mask,pgprot_t prot); +extern void *vcalloc (unsigned long nmemb,unsigned long elem_size);/* * Allocate any pages
kernel/ksyms.c +1 -0
@@ -111,6 +111,7 @@EXPORT_SYMBOL (vfree);EXPORT_SYMBOL (__vmalloc);EXPORT_SYMBOL (vmalloc_to_page); +EXPORT_SYMBOL (vcalloc);EXPORT_SYMBOL (mem_map);EXPORT_SYMBOL (remap_page_range);EXPORT_SYMBOL (max_mapnr);
mm/Makefile +2 -2
@@ -9,12 +9,12 @@ O_TARGET := mm.o -export-objs := shmem.o filemap.o memory.o page_alloc.o +export-objs := shmem.o filemap.o memory.o page_alloc.o mempool.o obj-y := memory.o mmap.o filemap.o mprotect.o mlock.o mremap.o \ vmalloc.o slab.o bootmem.o swap.o vmscan.o page_io.o \ page_alloc.o swap_state.o swapfile.o numa.o oom_kill.o \ - shmem.o + shmem.o mempool.o obj-$(CONFIG_HIGHMEM) += highmem.o
mm/vmalloc.c +19 -0
@@ -327,3 +327,22 @@read_unlock (&vmlist_lock);return buf - buf_start; } + +void *vcalloc (unsigned long nmemb,unsigned long elem_size) +{ +unsigned long size; +void *addr; + +/* +* Check that we're not going to overflow. +*/ +if (nmemb > (ULONG_MAX / elem_size)) +return NULL ; + + size = nmemb * elem_size; + addr =vmalloc (size); +if (addr) +memset (addr,0 , size); + +return addr; +}
drivers/md/dm-exception-store.c +701 -0
701 lines not on this page · raw message
drivers/md/dm-ioctl.c +1135 -0
1,135 lines not on this page · raw message
drivers/md/dm-linear.c +120 -0
120 lines not on this page · raw message
drivers/md/dm-snapshot.c +1167 -0
840 lines not on this page · raw message
drivers/md/dm-snapshot.h +147 -0
147 lines not on this page · raw message
drivers/md/dm-stripe.c +256 -0
256 lines not on this page · raw message
drivers/md/dm-table.c +668 -0
668 lines not on this page · raw message
drivers/md/dm-target.c +190 -0
190 lines not on this page · raw message
drivers/md/dm.c +862 -0
862 lines not on this page · raw message
drivers/md/dm.h +151 -0
151 lines not on this page · raw message
drivers/md/kcopyd.c +843 -0
843 lines not on this page · raw message
drivers/md/kcopyd.h +101 -0
101 lines not on this page · raw message
include/linux/device-mapper.h +90 -0
90 lines not on this page · raw message
include/linux/dm-ioctl.h +145 -0
145 lines not on this page · raw message
include/linux/mempool.h +41 -0
41 lines not on this page · raw message
mm/mempool.c +295 -0
295 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.