CEPH filesystem development
 help / color / mirror / Atom feed
From: Josh Durgin <josh.durgin@inktank.com>
To: Alex Elder <elder@inktank.com>
Cc: "ceph-devel@vger.kernel.org" <ceph-devel@vger.kernel.org>
Subject: Re: [PATCH REPOST 0/6] rbd: consolidate osd request setup
Date: Wed, 16 Jan 2013 20:25:33 -0800	[thread overview]
Message-ID: <50F77D3D.4080705@inktank.com> (raw)
In-Reply-To: <50E6EF5F.9080200@inktank.com>

On 01/04/2013 07:03 AM, Alex Elder wrote:
> This series consolidates and encapsulates the setup of all
> osd requests into a single function which takes variable
> arguments appropriate for the type of request.  The result
> groups together common code idioms and I think makes the
> spots that build these messages a little easier to read.
>
> 					-Alex
>
> [PATCH REPOST 1/6] rbd: don't assign extent info in rbd_do_request()
> [PATCH REPOST 2/6] rbd: don't assign extent info in rbd_req_sync_op()
> [PATCH REPOST 3/6] rbd: initialize off and len in rbd_create_rw_op()
> [PATCH REPOST 4/6] rbd: define generalized osd request op routines
> [PATCH REPOST 5/6] rbd: move call osd op setup into rbd_osd_req_op_create()
> [PATCH REPOST 6/6] rbd: move remaining osd op setup into
> rbd_osd_req_op_create()

I'm not sure about the varargs approach. It makes it easy to
accidentally use the wrong parameters. What do you think about
replacing calls to rbd_osd_req_create_op() with helpers for the various
kinds of requests that just call rbd_osd_req_create_op() themselves, so
that the arguments can be checked at compile time? This will probably
be more of an issue with multi-op osd requests in the future.

Eventually I think all this osd-request-related stuff should go into
libceph, but that's a cleanup for another day.

In any case, the new structure looks good to me.

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>

  parent reply	other threads:[~2013-01-17  4:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-04 15:03 [PATCH REPOST 0/6] rbd: consolidate osd request setup Alex Elder
2013-01-04 15:05 ` [PATCH REPOST 1/6] rbd: don't assign extent info in rbd_do_request() Alex Elder
2013-01-04 15:06 ` [PATCH REPOST 2/6] rbd: don't assign extent info in rbd_req_sync_op() Alex Elder
2013-01-04 15:06 ` [PATCH REPOST 3/6] rbd: initialize off and len in rbd_create_rw_op() Alex Elder
2013-01-04 15:06 ` [PATCH REPOST 4/6] rbd: define generalized osd request op routines Alex Elder
2013-01-04 15:06 ` [PATCH REPOST 5/6] rbd: move call osd op setup into rbd_osd_req_op_create() Alex Elder
2013-01-04 15:07 ` [PATCH REPOST 6/6] rbd: move remaining " Alex Elder
2013-01-17  4:23   ` Josh Durgin
2013-01-17  4:37     ` Alex Elder
2013-01-17 22:25       ` Alex Elder
2013-01-17  4:25 ` Josh Durgin [this message]
2013-01-17 22:19   ` [PATCH REPOST 0/6] rbd: consolidate osd request setup Alex Elder

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=50F77D3D.4080705@inktank.com \
    --to=josh.durgin@inktank.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=elder@inktank.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