[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[linux-lvm] Linux 2.4.13-ac7 missing/wrong methods



Hi,

after I'v just installed a new server with Linux 2.4.13-ac7 and LVM
1.0.1-rc4, I'd just wanted to tell you (dear list) that there are two
missing symbols in lvm-snap.c

I've used vanila 2.4.13 applied the ac7 patch, the 2.4.11-vfs... patch
and the LVM patch generated by today (as of about 12:00 GMT) CVS
version.

Patching and comiling worked flawlessly (except for the known bug of
patching Makefile twice and the attemp to remove the lvm-snap.h (IIRC))
but make modules_install failed whith two symbols missing.

After some reading of the code and the patches I've made the inlined
patch. With it everyting works fine (well, for some reasons my initrd
does not work as exspected and I will have to try again later to move to
a LVM root ... (if someone should care, I've nothing but the described
patches applied, but am using devfs))

---------------------------------------------------------------------------
--- linux-2.4.13-ac7-broken/drivers/md/lvm-snap.c	Sun Nov  4 21:51:05 2001
+++ linux-2.4.13-ac7/drivers/md/lvm-snap.c	Sun Nov  4 21:45:14 2001
@@ -542,9 +542,10 @@
 int lvm_snapshot_alloc(lv_t * lv_snap)
 {
 	int ret, max_sectors;
+	int nbhs = KIO_MAX_SECTORS;
 
 	/* allocate kiovec to do chunk io */
-	ret = alloc_kiovec(1, &lv_snap->lv_iobuf);
+	ret = alloc_kiovec_sz(1, &lv_snap->lv_iobuf, &nbhs);
 	if (ret) goto out;
 
 	max_sectors = KIO_MAX_SECTORS << (PAGE_SHIFT-9);
@@ -553,7 +554,7 @@
 	if (ret) goto out_free_kiovec;
 
 	/* allocate kiovec to do exception table io */
-	ret = alloc_kiovec(1, &lv_snap->lv_COW_table_iobuf);
+	ret = alloc_kiovec_sz(1, &lv_snap->lv_COW_table_iobuf, &nbhs);
 	if (ret) goto out_free_kiovec;
 
 	ret = lvm_snapshot_alloc_iobuf_pages(lv_snap->lv_COW_table_iobuf,
@@ -568,12 +569,12 @@
 
 out_free_both_kiovecs:
 	unmap_kiobuf(lv_snap->lv_COW_table_iobuf);
-	free_kiovec(1, &lv_snap->lv_COW_table_iobuf);
+	free_kiovec_sz(1, &lv_snap->lv_COW_table_iobuf, &nbhs);
 	lv_snap->lv_COW_table_iobuf = NULL;
 
 out_free_kiovec:
 	unmap_kiobuf(lv_snap->lv_iobuf);
-	free_kiovec(1, &lv_snap->lv_iobuf);
+	free_kiovec_sz(1, &lv_snap->lv_iobuf, &nbhs);
 	lv_snap->lv_iobuf = NULL;
 	vfree(lv_snap->lv_snapshot_hash_table);
 	lv_snap->lv_snapshot_hash_table = NULL;
@@ -582,6 +583,8 @@
 
 void lvm_snapshot_release(lv_t * lv)
 {
+	int 	nbhs = KIO_MAX_SECTORS;
+
 	if (lv->lv_block_exception)
 	{
 		vfree(lv->lv_block_exception);
@@ -597,14 +600,14 @@
 	{
 	        kiobuf_wait_for_io(lv->lv_iobuf);
 		unmap_kiobuf(lv->lv_iobuf);
-		free_kiovec(1, &lv->lv_iobuf);
+		free_kiovec_sz(1, &lv->lv_iobuf, &nbhs);
 		lv->lv_iobuf = NULL;
 	}
 	if (lv->lv_COW_table_iobuf)
 	{
 	        kiobuf_wait_for_io(lv->lv_COW_table_iobuf);
 		unmap_kiobuf(lv->lv_COW_table_iobuf);
-		free_kiovec(1, &lv->lv_COW_table_iobuf);
+		free_kiovec_sz(1, &lv->lv_COW_table_iobuf, &nbhs);
 		lv->lv_COW_table_iobuf = NULL;
 	}
 }
---------------------------------------------------------------------------

-- 
Goetz Bock                                              IT Consultant
Dipl.-Inf. Univ.

Attachment: pgp00002.pgp
Description: PGP signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]