Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+18 -20
+1 -8
Documentation/block/bfq-iosched.rst
··· 492 492 it with auto-tuning. An alternative way to achieve this goal is to 493 493 just increase the value of timeout_sync, leaving max_budget equal to 0. 494 494 495 - weights 496 - ------- 497 - 498 - Read-only parameter, used to show the weights of the currently active 499 - BFQ queues. 500 - 501 - 502 495 4. Group scheduling with BFQ 503 496 ============================ 504 497 ··· 559 566 For each group, there is only the following parameter to set. 560 567 561 568 weight (namely blkio.bfq.weight or io.bfq-weight): the weight of the 562 - group inside its parent. Available values: 1..10000 (default 100). The 569 + group inside its parent. Available values: 1..1000 (default 100). The 563 570 linear mapping between ioprio and weights, described at the beginning 564 571 of the tunable section, is still valid, but all weights higher than 565 572 IOPRIO_BE_NR*10 are mapped to ioprio 0.
+2 -2
block/blk-mq.c
··· 828 828 void *priv, bool reserved) 829 829 { 830 830 /* 831 - * If we find a request that is inflight and the queue matches, 831 + * If we find a request that isn't idle and the queue matches, 832 832 * we know the queue is busy. Return false to stop the iteration. 833 833 */ 834 - if (rq->state == MQ_RQ_IN_FLIGHT && rq->q == hctx->queue) { 834 + if (blk_mq_request_started(rq) && rq->q == hctx->queue) { 835 835 bool *busy = priv; 836 836 837 837 *busy = true;
+15 -10
drivers/block/nbd.c
··· 1033 1033 test_bit(NBD_RT_BOUND, &config->runtime_flags))) { 1034 1034 dev_err(disk_to_dev(nbd->disk), 1035 1035 "Device being setup by another task"); 1036 - sockfd_put(sock); 1037 - return -EBUSY; 1036 + err = -EBUSY; 1037 + goto put_socket; 1038 + } 1039 + 1040 + nsock = kzalloc(sizeof(*nsock), GFP_KERNEL); 1041 + if (!nsock) { 1042 + err = -ENOMEM; 1043 + goto put_socket; 1038 1044 } 1039 1045 1040 1046 socks = krealloc(config->socks, (config->num_connections + 1) * 1041 1047 sizeof(struct nbd_sock *), GFP_KERNEL); 1042 1048 if (!socks) { 1043 - sockfd_put(sock); 1044 - return -ENOMEM; 1049 + kfree(nsock); 1050 + err = -ENOMEM; 1051 + goto put_socket; 1045 1052 } 1046 1053 1047 1054 config->socks = socks; 1048 - 1049 - nsock = kzalloc(sizeof(struct nbd_sock), GFP_KERNEL); 1050 - if (!nsock) { 1051 - sockfd_put(sock); 1052 - return -ENOMEM; 1053 - } 1054 1055 1055 1056 nsock->fallback_index = -1; 1056 1057 nsock->dead = false; ··· 1064 1063 atomic_inc(&config->live_connections); 1065 1064 1066 1065 return 0; 1066 + 1067 + put_socket: 1068 + sockfd_put(sock); 1069 + return err; 1067 1070 } 1068 1071 1069 1072 static int nbd_reconnect_socket(struct nbd_device *nbd, unsigned long arg)