mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-29 17:25:38 +00:00
block-5.8-2020-07-10
-----BEGIN PGP SIGNATURE----- iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAl8Ij/kQHGF4Ym9lQGtl cm5lbC5kawAKCRD301j7KXHgprHQD/4rS7rwnzbE0HAYqnxG40Pkzcedsj8DMBSY whlPe016D4tqGuqbudm2crVO8TKPRVhluw+VL85xgDh5Hg09uljjpjCh9q4K8GxF moTNlhrHkg7SC8P6wEUBR4oPA0g8NQ0CLMk9CB+2YmahcyBV1neZKH3oItZniSw5 8GwHDRI0o+FfhpgwuCMGvThQ2q4OLnwVa6rxVFaVgniCB/vjcuRQGLlGTTLIon21 7jRWr950XcbBu0g4fp5jP7bXXEwr/fQDYRk3LNGS3Ku+v0sCzWscpkOrQZxH/xLd l41QQK0dP8dG7GphYGupnlGenqHhLpW+9hrG3nJTt+Y2V16/wdJoFfKgi5wHj1lP ltSnBo+0/V2M3IfzNnLu0khzRl3//65dffZQIJznMqMy7L+ggZfpDm3MKUdxRrmc +yyL5NJmvg1p8CQdky8A22yrIzK6NAyS/rxg1rzdy5PuF+y9z91vcARxorrB0t31 bM89PYLDnUkwT0kGErdU1TtqvW8OEE2kzjJf/sfoRdY9w+ZlD/vzlC8axso1FrjX ep8BBHH7oHPy0q8gYYVUUWdsJSi0DZEHwML7lb+CDIlfE0UVBtOuvLYDfZUrckOg Ahs3Mc7odJ2Am9qESUZQnG5AhkYmVLYhtB5NGeaOMuzDQnfZPrYYrUdvZ6kN7pww c4h7ZSPVUQ== =BZ6W -----END PGP SIGNATURE----- Merge tag 'block-5.8-2020-07-10' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: - Fix for inflight accounting, which affects only dm (Ming) - Fix documentation error for bfq (Yufen) - Fix memory leak for nbd (Zheng) * tag 'block-5.8-2020-07-10' of git://git.kernel.dk/linux-block: nbd: Fix memory leak in nbd_add_socket blk-mq: consider non-idle request as "inflight" in blk_mq_rq_inflight() docs: block: update and fix tiny error for bfq
This commit is contained in:
commit
d33db70274
@ -492,13 +492,6 @@ set max_budget to higher values than those to which BFQ would have set
|
||||
it with auto-tuning. An alternative way to achieve this goal is to
|
||||
just increase the value of timeout_sync, leaving max_budget equal to 0.
|
||||
|
||||
weights
|
||||
-------
|
||||
|
||||
Read-only parameter, used to show the weights of the currently active
|
||||
BFQ queues.
|
||||
|
||||
|
||||
4. Group scheduling with BFQ
|
||||
============================
|
||||
|
||||
@ -566,7 +559,7 @@ Parameters to set
|
||||
For each group, there is only the following parameter to set.
|
||||
|
||||
weight (namely blkio.bfq.weight or io.bfq-weight): the weight of the
|
||||
group inside its parent. Available values: 1..10000 (default 100). The
|
||||
group inside its parent. Available values: 1..1000 (default 100). The
|
||||
linear mapping between ioprio and weights, described at the beginning
|
||||
of the tunable section, is still valid, but all weights higher than
|
||||
IOPRIO_BE_NR*10 are mapped to ioprio 0.
|
||||
|
@ -828,10 +828,10 @@ static bool blk_mq_rq_inflight(struct blk_mq_hw_ctx *hctx, struct request *rq,
|
||||
void *priv, bool reserved)
|
||||
{
|
||||
/*
|
||||
* If we find a request that is inflight and the queue matches,
|
||||
* If we find a request that isn't idle and the queue matches,
|
||||
* we know the queue is busy. Return false to stop the iteration.
|
||||
*/
|
||||
if (rq->state == MQ_RQ_IN_FLIGHT && rq->q == hctx->queue) {
|
||||
if (blk_mq_request_started(rq) && rq->q == hctx->queue) {
|
||||
bool *busy = priv;
|
||||
|
||||
*busy = true;
|
||||
|
@ -1033,25 +1033,26 @@ static int nbd_add_socket(struct nbd_device *nbd, unsigned long arg,
|
||||
test_bit(NBD_RT_BOUND, &config->runtime_flags))) {
|
||||
dev_err(disk_to_dev(nbd->disk),
|
||||
"Device being setup by another task");
|
||||
sockfd_put(sock);
|
||||
return -EBUSY;
|
||||
err = -EBUSY;
|
||||
goto put_socket;
|
||||
}
|
||||
|
||||
nsock = kzalloc(sizeof(*nsock), GFP_KERNEL);
|
||||
if (!nsock) {
|
||||
err = -ENOMEM;
|
||||
goto put_socket;
|
||||
}
|
||||
|
||||
socks = krealloc(config->socks, (config->num_connections + 1) *
|
||||
sizeof(struct nbd_sock *), GFP_KERNEL);
|
||||
if (!socks) {
|
||||
sockfd_put(sock);
|
||||
return -ENOMEM;
|
||||
kfree(nsock);
|
||||
err = -ENOMEM;
|
||||
goto put_socket;
|
||||
}
|
||||
|
||||
config->socks = socks;
|
||||
|
||||
nsock = kzalloc(sizeof(struct nbd_sock), GFP_KERNEL);
|
||||
if (!nsock) {
|
||||
sockfd_put(sock);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
nsock->fallback_index = -1;
|
||||
nsock->dead = false;
|
||||
mutex_init(&nsock->tx_lock);
|
||||
@ -1063,6 +1064,10 @@ static int nbd_add_socket(struct nbd_device *nbd, unsigned long arg,
|
||||
atomic_inc(&config->live_connections);
|
||||
|
||||
return 0;
|
||||
|
||||
put_socket:
|
||||
sockfd_put(sock);
|
||||
return err;
|
||||
}
|
||||
|
||||
static int nbd_reconnect_socket(struct nbd_device *nbd, unsigned long arg)
|
||||
|
Loading…
Reference in New Issue
Block a user