Skip to contentSkip to conversation

Inconsistent LVM code in 2.4.23-rc1

linux-lvm James G. Sack (jim) 2 participants 2 messages Nov 19, 2003

lore
Share & tools
lore
#0 lore raw

[Hope this reaches the right place -- I'm not on any list -- please reply/cc direct]

Linux kernel 2.4.23-rc1 has LVM patched code that differs from LVM 1.0.8 (as well as cvs HEAD) from sistina.com

Q: is the 2.4.23 code OK?
if yes, should it be in cvs
if no, should somebody tell Marcelo?

In essance, there are extra calls to vfree(snap_lv_ptr) at 4 places in lvm_do_vg_create() by virtue of a "goto copy_fault" --AND-- what looks like a correction to vg_ptr->pe_allocated

A simple diff looks like
------------------------
1587,1588c1587
< if (minor >= ABS_MAX_VG) {
< kfree(vg_ptr);
---

Quoted 1 line

if (minor >= ABS_MAX_VG)

1590d1588
< }
1658c1656,1657
< goto copy_fault;
---

Quoted 2 lines
				lvm_do_vg_remove(minor);
				return -EFAULT;

1669c1668,1669
< goto copy_fault;
---

Quoted 2 lines
				lvm_do_vg_remove(minor);
				return -EFAULT;

1679c1679,1680
< goto copy_fault;
---

Quoted 2 lines
			lvm_do_vg_remove(minor);
			return -EFAULT;

1682c1683,1684
< goto copy_fault;
---

Quoted 2 lines
			lvm_do_vg_remove(minor);
			return -EFAULT;

1697,1700d1698
< copy_fault:
< lvm_do_vg_remove(minor);
< vfree(snap_lv_ptr);
< return -EFAULT;
2597c2595
< vg_ptr->pe_allocated -= old_lv->lv_allocated_le;
---

Quoted 1 line
		vg_ptr->pe_allocated -= old_lv->lv_allocated_snapshot_le;

2598a2597

Quoted 1 line
		old_lv->lv_allocated_snapshot_le = new_lv->lv_allocated_le;

---------------------------------------------------------------------------

Regards,
..jim

#1 lore raw
Quoted 7 lines · James G. Sack (jim)

[Hope this reaches the right place -- I'm not on any list -- please reply/cc direct]

Linux kernel 2.4.23-rc1 has LVM patched code that differs from LVM 1.0.8 (as well as cvs HEAD) from sistina.com

Q: is the 2.4.23 code OK?

Yes, use the code in mainline.

Quoted 1 line

if yes, should it be in cvs

Yes.

Will check code differences and get back to Marcelo if necessary.

Regards,
Heinz -- The LVM Guy --

Quoted 45 lines

if no, should somebody tell Marcelo?

In essance, there are extra calls to vfree(snap_lv_ptr) at 4 places in lvm_do_vg_create() by virtue of a "goto copy_fault" --AND-- what looks like a correction to vg_ptr->pe_allocated

A simple diff looks like
------------------------
1587,1588c1587
< if (minor >= ABS_MAX_VG) {
< kfree(vg_ptr);
---

Quoted 1 line

if (minor >= ABS_MAX_VG)

1590d1588
< }
1658c1656,1657
< goto copy_fault;
---

Quoted 2 lines
				lvm_do_vg_remove(minor);
				return -EFAULT;

1669c1668,1669
< goto copy_fault;
---

Quoted 2 lines
				lvm_do_vg_remove(minor);
				return -EFAULT;

1679c1679,1680
< goto copy_fault;
---

Quoted 2 lines
			lvm_do_vg_remove(minor);
			return -EFAULT;

1682c1683,1684
< goto copy_fault;
---

Quoted 2 lines
			lvm_do_vg_remove(minor);
			return -EFAULT;

1697,1700d1698
< copy_fault:
< lvm_do_vg_remove(minor);
< vfree(snap_lv_ptr);
< return -EFAULT;
2597c2595
< vg_ptr->pe_allocated -= old_lv->lv_allocated_le;
---

Quoted 7 lines
Quoted 1 line
		vg_ptr->pe_allocated -= old_lv->lv_allocated_snapshot_le;

2598a2597

Quoted 1 line
		old_lv->lv_allocated_snapshot_le = new_lv->lv_allocated_le;

---------------------------------------------------------------------------

Regards,
..jim

*** 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

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