From: Alex Elder <elder@ieee.org>
To: Ilya Dryomov <ilya.dryomov@inktank.com>, ceph-devel@vger.kernel.org
Subject: Re: [PATCH 5/8] rbd: harden rbd_dev_refresh() caller
Date: Thu, 24 Jul 2014 08:09:17 -0500 [thread overview]
Message-ID: <53D1057D.4060006@ieee.org> (raw)
In-Reply-To: <1406191369-6746-6-git-send-email-ilya.dryomov@inktank.com>
On 07/24/2014 03:42 AM, Ilya Dryomov wrote:
> Recently discovered watch/notify problems showed that we really can't
> ignore errors in anything refresh related. Alas, currently there is
> not much we can do in response to those errors, except print warnings.
Looks good.
Reviewed-by: Alex Elder <elder@linaro.org>
>
> Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
> ---
> drivers/block/rbd.c | 17 +++++++++++++----
> 1 file changed, 13 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
> index 23df1773ef77..5dd6f5057ef4 100644
> --- a/drivers/block/rbd.c
> +++ b/drivers/block/rbd.c
> @@ -2963,11 +2963,20 @@ static void rbd_watch_cb(u64 ver, u64 notify_id, u8 opcode, void *data)
> dout("%s: \"%s\" notify_id %llu opcode %u\n", __func__,
> rbd_dev->header_name, (unsigned long long)notify_id,
> (unsigned int)opcode);
> +
> + /*
> + * Until adequate refresh error handling is in place, there is
> + * not much we can do here, except warn.
> + *
> + * See http://tracker.ceph.com/issues/5040
> + */
> ret = rbd_dev_refresh(rbd_dev);
> if (ret)
> - rbd_warn(rbd_dev, "header refresh error (%d)\n", ret);
> + rbd_warn(rbd_dev, "refresh failed: %d\n", ret);
>
> - rbd_obj_notify_ack_sync(rbd_dev, notify_id);
> + ret = rbd_obj_notify_ack_sync(rbd_dev, notify_id);
> + if (ret)
> + rbd_warn(rbd_dev, "notify_ack ret %d\n", ret);
> }
>
> /*
> @@ -3724,9 +3733,9 @@ static ssize_t rbd_image_refresh(struct device *dev,
>
> ret = rbd_dev_refresh(rbd_dev);
> if (ret)
> - rbd_warn(rbd_dev, ": manual header refresh error (%d)\n", ret);
> + return ret;
>
> - return ret < 0 ? ret : size;
> + return size;
> }
>
> static DEVICE_ATTR(size, S_IRUGO, rbd_size_show, NULL);
>
next prev parent reply other threads:[~2014-07-24 13:09 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-24 8:42 [PATCH 0/8] wip-overlap Ilya Dryomov
2014-07-24 8:42 ` [PATCH 1/8] rbd: show the entire chain of parent images Ilya Dryomov
2014-07-24 12:31 ` Alex Elder
2014-07-24 12:45 ` Ilya Dryomov
2014-07-24 8:42 ` [PATCH 2/8] rbd: introduce rbd_dev_header_info() Ilya Dryomov
2014-07-24 12:34 ` Alex Elder
2014-07-24 8:42 ` [PATCH 3/8] rbd: remove unnecessary asserts in rbd_dev_image_probe() Ilya Dryomov
2014-07-24 12:40 ` Alex Elder
2014-07-24 8:42 ` [PATCH 4/8] rbd: split rbd_dev_spec_update() into two functions Ilya Dryomov
2014-07-24 12:55 ` Alex Elder
2014-07-24 8:42 ` [PATCH 5/8] rbd: harden rbd_dev_refresh() caller Ilya Dryomov
2014-07-24 13:09 ` Alex Elder [this message]
2014-07-24 8:42 ` [PATCH 6/8] rbd: update mapping size only on refresh Ilya Dryomov
2014-07-24 13:25 ` Alex Elder
2014-07-24 13:46 ` Ilya Dryomov
2014-07-24 15:10 ` Ilya Dryomov
2014-07-25 13:31 ` Alex Elder
2014-07-24 17:59 ` Alex Elder
2014-07-24 8:42 ` [PATCH 7/8] rbd: do not read in parent info before snap context Ilya Dryomov
2014-07-25 8:14 ` Alex Elder
2014-07-25 8:36 ` Ilya Dryomov
2014-07-25 12:46 ` Alex Elder
2014-07-24 8:42 ` [PATCH 8/8] rbd: take snap_id into account when reading in parent info Ilya Dryomov
2014-07-24 18:43 ` 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=53D1057D.4060006@ieee.org \
--to=elder@ieee.org \
--cc=ceph-devel@vger.kernel.org \
--cc=ilya.dryomov@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