Re: [PATCH 6/6] dm-stripe: Fix error message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi, thanks for your reply.

I understand what you mean, but that's the reason.
I happened to use something like below via dmsetup

--table '0 100 striped 2 4 /dev/xxx 0 /dev/yyy 0'

and hit this message which is not obvious as long as it says "Target length".
Users have no idea 50/4 was what was really done in kernel space.


2015-10-29 4:51 GMT+09:00 Mike Snitzer <snitzer@xxxxxxxxxx>:
On Tue, Oct 27 2015 at  3:39pm -0400,
Tomohiro Kusumi <kusumi.tomohiro@xxxxxxxxx> wrote:

> The meaning of "not divisible by chunk size" has changed after
> d793e684, so the error message here should probably be using
> "Stripe length" since tmp_len is result of width/stripes, but
> not the whole target device size.
>
> Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@xxxxxxxxx>
> ---
>  drivers/md/dm-stripe.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/md/dm-stripe.c b/drivers/md/dm-stripe.c
> index 797ddb9..85cb09f 100644
> --- a/drivers/md/dm-stripe.c
> +++ b/drivers/md/dm-stripe.c
> @@ -127,7 +127,7 @@ static int stripe_ctr(struct dm_target *ti, unsigned int argc, char **argv)
>
>       tmp_len = width;
>       if (sector_div(tmp_len, chunk_size)) {
> -             ti->error = "Target length not divisible by "
> +             ti->error = "Stripe length not divisible by "
>                   "chunk size";
>               return -EINVAL;
>       }

There is no need for this change.  The user-facing error is more
meaningful.  The only input that is being checked here is the specified
target length.

Dropping this patch.

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel

[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux