All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: Mikulas Patocka <mpatocka@redhat.com>
Cc: Ondrej Kozina <okozina@redhat.com>,
	dm-devel@redhat.com, "Alasdair G. Kergon" <agk@redhat.com>
Subject: Re: dm: check the sector size of underlying device when verifying start
Date: Fri, 10 Aug 2018 11:56:51 -0400	[thread overview]
Message-ID: <20180810155651.GA22384@redhat.com> (raw)
In-Reply-To: <alpine.LRH.2.02.1808101122300.16981@file01.intranet.prod.int.rdu2.redhat.com>

On Fri, Aug 10 2018 at 11:23am -0400,
Mikulas Patocka <mpatocka@redhat.com> wrote:

> It was found out that these commands would fail:
> # modprobe scsi_debug dev_size_mb=128 sector_size=512
> # dmsetup create crypt0 --table "0 245752 crypt cipher_null-ecb - 0 /dev/sda 16385 1 sector_size:4096"
> with the error
> "device-mapper: table: 253:0: start=16385 not aligned to h/w logical block size 4096 of sda"
> 
> The logic incorrectly checks the starting sector offset on the underlying
> device against the block size of the device that is being created.
> 
> This patch fixes it by checking the starting sector offset against the
> block size of the underlying device, not the device that is being created.
> 
> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
> Cc: stable@vger.kernel.org

tweaked like we discussed and staged for 4.19 here:
https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=dm-4.19&id=b2f9960fd34e6dddba7975133b84263a2f594a20

      reply	other threads:[~2018-08-10 15:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-10 15:23 [PATCH] dm: check the sector size of underlying device when verifying start Mikulas Patocka
2018-08-10 15:56 ` Mike Snitzer [this message]

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=20180810155651.GA22384@redhat.com \
    --to=snitzer@redhat.com \
    --cc=agk@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=mpatocka@redhat.com \
    --cc=okozina@redhat.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.