From: Bharata B Rao <bharata@linux.vnet.ibm.com>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: Amar Tumballi <amarts@redhat.com>,
Anand Avati <aavati@redhat.com>,
qemu-devel@nongnu.org, Vijay Bellur <vbellur@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v3 2/2] block: Support GlusterFS as a QEMU block backend
Date: Sat, 28 Jul 2012 10:13:25 +0530 [thread overview]
Message-ID: <20120728044325.GA7332@in.ibm.com> (raw)
In-Reply-To: <CAAu8pHv7kE51kwcZPeL_d3JmYvN6ur3sfG7mhoYm7BBadE=THw@mail.gmail.com>
On Fri, Jul 27, 2012 at 06:44:04PM +0000, Blue Swirl wrote:
> > +struct GlusterOpts {
>
> static
Sure.
>
> > + bool optional;
> > + char defval[10];
>
> const char *defval?
Sure I could.
>
> > + char *value;
> > +} GlusterOpts[] = {
> > + {false, "", NULL },
> > + {false, "", NULL },
> > + {true, "0", NULL },
> > + {true, "socket", NULL },
> > + {false, "", NULL },
> > + {false, "", NULL },
> > +};
> > +
> > + if (i == GOPT_LAST-1 && strlen(q)) {
>
> Spaces around '-'.
checkpatch.pl doesn't enforce this, but I can change.
> > +
> > + port = strtoul(GlusterOpts[GOPT_PORT].value, NULL, 0);
> > + if (port < 0) {
>
> port > 65535 could be bad too.
Actually I am just checking if strtoul gave me a valid integer only
and depending on gluster to flag an error for invalid port number.
But I guess no harm in checking for valid port range here. Is there
a #define equivalent for 65535 ?
>
> > +
> > + fd = glfs_creat(glfs, GlusterOpts[GOPT_IMAGE].value,
> > + O_WRONLY|O_CREAT|O_TRUNC|O_BINARY, S_IRUSR|S_IWUSR);
>
> Spaces around '|'.
Again, checkpatch.pl doesn't enforce this, but I can change.
Thanks for take time to review.
Regards,
Bharata.
next prev parent reply other threads:[~2012-07-28 4:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-25 5:58 [Qemu-devel] [PATCH v3 0/2] GlusterFS support in QEMU - v3 Bharata B Rao
2012-07-25 5:59 ` [Qemu-devel] [PATCH v3 1/2] qemu: Add a config option for GlusterFS as block backend Bharata B Rao
2012-07-25 6:00 ` [Qemu-devel] [PATCH v3 2/2] block: Support GlusterFS as a QEMU " Bharata B Rao
2012-07-27 18:44 ` Blue Swirl
2012-07-28 4:43 ` Bharata B Rao [this message]
2012-07-28 8:23 ` Blue Swirl
2012-07-30 4:46 ` [Qemu-devel] [PATCH v3 0/2] GlusterFS support in QEMU - v3 Bharata B Rao
2012-07-31 8:49 ` Stefan Hajnoczi
2012-07-31 8:12 ` Stefan Hajnoczi
2012-07-31 12:38 ` Bharata B Rao
2012-07-31 12:56 ` Stefan Hajnoczi
2012-07-31 13:13 ` Bharata B Rao
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=20120728044325.GA7332@in.ibm.com \
--to=bharata@linux.vnet.ibm.com \
--cc=aavati@redhat.com \
--cc=amarts@redhat.com \
--cc=blauwirbel@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=vbellur@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;
as well as URLs for NNTP newsgroup(s).