mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 04:33:26 +02:00
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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user