From: Josh Durgin <jdurgin@redhat.com>
To: Ilya Dryomov <idryomov@gmail.com>, ceph-devel@vger.kernel.org
Subject: Re: [PATCH] rbd: report unsupported features to syslog
Date: Wed, 27 Apr 2016 14:14:31 -0700 [thread overview]
Message-ID: <57212BB7.4040901@redhat.com> (raw)
In-Reply-To: <1460748345-3717-1-git-send-email-idryomov@gmail.com>
On 04/15/2016 12:25 PM, Ilya Dryomov wrote:
> ... instead of just returning an error.
>
> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
> ---
> drivers/block/rbd.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
> index 9f1eb00b5e64..78aca585e7e5 100644
> --- a/drivers/block/rbd.c
> +++ b/drivers/block/rbd.c
> @@ -4184,7 +4184,7 @@ static int _rbd_dev_v2_snap_features(struct rbd_device *rbd_dev, u64 snap_id,
> __le64 features;
> __le64 incompat;
> } __attribute__ ((packed)) features_buf = { 0 };
> - u64 incompat;
> + u64 unsup;
> int ret;
>
> ret = rbd_obj_method_sync(rbd_dev, rbd_dev->header_name,
> @@ -4197,9 +4197,12 @@ static int _rbd_dev_v2_snap_features(struct rbd_device *rbd_dev, u64 snap_id,
> if (ret < sizeof (features_buf))
> return -ERANGE;
>
> - incompat = le64_to_cpu(features_buf.incompat);
> - if (incompat & ~RBD_FEATURES_SUPPORTED)
> + unsup = le64_to_cpu(features_buf.incompat) & ~RBD_FEATURES_SUPPORTED;
> + if (unsup) {
> + rbd_warn(rbd_dev, "image uses unsupported features: 0x%llx",
> + unsup);
> return -ENXIO;
> + }
>
> *snap_features = le64_to_cpu(features_buf.features);
>
>
next prev parent reply other threads:[~2016-04-27 21:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-15 19:25 [PATCH] rbd: report unsupported features to syslog Ilya Dryomov
2016-04-27 21:14 ` Josh Durgin [this message]
2016-04-28 16:42 ` Douglas Fuller
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=57212BB7.4040901@redhat.com \
--to=jdurgin@redhat.com \
--cc=ceph-devel@vger.kernel.org \
--cc=idryomov@gmail.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