From: "Darrick J. Wong" <djwong@us.ibm.com>
To: device-mapper development <dm-devel@redhat.com>
Subject: Re: [PATCH] dm-striped device sizes must be multiple of chunk-size
Date: Tue, 14 Mar 2006 14:43:43 -0800 [thread overview]
Message-ID: <1142376223.3333.25.camel@localhost.localdomain> (raw)
In-Reply-To: <200603141631.02655.kevcorry@us.ibm.com>
[-- Attachment #1.1: Type: text/plain, Size: 1330 bytes --]
Also, those error messages should read "Target length not divisible...",
not "divisable".
--D
On Tue, 2006-03-14 at 16:31 -0600, Kevin Corry wrote:
> The dm-striped target currently does not enforce that the size of a stripe
> device be a multiple of the chunk-size. Under certain conditions, this can
> lead to I/O requests going off the end of an underlying device. This
> test-case shows one example.
>
> echo "0 100 linear /dev/hdb1 0" | dmsetup create linear0
> echo "0 100 linear /dev/hdb1 100" | dmsetup create linear1
> echo "0 200 striped 2 32 /dev/mapper/linear0 0 /dev/mapper/linear1 0" | \
> dmsetup create stripe0
> dd if=/dev/zero of=/dev/mapper/stripe0 bs=1k
>
> This will produce the output:
> dd: writing '/dev/mapper/stripe0': Input/output error
> 97+0 records in
> 96+0 records out
>
> And in the kernel log will be:
> attempt to access beyond end of device
> dm-0: rw=0, want=104, limit=100
>
> The patch below will check that the table size is a multiple of the stripe
> chunk-size when the table is created, which will prevent the above striped
> device from being created.
>
> This should not effect tools like LVM or EVMS, since in all the cases I can
> think of, striped devices are always created with the sizes being a multiple
> of the chunk-size.
>
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 191 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2006-03-14 22:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-14 22:31 [PATCH] dm-striped device sizes must be multiple of chunk-size Kevin Corry
2006-03-14 22:43 ` Darrick J. Wong [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-03-23 5:28 Joseph Yasi
2006-03-25 4:46 ` Kevin Corry
2006-03-26 0:01 ` Dwaine Garden
2006-05-30 13:14 Peyrotau Yannick
2006-05-31 16:17 Peyrotau Yannick
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=1142376223.3333.25.camel@localhost.localdomain \
--to=djwong@us.ibm.com \
--cc=dm-devel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox