From: Mike Snitzer <snitzer@redhat.com>
To: Scott Bauer <scott.bauer@intel.com>
Cc: Keith Busch <keith.busch@intel.com>,
Heinz Mauelshagen <heinzm@redhat.com>,
dm-devel@redhat.com
Subject: Re: [PATCH v5] dm: add unstriped target
Date: Tue, 19 Dec 2017 15:03:53 -0500 [thread overview]
Message-ID: <20171219200353.GA65364@redhat.com> (raw)
In-Reply-To: <20171219183511.wdbr3kmz5fw2f4lr@sbauer-Z170X-UD5>
On Tue, Dec 19 2017 at 1:35P -0500,
Scott Bauer <scott.bauer@intel.com> wrote:
> On Mon, Dec 18, 2017 at 06:22:33PM -0500, Mike Snitzer wrote:
>
> > + if (sscanf(argv[1], "%llu%c", &start, &dummy) != 1) {
> ^ should be argv[4]
> > + ti->error = "Invalid striped device offset";
> > + goto err;
> > + }
> > + uc->physical_start = start;
>
> Hi Mike,
> Sorry for the bombardment of emails. I think I've fixed the last
> problem. Above is the last issue.
>
> Below is a patch you can apply that will fix up the sector switch, I
> had mentioned in the previous mail, as well as the wrong argv usage
> from above.
>
> I still have not solved the NULL pointer issue, i'll continue to
> investigate that. Unless you have an idea of why that is occuring.
See below for incremental patch that should fix the NULL pointer, please
test and I'll fold it in, along with your incremental.
Thanks!
> You can trigger it without having to create/remove/create. Just a
> creation with a bad (odd length) target length will do it.
>
> If you don't want this patch but want me to do a v6 I can do that as
> well.
I'll take it, no worries on sending out v6.
diff --git a/drivers/md/dm-unstripe.c b/drivers/md/dm-unstripe.c
index b6f641dcbdee..27a8400a96f2 100644
--- a/drivers/md/dm-unstripe.c
+++ b/drivers/md/dm-unstripe.c
@@ -47,7 +47,6 @@ static int unstripe_ctr(struct dm_target *ti, unsigned int argc, char **argv)
sector_t width, tmp_len;
unsigned long long start;
char dummy;
- int r = -EINVAL;
if (argc != 5) {
ti->error = "Invalid number of arguments";
@@ -86,8 +85,7 @@ static int unstripe_ctr(struct dm_target *ti, unsigned int argc, char **argv)
goto err;
}
- r = dm_get_device(ti, argv[3], dm_table_get_mode(ti->table), &uc->dev);
- if (r) {
+ if (dm_get_device(ti, argv[3], dm_table_get_mode(ti->table), &uc->dev))
ti->error = "Couldn't get striped device";
goto err;
}
@@ -124,7 +122,7 @@ static int unstripe_ctr(struct dm_target *ti, unsigned int argc, char **argv)
return 0;
err:
cleanup_unstripe(uc, ti);
- return r;
+ return -EINVAL;
}
static void unstripe_dtr(struct dm_target *ti)
next prev parent reply other threads:[~2017-12-19 20:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-18 18:08 [PATCH v4 0/2] dm unstriped: add new target Heinz Mauelshagen
2017-12-18 18:08 ` [PATCH v4 1/2] dm unstriped: the target Heinz Mauelshagen
2017-12-18 18:08 ` [PATCH v4 2/2] dm unstriped: add documentation for target Heinz Mauelshagen
2017-12-18 23:22 ` [PATCH v5] dm: add unstriped target Mike Snitzer
2017-12-18 23:15 ` Scott Bauer
2017-12-19 17:25 ` Scott Bauer
2017-12-19 18:13 ` Scott Bauer
2017-12-19 18:35 ` Scott Bauer
2017-12-19 20:03 ` Mike Snitzer [this message]
2017-12-19 20:16 ` Scott Bauer
2017-12-19 21:38 ` Mike Snitzer
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=20171219200353.GA65364@redhat.com \
--to=snitzer@redhat.com \
--cc=dm-devel@redhat.com \
--cc=heinzm@redhat.com \
--cc=keith.busch@intel.com \
--cc=scott.bauer@intel.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.