mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@gmail.com>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: Heinz Diehl <htd@fancy-poultry.org>,
	linux-kernel@vger.kernel.org, martin.petersen@oracle.com,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	dm-devel@redhat.com
Subject: Re: todays git regression (2.6.32-04008.g3ff6a46): lot of device  mapper warnings
Date: Wed, 9 Dec 2009 19:56:46 -0500	[thread overview]
Message-ID: <170fa0d20912091656s31575d0cneaf899e1781bdc16@mail.gmail.com> (raw)
In-Reply-To: <20091209220749.GD8742@kernel.dk>

On Wed, Dec 9, 2009 at 5:07 PM, Jens Axboe <jens.axboe@oracle.com> wrote:
> On Wed, Dec 09 2009, Jens Axboe wrote:
>> On Wed, Dec 09 2009, Heinz Diehl wrote:
>> > On 09.12.2009, Christian Borntraeger wrote:
>> >
>> > > with todays git I got a huge amount of warnings for device mapper:
>> > > device-mapper: uevent: version 1.0.3
>> > > device-mapper: ioctl: 4.15.0-ioctl (2009-04-01) initialised: dm-devel@redhat.com
>> > > device-mapper: table: 252:0: target device dasdf1 is misaligned: physical_block_size=4096, logical_block_size=4096, alignment_offset=0, start=196608
>> > [...]
>> >
>> > > The same devices produce no warning with a 2.6.32 vanilla kernel.
>> >
>> > I have exactly the same here...
>>
>> Can either one of you try and bisect it? I've cc'ed Martin, it's likely
>> one of the io stacking patches that causes this.
>
> Does this work?
>
> diff --git a/block/blk-settings.c b/block/blk-settings.c
> index dd1f1e0..0116d29 100644
> --- a/block/blk-settings.c
> +++ b/block/blk-settings.c
> @@ -554,11 +554,13 @@ int blk_stack_limits(struct queue_limits *t, struct queue_limits *b,
>                ret = -1;
>        }
>
> +#if 0
>        if (offset &&
>            (offset & (b->discard_granularity - 1)) != b->discard_alignment) {
>                t->discard_misaligned = 1;
>                ret = -1;
>        }
> +#endif
>
>        /* If top has no alignment offset, inherit from bottom */
>        if (!t->alignment_offset)

Jens,

It should be noted that Christian (original poster but cc's got
dropped) is using striped LVs.

Striped LVs use blk_limits_io_opt() via drivers/md/dm-stripe.c:stripe_io_hints()

Martin's change for discard alignment (commit: 86b37281) also splits
out the least common multiple code, that was exclusively used for
io_opt, to a new lcm() function in block/blk-settings.c

On the surface I thought this might be the reason for the warnings,
but Martin's lcm() looks perfectly fine; can't see why it would cause
these warnings to appear all of a sudden... but I figured I'd share.

It'll be interesting to see if the discard_granularity block you
#ifdef'd out helps either Christian or Heinz.

Mike

  reply	other threads:[~2009-12-10  0:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-09  9:49 Christian Borntraeger
2009-12-09 21:25 ` Heinz Diehl
2009-12-09 21:45   ` Jens Axboe
2009-12-09 22:07     ` Jens Axboe
2009-12-10  0:56       ` Mike Snitzer [this message]
2009-12-10  1:14         ` Martin K. Petersen
2009-12-11  9:28           ` Christian Borntraeger
2009-12-11 16:47             ` [dm-devel] " Martin K. Petersen
2009-12-10 11:08       ` Christian Borntraeger
2009-12-10 14:08         ` Heinz Diehl
2009-12-12  1:51       ` Christian Kujau
2009-12-15 21:58       ` Christian Kujau
2009-12-15 22:02         ` Jens Axboe
2009-12-15 22:08           ` Martin K. Petersen
2009-12-15 22:16             ` Jens Axboe

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=170fa0d20912091656s31575d0cneaf899e1781bdc16@mail.gmail.com \
    --to=snitzer@gmail.com \
    --cc=borntraeger@de.ibm.com \
    --cc=dm-devel@redhat.com \
    --cc=htd@fancy-poultry.org \
    --cc=jens.axboe@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®