• R/O
  • HTTP
  • SSH
  • HTTPS

linux-2.4.36: Commit

2.4.36-stable kernel tree


Commit MetaInfo

Revisionc2afbe1daf23e6501914d1ea294660a47ed6172e (tree)
Zeit2007-06-06 15:29:49
AutorWilly Tarreau <w@1wt....>
CommiterWilly Tarreau

Log Message

[PATCH] lvm: do not update extent count if snapshot allocation fails

Fix from RHEL3 U8, explained by Heinz Mauelshagen :

That change makes sure that the extent count *only* gets updated in
case the allocation of the snapshot succeeds. Like you said: proper
error path handling.

Ändern Zusammenfassung

Diff

--- a/drivers/md/lvm.c
+++ b/drivers/md/lvm.c
@@ -2187,10 +2187,6 @@ static int lvm_do_lv_create(int minor, char *lv_name, lv_t * lv)
21872187 lv_ptr->lv_stripesize =
21882188 lv_ptr->lv_snapshot_org->lv_stripesize;
21892189
2190- /* Update the VG PE(s) used by snapshot reserve space. */
2191- vg_ptr->pe_allocated +=
2192- lv_ptr->lv_allocated_snapshot_le;
2193-
21942190 if ((ret =
21952191 lvm_snapshot_alloc(lv_ptr)) != 0) {
21962192 vfree(lv_ptr->lv_block_exception);
@@ -2198,6 +2194,10 @@ static int lvm_do_lv_create(int minor, char *lv_name, lv_t * lv)
21982194 vg_ptr->lv[l] = NULL;
21992195 return ret;
22002196 }
2197+ /* Update the VG PE(s) used by snapshot reserve space. */
2198+ vg_ptr->pe_allocated +=
2199+ lv_ptr->lv_allocated_snapshot_le;
2200+
22012201 for (e = 0; e < lv_ptr->lv_remap_ptr; e++)
22022202 lvm_hash_link(lv_ptr->
22032203 lv_block_exception +
Show on old repository browser