Skip to contentSkip to conversation

get_hardblocksize and kernel 2.4.4

linux-lvm Heinz J. Mauelshagen 1 participant 1 message Apr 30, 2001

lore
Share & tools
lore
#0 lore raw

Thanks Gergely for providing this patch.

Will integrate it.

Quoted 35 lines · Gergely Tamas

Hi!

Kernel 2.4.4 changed the get_hardblocksize function into get_hardsect_size. LVM 0.9.1b7(lvm.c) uses get_hardblocksize so the kernel can't be compiled.

The following patch solves this problem ...

Gergely

lvm.c renamed from lvm.c.orig +2 -2
@@ -1791,7 +1791,7 @@
 	int max_hardblocksize = 0, hardblocksize;
 
 	for (le = 0; le < lv->lv_allocated_le; le++) {
-		hardblocksize = get_hardblocksize(lv->lv_current_pe[le].dev);
+		hardblocksize = get_hardsect_size(lv->lv_current_pe[le].dev);
 		if (hardblocksize == 0)
 			hardblocksize = 512;
 		if (hardblocksize > max_hardblocksize)
@@ -1801,7 +1801,7 @@
 	if (lv->lv_access & LV_SNAPSHOT) {
 		for (e = 0; e < lv->lv_remap_end; e++) {
 			hardblocksize =
-				get_hardblocksize(
+				get_hardsect_size(
 					lv->lv_block_exception[e].rdev_new);
 			if (hardblocksize == 0)
 				hardblocksize = 512;

_______________________________________________
linux-lvm mailing list
[email protected]
http://lists.sistina.com/mailman/listinfo/linux-lvm

Signature · 15 lines
Regards,
Heinz    -- The LVM Guy --

*** Software bugs are stupid.
    Nevertheless it needs not so stupid people to solve them ***

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen                                 Sistina Software Inc.
Senior Consultant/Developer                       Am Sonnenhang 11
                                                  56242 Marienrachdorf
                                                  Germany
[email protected]                           +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-