All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Heinz J . Mauelshagen" <mauelshagen@sistina.com>
To: linux-lvm@sistina.com
Subject: Re: [linux-lvm] Snapshot resizing bug (LVM1)
Date: Thu Feb  6 04:31:02 2003	[thread overview]
Message-ID: <20030206112752.B22450@sistina.com> (raw)
In-Reply-To: <A00B669E-3934-11D7-A9B9-0003937830E4@mac.com>; from dalestephenson@mac.com on Wed, Feb 05, 2003 at 01:07:01PM -0500

Dale,

thanks for finding this bug.
Obviously people don't resize populated snapshots very often or we'ld
seen this one much earlier ;)
Your fix is in LVM_BRANCH_1-0 for everybody to test.

We plan to revert CVS and will announce the change seperately.

Regards,
Heinz    -- The LVM Guy --


On Wed, Feb 05, 2003 at 01:07:01PM -0500, Dale J. Stephenson wrote:
> I've discovered a problem with using lvreduce/lvextend on LVM.  The 
> resized snapshot will have a new exception table and hash table 
> allocated for it.  But lvm_hash_link will be called for these in a loop 
> that depends on the lv_remap_ptr counter passed down from userspace -- 
> which will always be zero.  The result is that existing COW on the 
> snapshot are ignored, and the contents of the snapshot can magically 
> change to reflect the current state of the source volume.  Reboot (or 
> deactivating and reactivating the volume group) should solve the 
> problem, although it may be possible in the meantime to store a new COW 
> exception for a chunk that already has one.
> 
> The fix is simple:
> 
> --- lvm.c.orig  Tue Feb  4 18:36:58 2003
> +++ lvm.c       Tue Feb  4 18:43:26 2003
> @@ -2792,7 +2792,7 @@
>                  old_lv->lv_snapshot_hash_mask =
>                      new_lv->lv_snapshot_hash_mask;
> 
> -               for (e = 0; e < new_lv->lv_remap_ptr; e++)
> +               for (e = 0; e < old_lv->lv_remap_ptr; e++)
>                          lvm_hash_link(new_lv->lv_block_exception + e,
>                                        new_lv->lv_block_exception[e].
>                                        rdev_org,
> 
> As a side note, why not revert the main LVM cvs tree back to LVM 1.0.6? 
>   1.1 is dead.
> 
> Dale J. Stephenson
> dalestephenson@mac.com
> 
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

*** 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
Mauelshagen@Sistina.com                           +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

  reply	other threads:[~2003-02-06  4:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-05 12:08 [linux-lvm] Snapshot resizing bug (LVM1) Dale J. Stephenson
2003-02-06  4:31 ` Heinz J . Mauelshagen [this message]
2003-02-06  6:03   ` Jon Bendtsen
2003-02-06 12:45     ` Heinz J . Mauelshagen
2003-02-12 13:27       ` Debian User
2003-02-13  6:15         ` Heinz J . Mauelshagen
2003-02-13 17:16           ` Heinz J . Mauelshagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030206112752.B22450@sistina.com \
    --to=mauelshagen@sistina.com \
    --cc=linux-lvm@sistina.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.