Linux LVM users
 help / color / mirror / Atom feed
From: "Heinz J . Mauelshagen" <mauelshagen@sistina.com>
To: linux-lvm@sistina.com
Subject: Re: [linux-lvm] Patch for /proc (NOT a bug fix)
Date: Mon May  6 05:33:02 2002	[thread overview]
Message-ID: <20020506123345.C26606@sistina.com> (raw)
In-Reply-To: <2D0AFEFEE711D611923E009027D39F2B02F141@cdserv.meridian-data.com>; from dstephenson@snapserver.com on Wed, May 01, 2002 at 12:34:34PM -0700

Dale,

thanks for offering your patches.

Was away second half of last week and will have a look at them today.

Regards,
Heinz    -- The LVM Guy --


On Wed, May 01, 2002 at 12:34:34PM -0700, Stephenson, Dale wrote:
> This patch doesn't attempt to solve any bugs.  I just wanted to get more
> useful information about snapshots from /proc -- little things like the
> snapshots' actual size, what volume is its source, and how much of its space
> it has used.  Yes, all this information is available from /sbin/lvdisplay
> (except for the *real* allocated LE, which you have to figure by hand).  But
> I like using /proc.
> 
> I put the extra (conditional) lines before the "device:" line because the
> optional stripesize line was already there.
> 
> I'd like to fit the snapshot/snapshot-source bit into the status bits in
> /proc/lvm/global too, but I haven't done it yet.
> 
> Dale J. Stephenson
> steph@snapserver.com
> 
> --- linux/drivers/md/lvm-fs.c.orig	Mon Apr 22 12:14:59 2002
> +++ linux/drivers/md/lvm-fs.c	Mon Apr 22 13:44:03 2002
> @@ -285,6 +285,26 @@
>  		sz += sprintf(page + sz, "stripesize:   %u\n",
>  			      lv->lv_stripesize);
>  	}
> +	if (lv->lv_access & LV_SNAPSHOT) {
> +		sz += sprintf(page + sz, "remap total:  %u\n",
> +			      lv->lv_remap_end * lv->lv_chunk_size / 2);
> +		sz += sprintf(page + sz, "remap used:   %u\n",
> +			      lv->lv_remap_ptr * lv->lv_chunk_size / 2);
> +		sz += sprintf(page + sz, "snapshot LE:  %u\n",
> +			      lv->lv_allocated_snapshot_le);
> +		if (lv->lv_snapshot_org != NULL) {
> +			sz += sprintf(page + sz, "source:       %s\n",
> +				      lv->lv_snapshot_org->lv_name);
> +		}
> +	}
> +	if (lv->lv_access & LV_SNAPSHOT_ORG) {
> +		lv_t *lvp = lv->lv_snapshot_next;
> +		while (lvp != NULL) {
> +			sz += sprintf(page + sz, "source of:    %s\n",
> +				      lvp->lv_name);
> +			lvp = lvp->lv_snapshot_next;
> +		}
> +	}
>  	sz += sprintf(page + sz, "device:       %02u:%02u\n",
>  		      MAJOR(lv->lv_dev), MINOR(lv->lv_dev));
>  
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html

*** 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:[~2002-05-06  5:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-01 14:28 [linux-lvm] Patch for /proc (NOT a bug fix) Stephenson, Dale
2002-05-06  5:33 ` Heinz J . Mauelshagen [this message]
2002-05-06  8:34 ` 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=20020506123345.C26606@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox