From: Josh Durgin <josh.durgin@inktank.com>
To: Alex Elder <elder@inktank.com>
Cc: ceph-devel@vger.kernel.org
Subject: Re: [PATCH] libceph: fix wrong opcode use in osd_req_encode_op()
Date: Mon, 04 Mar 2013 17:37:22 -0800 [thread overview]
Message-ID: <51354C52.5070705@inktank.com> (raw)
In-Reply-To: <5132AA7F.3000709@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
On 03/02/2013 05:42 PM, Alex Elder wrote:
> The new cases added to osd_req_encode_op() caused a new sparse
> error, which highlighted an existing problem that had been
> overlooked since it was originally checked in. When an unsupported
> opcode is found the destination rather than the source opcode was
> being used in the error message. The two differ in their byte
> order, and we want to be using the one in the source.
>
> Fix the problem in both spots.
>
> Reported-by: Fengguang Wu <fengguang.wu@intel.com>
> Signed-off-by: Alex Elder <elder@inktank.com>
> ---
> net/ceph/osd_client.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> Index: b/net/ceph/osd_client.c
> ===================================================================
> --- a/net/ceph/osd_client.c
> +++ b/net/ceph/osd_client.c
> @@ -258,7 +258,7 @@ static void osd_req_encode_op(struct cep
> dst->watch.flag = src->watch.flag;
> break;
> default:
> - pr_err("unrecognized osd opcode %d\n", dst->op);
> + pr_err("unrecognized osd opcode %d\n", src->op);
> WARN_ON(1);
> break;
> case CEPH_OSD_OP_MAPEXT:
> @@ -316,7 +316,7 @@ static void osd_req_encode_op(struct cep
> case CEPH_OSD_OP_PGLS:
> case CEPH_OSD_OP_PGLS_FILTER:
> pr_err("unsupported osd opcode %s\n",
> - ceph_osd_op_name(dst->op));
> + ceph_osd_op_name(src->op));
> WARN_ON(1);
> break;
> }
prev parent reply other threads:[~2013-03-05 1:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-03 1:42 [PATCH] libceph: fix wrong opcode use in osd_req_encode_op() Alex Elder
2013-03-05 1:37 ` Josh Durgin [this message]
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=51354C52.5070705@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 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.