[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160727105949.3rtlnl2zr4lpsvbc@mac>
Date: Wed, 27 Jul 2016 12:59:49 +0200
From: Roger Pau Monné <roger.pau@...rix.com>
To: Bob Liu <bob.liu@...cle.com>
CC: <linux-kernel@...r.kernel.org>, <xen-devel@...ts.xenproject.org>,
<konrad.wilk@...cle.com>
Subject: Re: [PATCH v3] xen-blkfront: dynamic configuration of per-vbd
resources
On Wed, Jul 27, 2016 at 11:21:25AM +0800, Bob Liu wrote:
[...]
> +static ssize_t dynamic_reconfig_device(struct blkfront_info *info, ssize_t count)
> +{
> + /*
> + * Prevent new requests even to software request queue.
> + */
> + blk_mq_freeze_queue(info->rq);
> +
> + /*
> + * Guarantee no uncompleted reqs.
> + */
I'm also wondering, why do you need to guarantee that there are no
uncompleted requests? The resume procedure is going to call blkif_recover
that will take care of requeuing any unfinished requests that are on the
ring.
> + if (part_in_flight(&info->gd->part0) || info->reconfiguring) {
> + blk_mq_unfreeze_queue(info->rq);
> + pr_err("Dev:%s busy, please retry later.\n", dev_name(&info->xbdev->dev));
> + return -EBUSY;
> + }
Roger.
Powered by blists - more mailing lists