All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: device-mapper development <dm-devel@redhat.com>, jens.axboe@oracle.com
Subject: Re: dm: Fix alignment stacking on partitioned devices
Date: Mon, 21 Dec 2009 14:52:04 -0500	[thread overview]
Message-ID: <20091221195204.GA28703@redhat.com> (raw)
In-Reply-To: <yq14onk5iaa.fsf@sermon.lab.mkp.net>

On Mon, Dec 21 2009 at 12:49pm -0500,
Martin K. Petersen <martin.petersen@oracle.com> wrote:

> >>>>> "Mike" == Mike Snitzer <snitzer@redhat.com> writes:
> 
> Mike> This is not required because DM assumes alignment_offset has
> Mike> already been accounted for by the caller (e.g. LVM2 or some other
> Mike> ficitional DM consumer).
> 
> Mike> Below, "start" represents the aligned start of the data for a
> Mike> given volume.  That start must have already been shifted by
> Mike> alignment_offset; as is the case with lvm2 (>= 2.02.51), see the
> Mike> following lvm2 commits:
> Mike> http://sources.redhat.com/git/gitweb.cgi?p=lvm2.git;a=commit;h=282029eb45e56
> Mike> http://sources.redhat.com/git/gitweb.cgi?p=lvm2.git;a=commit;h=6c88b6c660020
> 
> Mike> All this being said, how did you arrive at this patch?  Why do you
> Mike> feel it is needed?  Was it just from code inspection?
> 
> Interesting.
> 
> I have one case in my topology test scripts that prints a DM alignment
> warning with the old stacking algorithm but doesn't with the new one.  A
> bit surprising given that the new approach is much more picky.  MD
> correctly prints a warning for the same device with both algorithms.
> 
> So I added a few printks and noticed that DM was calling the stacking
> function with the same start sector for both devices.  That seemed odd
> because the PV devices are misaligned partitions on the same disk.

That is interesting.

Do you have traces from the kernel with the old stacking function?
(BTW. you don't _need_ kernel traces because the 'dmsetup table' output
gives you the "start").  I have to believe the same "start" values are
being provided regardless of the stacking function.

If that is the case then the data "start" should be different for these
individual PVs (one following the other).  If not, can you provide the
'dmsetup table' output for the associated DM devices?
 
> Note that this was run using an old EL5 LVM toolkit because I'm not
> interested in having userland compensate for any misalignment.

OK, strikes me as odd but you must have your reasons (maybe you're just
testing that the old untrained tools create misaligned partitions, LVs,
etc?).

Mike

  reply	other threads:[~2009-12-21 19:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-18  7:30 [PATCH] dm: Fix alignment stacking on partitioned devices Martin K. Petersen
2009-12-18 17:33 ` Mike Snitzer
2009-12-21 17:49   ` Martin K. Petersen
2009-12-21 19:52     ` Mike Snitzer [this message]
2009-12-22  4:27       ` Martin K. Petersen
2009-12-22 14:32         ` Mike Snitzer
2009-12-22 17:41           ` Martin K. Petersen
2009-12-22 21:42             ` Mike Snitzer
2009-12-22 22:13               ` Mike Snitzer
2009-12-23  6:05               ` Martin K. Petersen
2009-12-23 14:26                 ` Mike Snitzer
2009-12-23 16:33                   ` Martin K. Petersen
2009-12-23 17:13                     ` Mike Snitzer
2009-12-23 20:31                       ` Topology fixes Martin K. Petersen
2009-12-23 20:31                       ` [PATCH 1/2] block: Fix incorrect reporting of partition alignment Martin K. Petersen
2009-12-23 20:31                       ` [PATCH 2/2] block: Fix topology stacking for data and discard alignment Martin K. Petersen

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=20091221195204.GA28703@redhat.com \
    --to=snitzer@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=jens.axboe@oracle.com \
    --cc=martin.petersen@oracle.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.