From patchwork Mon Mar 9 21:41:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guoqing Jiang X-Patchwork-Id: 11428113 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E4464139A for ; Mon, 9 Mar 2020 21:42:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C2B6F24649 for ; Mon, 9 Mar 2020 21:42:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=cloud.ionos.com header.i=@cloud.ionos.com header.b="ZBZh/okU" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727077AbgCIVmM (ORCPT ); Mon, 9 Mar 2020 17:42:12 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:34389 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726266AbgCIVmM (ORCPT ); Mon, 9 Mar 2020 17:42:12 -0400 Received: by mail-ed1-f65.google.com with SMTP id c21so13821628edt.1 for ; Mon, 09 Mar 2020 14:42:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloud.ionos.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Nl3ftXdHghC43OEZSA68wd9xadErx72C0gMm8BJ3QBQ=; b=ZBZh/okUemtdK0XIqnmv/gaJXnSMq4udeh3oAb8bb1TvveFjp/RabWUGMowG4MptA/ 6HvbxkVZaaPWLNfm4Lxn9DGlHKlVsDA6Eqz+gcOS8fkkxQvPZK9Z9bIY/6qxmTm5I1/V UMMhlB6vYGI1Acnh7WUVj6R4afUr+0ezbmIz8Y7aM46BHTmeDfXhK3ArxI0xVtqacXVO D0ECYqs5w+MNOyFAx6KiHUU1vPhBzXXLy43C0CYWwZLEfcwbUYSEfNZoJGBanGNsFcLa HWDIHn/SYXfURaRcsgUVJix4aY/BgFyNKHKH8ypifBGpwLSiMQINYGPDzfYl94u9PfWp PlXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Nl3ftXdHghC43OEZSA68wd9xadErx72C0gMm8BJ3QBQ=; b=ENMHam2YCGjXlbo3/u6QqwCm5hvjM+/gzMiJOiwiNUXask3s5rOx21pz9aSqMXpybF 5P5UVuMNB7OJJSEsPFMYFGOL3snJ3vh3tZszIHfYzcTfrUcEKFn5vnYJrG0iCGfT+Aon 7nXI3P+NFsntaLlTXej+0nvtXRw+PQkLmM22OcxxkfZg5wIEO6vqHVGoNkhd/s1i4VP7 mzXGDQtCL9B5wcakKe3G2fFXRB6REnHpJ15N9V2ohLfuUA/gyYVTLaReVaGx+Sj8vNWh VYyQjnM4OY9PbzkPz4g1mslUODBAJDRyBY338dfsLwltJr1ON3gfRal6p7yd4jKaco32 2EVg== X-Gm-Message-State: ANhLgQ2r2ZKY+zcz4Dq8h4P0RzDNktv6S6b9yduQL6/xlPyU9MvaOIKN XkzbC8xrC2Rco3ORYmRo4SOxoQ== X-Google-Smtp-Source: ADFU+vvqCe35qx7Npm9bYwoOqXY+7cGX7hkgUm2qW+bxVVAnycFDAQ3Xxn7l0/R/vnZrRVrS44Ymbg== X-Received: by 2002:a05:6402:310b:: with SMTP id dc11mr18255782edb.122.1583790130421; Mon, 09 Mar 2020 14:42:10 -0700 (PDT) Received: from nb01257.fritz.box ([2001:16b8:4824:700:55b0:6e1e:26ab:27a5]) by smtp.gmail.com with ESMTPSA id g6sm3828488edm.29.2020.03.09.14.42.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Mar 2020 14:42:09 -0700 (PDT) From: Guoqing Jiang To: axboe@kernel.dk Cc: linux-block@vger.kernel.org, Guoqing Jiang Subject: [PATCH V2 1/6] block: fix comment for blk_cloned_rq_check_limits Date: Mon, 9 Mar 2020 22:41:33 +0100 Message-Id: <20200309214138.30770-2-guoqing.jiang@cloud.ionos.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200309214138.30770-1-guoqing.jiang@cloud.ionos.com> References: <20200309214138.30770-1-guoqing.jiang@cloud.ionos.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Since the later description mentioned "checked against the new queue limits", so make the change to avoid confusion. Reviewed-by: Bart Van Assche Reviewed-by: Chaitanya Kulkarni Signed-off-by: Guoqing Jiang --- block/blk-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/blk-core.c b/block/blk-core.c index 089e890ab208..fd43266029be 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -1203,7 +1203,7 @@ EXPORT_SYMBOL(submit_bio); /** * blk_cloned_rq_check_limits - Helper function to check a cloned request - * for new the queue limits + * for the new queue limits * @q: the queue * @rq: the request being checked * From patchwork Mon Mar 9 21:41:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guoqing Jiang X-Patchwork-Id: 11428115 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5095E139A for ; Mon, 9 Mar 2020 21:42:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 314C524655 for ; Mon, 9 Mar 2020 21:42:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=cloud.ionos.com header.i=@cloud.ionos.com header.b="fUYn2DzR" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727079AbgCIVmN (ORCPT ); Mon, 9 Mar 2020 17:42:13 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:36196 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726266AbgCIVmN (ORCPT ); Mon, 9 Mar 2020 17:42:13 -0400 Received: by mail-ed1-f65.google.com with SMTP id a13so13815701edh.3 for ; Mon, 09 Mar 2020 14:42:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloud.ionos.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=4lLh34hcI9Vv1/qu93oMcltt6ZZ1B9e/hOy5aTXC8Fs=; b=fUYn2DzRt125iB1Brx6SUIFF0Xbk8bZqnYEgGK99TpjUrJG9JWMs3FE275voUvAY+E uYS4AhqKy1BW+dKLk3AlYbM6H7THEkqFtT8nyjOJ2Ldu8FEIqZb9v90E5Vt519fZwV1T nbRuCcUcM7BxQ2TOZXswe2UecSmSlf8qNwWuZ9CfeKZk1dhebzZjGkCoZd+7R01zCZMY Wrwkj1QgDr+HxBHS3XYHOXn/dmYf8QW3eysdy70gqMk0wZ5b5320cn8yBj0HyAXqU0ak xffc9tMOxhfABdREn1jeWHy96o7+y5ei2luef0QG0Q7s0w/RAptNwSGr8CzHQr6SGWeI NCaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=4lLh34hcI9Vv1/qu93oMcltt6ZZ1B9e/hOy5aTXC8Fs=; b=bkyEoZtx841egneIbBbluFNNIfIlcJeyZmx5bDLjoWbK9L76mxx2fsfxO/96U22Cyq dsuhLFqVWHDWFn51yLXs7DYU4vbWDuoaAJDZ+s0kBtXaOwmb+O+qzQh4QF2ySLBlCLpF wJ/xwoDsd/oDbV4mYcOQeMRhfd/YwkNxTx1xalE/yBd5XQh1OqMs3pWqREGDcsw34qib LKHYlbYQ5dmRWzxDWu9H9rU/fQhswWoWVjFzZBYuGUNQYEC752FzIIcKru4joI8wRYbI Xv4yBU+Q5GIGS8h8ISnOw7r9ruVwq/JEXjBfPS1gXnv4oLvIEK3e7b0PSiakg/Fv2h/7 z6xg== X-Gm-Message-State: ANhLgQ2+6dK1EAQuOZC2pB+8EccoVVW5UJw4UoQJDoQxDN9DV2//V/bI XlB3hXyCMqYXxto65XT6svSJ9Q== X-Google-Smtp-Source: ADFU+vtFbRI8WUlLApd3ZvppN7Knua51YgwsID9ChUyYlrVyBBrRGR/JU2l5O7tZ1BxnYNBUwGV4Vw== X-Received: by 2002:a50:eb04:: with SMTP id y4mr18539433edp.170.1583790131807; Mon, 09 Mar 2020 14:42:11 -0700 (PDT) Received: from nb01257.fritz.box ([2001:16b8:4824:700:55b0:6e1e:26ab:27a5]) by smtp.gmail.com with ESMTPSA id g6sm3828488edm.29.2020.03.09.14.42.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Mar 2020 14:42:11 -0700 (PDT) From: Guoqing Jiang To: axboe@kernel.dk Cc: linux-block@vger.kernel.org, Guoqing Jiang Subject: [PATCH V2 2/6] block: use bio_{wouldblock,io}_error in direct_make_request Date: Mon, 9 Mar 2020 22:41:34 +0100 Message-Id: <20200309214138.30770-3-guoqing.jiang@cloud.ionos.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200309214138.30770-1-guoqing.jiang@cloud.ionos.com> References: <20200309214138.30770-1-guoqing.jiang@cloud.ionos.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Use the two functions to simplify code. Reviewed-by: Chaitanya Kulkarni Reviewed-by: Bart Van Assche Reviewed-by: Nikolay Borisov Signed-off-by: Guoqing Jiang --- block/blk-core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index fd43266029be..6d36c2ad40ba 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -1121,10 +1121,9 @@ blk_qc_t direct_make_request(struct bio *bio) if (unlikely(blk_queue_enter(q, nowait ? BLK_MQ_REQ_NOWAIT : 0))) { if (nowait && !blk_queue_dying(q)) - bio->bi_status = BLK_STS_AGAIN; + bio_wouldblock_error(bio); else - bio->bi_status = BLK_STS_IOERR; - bio_endio(bio); + bio_io_error(bio); return BLK_QC_T_NONE; } From patchwork Mon Mar 9 21:41:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guoqing Jiang X-Patchwork-Id: 11428117 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EE8A7139A for ; Mon, 9 Mar 2020 21:42:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D07242465A for ; Mon, 9 Mar 2020 21:42:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=cloud.ionos.com header.i=@cloud.ionos.com header.b="D+8Qg09R" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727088AbgCIVmQ (ORCPT ); Mon, 9 Mar 2020 17:42:16 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:38972 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726266AbgCIVmQ (ORCPT ); Mon, 9 Mar 2020 17:42:16 -0400 Received: by mail-ed1-f68.google.com with SMTP id m13so13796524edb.6 for ; Mon, 09 Mar 2020 14:42:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloud.ionos.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=PNMYVTyVQxW/Xuk8DRsaSA6RKwc3tmfh5S/KRiKryIA=; b=D+8Qg09R6q/LhGmAOM4zf9Y3K44eHoBziCMZYu1GSWkjDOj5OmSSRBt8lUB8cxKoSp p9rqKqr1hr5qWPClRqnGr5Jx2BsbeOol6HmLUOQ2CmJ7SnO7/sTQr5BFmzsO7k2qX32f A73gj+jc/X6kGrknM9Tx87tMJ2R0PQcRw9/a2MkWMzj0Q+tx8jkaK5A6WAGQK+qrYDqV AsC5OtUVDdn8UuerqUAjawfmEyhsYXpyp4YzJGNBfbSBwvq9MTPBaiEFOdKRsWbJTe2n uh5TO0H5OKK4wX5b2FS/nkxMinsCZYDvmOVnz8wkeWb4MTqgcFWFHIyK1YXqlQescNZy Hxkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=PNMYVTyVQxW/Xuk8DRsaSA6RKwc3tmfh5S/KRiKryIA=; b=snSKaqNtQ3E3kuIsJMi8HrHA+tx6SGSwHOfOGlge/5YImt9VM1raOUkFnTscn3Del+ 65ejTKD0vf+bpcwlRVMA0FIndBNDKO4I/eY4eVLuDEBINW+ybbFAkwK2nNPPxKA/HO2z yCaFH8mAS6lt4/t6IFt7bzGVF2++LQLCygNnrjKY9ePIewPLU6mEZ8/1oWVJNOMTylbh difCXyq9Y7rTa95EG4brhtDy9nU3TxvofgnqKibmKV0DmC7502XUxuaRAQwXb/sCzmZY AM5fALSGxz3LIEZJ0emfXNpqFWU4rPYF5Nhe0KITkWLzQhbufojOLVskXB4oiUduK3vK /dsA== X-Gm-Message-State: ANhLgQ3G8e+bvLeWRJFmfHf7i24e0NDqpkMcE6q/f5vmMado5197MZ6D wnKcDZo3HpPPQbQEqov9o7JyXg== X-Google-Smtp-Source: ADFU+vs+W7pZMjFzMel2GprIKeFPCgFc9jO5HuA1EMgaCxEEel27cVLYITIDH9A3GUYr+jXe9XYQAg== X-Received: by 2002:a50:9fe2:: with SMTP id c89mr19428710edf.371.1583790133184; Mon, 09 Mar 2020 14:42:13 -0700 (PDT) Received: from nb01257.fritz.box ([2001:16b8:4824:700:55b0:6e1e:26ab:27a5]) by smtp.gmail.com with ESMTPSA id g6sm3828488edm.29.2020.03.09.14.42.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Mar 2020 14:42:12 -0700 (PDT) From: Guoqing Jiang To: axboe@kernel.dk Cc: linux-block@vger.kernel.org, Guoqing Jiang Subject: [PATCH V2 3/6] block: remove redundant setting of QUEUE_FLAG_DYING Date: Mon, 9 Mar 2020 22:41:35 +0100 Message-Id: <20200309214138.30770-4-guoqing.jiang@cloud.ionos.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200309214138.30770-1-guoqing.jiang@cloud.ionos.com> References: <20200309214138.30770-1-guoqing.jiang@cloud.ionos.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Previously, blk_cleanup_queue has called blk_set_queue_dying to set the flag, no need to do it again. Reviewed-by: Chaitanya Kulkarni Reviewed-by: Bart Van Assche Reviewed-by: Nikolay Borisov Signed-off-by: Guoqing Jiang --- block/blk-core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/block/blk-core.c b/block/blk-core.c index 6d36c2ad40ba..883ffda216e4 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -346,7 +346,6 @@ void blk_cleanup_queue(struct request_queue *q) blk_queue_flag_set(QUEUE_FLAG_NOMERGES, q); blk_queue_flag_set(QUEUE_FLAG_NOXMERGES, q); - blk_queue_flag_set(QUEUE_FLAG_DYING, q); /* * Drain all requests queued before DYING marking. Set DEAD flag to From patchwork Mon Mar 9 21:41:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guoqing Jiang X-Patchwork-Id: 11428119 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 231DF1731 for ; Mon, 9 Mar 2020 21:42:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 022D924649 for ; Mon, 9 Mar 2020 21:42:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=cloud.ionos.com header.i=@cloud.ionos.com header.b="Ua/AV2Pw" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727095AbgCIVmR (ORCPT ); Mon, 9 Mar 2020 17:42:17 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:34419 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727085AbgCIVmR (ORCPT ); Mon, 9 Mar 2020 17:42:17 -0400 Received: by mail-ed1-f65.google.com with SMTP id c21so13821883edt.1 for ; Mon, 09 Mar 2020 14:42:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloud.ionos.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=WPN6D+ixHFS4V2sd3bb6fpXub9mV2zJVFHpgTOskRBg=; b=Ua/AV2PwvKgWUM34wUoJYavx3VXuZxZmRSQ3UfUc1eMaiBCApznJvYfZLOqYQOwNyY SSs4NzBJqPSGf6yn/DajptwYYU7awTuE2IK09h2U2xU9ZzacgCSeWH2vJ0qasr9KJ7wK KpqsRM+7OkOHUxRauGt0x8d8wlfVrpxdCSKw+hms6RutrYJca1qTD09TIPbGTr99ZyJa n9JfuY8GFA3953N2Zd9WAvtHUfyyAJT/bLA+dXzXNtEzuXfe3LFtdztzQNKMoUAKIFtx Mzy0bBI09AcK2JrigAoNeEVvWtU4cPeemMptIVNSRRfMDLBeQXTNcUl8BE65bvOmFxVW F3LQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=WPN6D+ixHFS4V2sd3bb6fpXub9mV2zJVFHpgTOskRBg=; b=D4gkSQBsw3oiVsV//LvcRMc+osLgh6uBKUCxoIKDEUdbTVcnWjVjlIsVq/U0BdbCdU iI331N/xKsj84jqJWOuxjXIEYnmkdC3OdzkKrGuOOdIFN95cWNtyV6e+cqg7QEVKisMa wNGZoaxeIzonw8/NUuI9UJ+4xqc0sOjPWM1rPLjWfEe7KbgbiqWnJPCt0/mHhl7yiMeT 0esfshyW/4Wlv5y0qV1+4dnvMofv4ZSlA5bmd5mEtj3Pf2ErUHLuS2rXEtjJ6RnLLB0p pe1CnbkQtq+QL91p+e4t3NTLXvbhjfNwx2hnVmUWWZNyYAHHvYl6eTWaeSPK8mL1JUPf 2KJQ== X-Gm-Message-State: ANhLgQ1VlX/nAQlGvL/EDOukgfFADU7o7VAG8YMe0JTJ1zuX5V0aDKiX 04nvOCkYz2/nN7mUin7phL+juQ== X-Google-Smtp-Source: ADFU+vvtUoGn7yo/CVcin+6Ctu5uQRqaamKvendYKhUo+S37zAMeEibevK68oclcqYySFRzhbYj1JA== X-Received: by 2002:a17:906:5901:: with SMTP id h1mr16863342ejq.108.1583790134313; Mon, 09 Mar 2020 14:42:14 -0700 (PDT) Received: from nb01257.fritz.box ([2001:16b8:4824:700:55b0:6e1e:26ab:27a5]) by smtp.gmail.com with ESMTPSA id g6sm3828488edm.29.2020.03.09.14.42.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Mar 2020 14:42:13 -0700 (PDT) From: Guoqing Jiang To: axboe@kernel.dk Cc: linux-block@vger.kernel.org, Guoqing Jiang Subject: [PATCH V2 4/6] block: cleanup for _blk/blk_rq_prep_clone Date: Mon, 9 Mar 2020 22:41:36 +0100 Message-Id: <20200309214138.30770-5-guoqing.jiang@cloud.ionos.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200309214138.30770-1-guoqing.jiang@cloud.ionos.com> References: <20200309214138.30770-1-guoqing.jiang@cloud.ionos.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Both cmd and sense had been moved to scsi_request, so remove the related comments to avoid confusion. And as Bart suggested, move _blk_rq_prep_clone into the only caller (blk_rq_prep_clone). Signed-off-by: Guoqing Jiang --- block/blk-core.c | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index 883ffda216e4..4433f5276250 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -1581,23 +1581,6 @@ void blk_rq_unprep_clone(struct request *rq) } EXPORT_SYMBOL_GPL(blk_rq_unprep_clone); -/* - * Copy attributes of the original request to the clone request. - * The actual data parts (e.g. ->cmd, ->sense) are not copied. - */ -static void __blk_rq_prep_clone(struct request *dst, struct request *src) -{ - dst->__sector = blk_rq_pos(src); - dst->__data_len = blk_rq_bytes(src); - if (src->rq_flags & RQF_SPECIAL_PAYLOAD) { - dst->rq_flags |= RQF_SPECIAL_PAYLOAD; - dst->special_vec = src->special_vec; - } - dst->nr_phys_segments = src->nr_phys_segments; - dst->ioprio = src->ioprio; - dst->extra_len = src->extra_len; -} - /** * blk_rq_prep_clone - Helper function to setup clone request * @rq: the request to be setup @@ -1610,8 +1593,6 @@ static void __blk_rq_prep_clone(struct request *dst, struct request *src) * * Description: * Clones bios in @rq_src to @rq, and copies attributes of @rq_src to @rq. - * The actual data parts of @rq_src (e.g. ->cmd, ->sense) - * are not copied, and copying such parts is the caller's responsibility. * Also, pages which the original bios are pointing to are not copied * and the cloned bios just point same pages. * So cloned bios must be completed before original bios, which means @@ -1642,7 +1623,16 @@ int blk_rq_prep_clone(struct request *rq, struct request *rq_src, rq->bio = rq->biotail = bio; } - __blk_rq_prep_clone(rq, rq_src); + /* Copy attributes of the original request to the clone request. */ + rq->__sector = blk_rq_pos(rq_src); + rq->__data_len = blk_rq_bytes(rq_src); + if (rq_src->rq_flags & RQF_SPECIAL_PAYLOAD) { + rq->rq_flags |= RQF_SPECIAL_PAYLOAD; + rq->special_vec = rq_src->special_vec; + } + rq->nr_phys_segments = rq_src->nr_phys_segments; + rq->ioprio = rq_src->ioprio; + rq->extra_len = rq_src->extra_len; return 0; From patchwork Mon Mar 9 21:41:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guoqing Jiang X-Patchwork-Id: 11428121 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 42FF01731 for ; Mon, 9 Mar 2020 21:42:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 229322465A for ; Mon, 9 Mar 2020 21:42:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=cloud.ionos.com header.i=@cloud.ionos.com header.b="Iu2nqbPh" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727111AbgCIVmR (ORCPT ); Mon, 9 Mar 2020 17:42:17 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:40550 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727083AbgCIVmR (ORCPT ); Mon, 9 Mar 2020 17:42:17 -0400 Received: by mail-ed1-f68.google.com with SMTP id a13so13787751edu.7 for ; Mon, 09 Mar 2020 14:42:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloud.ionos.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=stEvf+irlg/oXYzll8/KK02iP6wmSBumwpN8cq6fpys=; b=Iu2nqbPhXD0JXWfF/85NHmMvDPY5W1ekWWFNTTQxC0ykmSB8ac4AVzzCrRibtE1TJ8 LC3DRFMe6ZtRUzqwcBBkO3pzrKd5c0ZxnY2ax7GKRehmndLZ6wiexROJYotlCWpb0C+P R1TFKKNMRUqnRpdYv9nF3Y39UVmvqw8zwSmAyjUZ2RSBIpIOJYE02eMjgdgO/9FIQrfn wTbKE/e075W1oh1OEY05f+B84GCLNnj8a8nDiD850U9ur+P/jNkctekP4Gm+GRQbYaj9 uGyHd3JPQkw/ysK9BTEpPDmKUHs887ZpdQ+t94SVsLoyiKClpXCiu39w7o/7UgrsgsBI /Cuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=stEvf+irlg/oXYzll8/KK02iP6wmSBumwpN8cq6fpys=; b=FWMXXlh5N9NzSawup/ViEs/FayMK31LS1p1Rj74ma13oZBrXVPbTEH5rFifEv9lXiq 2XUQ5PwnqpHpXN98/zg2JXF0PQRCrlageZx0LBHBIQw+tV50XnfgHJfp1Qo2Q21TESKV 1adB32Rdpw1ugYVVLh58MSLqyqTJevEvXhp7P24J/Vp2rNQ5L4pwkuQSjALQkeFOVM5M k9D6RPiDqnRVfKtNBFM163X/eMac0YQmIKdOKVxow4MeP8sr6RWWeAOvS7Micb+R7Xm9 3aamLoP4UXiQkk8HpDVn8Jc5fqt+ccioDtqbNNX22/s8OzW7wUGhiAcMWqK9buXzmLfz y4qg== X-Gm-Message-State: ANhLgQ1i+joSj5PNqmsSNMk4txkcPrR3xNrWfNzMjo8RNyBrHXiXCg2W I6NFQaIVjUVP1MJGe6TMXn6f5S7y7sPKSg== X-Google-Smtp-Source: ADFU+vtCQhZWzNqW3mvOf/FSGLHgfSo71o+B8LyxP6L12Nxk+Roc1F946nrKZOU0JoX6WbjStHGB6w== X-Received: by 2002:a05:6402:b3c:: with SMTP id bo28mr14672483edb.284.1583790135438; Mon, 09 Mar 2020 14:42:15 -0700 (PDT) Received: from nb01257.fritz.box ([2001:16b8:4824:700:55b0:6e1e:26ab:27a5]) by smtp.gmail.com with ESMTPSA id g6sm3828488edm.29.2020.03.09.14.42.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Mar 2020 14:42:14 -0700 (PDT) From: Guoqing Jiang To: axboe@kernel.dk Cc: linux-block@vger.kernel.org, Guoqing Jiang Subject: [PATCH V2 5/6] block: remove unneeded argument from blk_alloc_flush_queue Date: Mon, 9 Mar 2020 22:41:37 +0100 Message-Id: <20200309214138.30770-6-guoqing.jiang@cloud.ionos.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200309214138.30770-1-guoqing.jiang@cloud.ionos.com> References: <20200309214138.30770-1-guoqing.jiang@cloud.ionos.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Remove 'q' from arguments since it is not used anymore after commit 7e992f847a08e ("block: remove non mq parts from the flush code"). Reviewed-by: Chaitanya Kulkarni Reviewed-by: Bart Van Assche Reviewed-by: Nikolay Borisov Signed-off-by: Guoqing Jiang --- block/blk-flush.c | 4 ++-- block/blk-mq.c | 3 +-- block/blk.h | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/block/blk-flush.c b/block/blk-flush.c index 5cc775bdb06a..7f7f98305115 100644 --- a/block/blk-flush.c +++ b/block/blk-flush.c @@ -485,8 +485,8 @@ int blkdev_issue_flush(struct block_device *bdev, gfp_t gfp_mask, } EXPORT_SYMBOL(blkdev_issue_flush); -struct blk_flush_queue *blk_alloc_flush_queue(struct request_queue *q, - int node, int cmd_size, gfp_t flags) +struct blk_flush_queue *blk_alloc_flush_queue(int node, int cmd_size, + gfp_t flags) { struct blk_flush_queue *fq; int rq_sz = sizeof(struct request); diff --git a/block/blk-mq.c b/block/blk-mq.c index d92088dec6c3..d855cf860682 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -2409,8 +2409,7 @@ blk_mq_alloc_hctx(struct request_queue *q, struct blk_mq_tag_set *set, init_waitqueue_func_entry(&hctx->dispatch_wait, blk_mq_dispatch_wake); INIT_LIST_HEAD(&hctx->dispatch_wait.entry); - hctx->fq = blk_alloc_flush_queue(q, hctx->numa_node, set->cmd_size, - gfp); + hctx->fq = blk_alloc_flush_queue(hctx->numa_node, set->cmd_size, gfp); if (!hctx->fq) goto free_bitmap; diff --git a/block/blk.h b/block/blk.h index 0b8884353f6b..670337b7cfa0 100644 --- a/block/blk.h +++ b/block/blk.h @@ -55,8 +55,8 @@ is_flush_rq(struct request *req, struct blk_mq_hw_ctx *hctx) return hctx->fq->flush_rq == req; } -struct blk_flush_queue *blk_alloc_flush_queue(struct request_queue *q, - int node, int cmd_size, gfp_t flags); +struct blk_flush_queue *blk_alloc_flush_queue(int node, int cmd_size, + gfp_t flags); void blk_free_flush_queue(struct blk_flush_queue *q); void blk_freeze_queue(struct request_queue *q); From patchwork Mon Mar 9 21:41:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guoqing Jiang X-Patchwork-Id: 11428123 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A2D1D139A for ; Mon, 9 Mar 2020 21:42:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8327E24676 for ; Mon, 9 Mar 2020 21:42:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=cloud.ionos.com header.i=@cloud.ionos.com header.b="Wq9d+aIc" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727080AbgCIVmT (ORCPT ); Mon, 9 Mar 2020 17:42:19 -0400 Received: from mail-ed1-f67.google.com ([209.85.208.67]:38982 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726266AbgCIVmS (ORCPT ); Mon, 9 Mar 2020 17:42:18 -0400 Received: by mail-ed1-f67.google.com with SMTP id m13so13796684edb.6 for ; Mon, 09 Mar 2020 14:42:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloud.ionos.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=k2f3o78q0ZcV57lXckmVVvL2UXXP2J4/4eKg0byCatE=; b=Wq9d+aIcXs5pFMdG0URKQVfGtzNbzq3MHzRtIs2Y5vG9lIBdPI8YMa68iW3Z4JLHkY rcdHf/YE9UWobNY17VMLryazG23Lj/yiJjWEC8x9aiYhT8i7BonNAMrjQZRW7bHiGwL5 TFnx7bZLHMQyh7H/uXVW3qz/BfaUfInbbCJjq6yCm8RUDx0rnLoFo1NLu/0VVXAJ+Hh+ vs0TgmdEg8CTB26XfF2n76d9Iok9z0X8ZzOJbuHMm61ETzgUEpfbLLmR7RHrkTrIqA7z e9ie8XSdq5CE2G/ARRymRq4O02FxGJm94fpY2tVrdzoLDy+kXLum8FODwDYgTJkdOOyT iCkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=k2f3o78q0ZcV57lXckmVVvL2UXXP2J4/4eKg0byCatE=; b=oQFpmGcYx7BlqalKtfj2UybsacWZ5ELQr8McOeCrwSNCI4nCNExNHq4Ugis/mPKjuv hQKOi1iwmhYxqylqa6JN9aQjnI8J/jQd63Z+un3BXYUI36TEc3jxoTLkLTOEwfDQRQ+3 8t7ZIAroP47ShQtalpwDFGCqRjY0dcAZUN0X5dJEaeS/qUxnJZv4bwJ6ywVrUKt7wmzn BpOpYKS6pZ/+JUYlhB+6WiJrNMhyFrbKGrWGKk2XhN1O2dUt1MlD4V2Caw+KmmgnfFQv /aeQq/l6jInEbjjaFat26MzXpSYkTgcQy2Jd/FIcal3zMrG0Q55apSqLRVU6J3ymttVh B/5w== X-Gm-Message-State: ANhLgQ0YfXemwLouSDtgMmV83bpO0ybDdgZBTskTw4O5nam05ZzEB9yp IEdUeqSRuQLalteGPcWuPOHosaF2fauapg== X-Google-Smtp-Source: ADFU+vtxJM+Z6E56JJoIPrBaODjGCF0KNzm2nJXeCrfr1dkBUNJUDl3BgXfi2WboD4R896Pp2rqHMg== X-Received: by 2002:a50:fd89:: with SMTP id o9mr19543167edt.179.1583790136737; Mon, 09 Mar 2020 14:42:16 -0700 (PDT) Received: from nb01257.fritz.box ([2001:16b8:4824:700:55b0:6e1e:26ab:27a5]) by smtp.gmail.com with ESMTPSA id g6sm3828488edm.29.2020.03.09.14.42.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Mar 2020 14:42:16 -0700 (PDT) From: Guoqing Jiang To: axboe@kernel.dk Cc: linux-block@vger.kernel.org, Guoqing Jiang Subject: [PATCH V2 6/6] block: cleanup comment for blk_flush_complete_seq Date: Mon, 9 Mar 2020 22:41:38 +0100 Message-Id: <20200309214138.30770-7-guoqing.jiang@cloud.ionos.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200309214138.30770-1-guoqing.jiang@cloud.ionos.com> References: <20200309214138.30770-1-guoqing.jiang@cloud.ionos.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Remove the comment about return value, since it is not valid after commit 404b8f5a03d84 ("block: cleanup kick/queued handling"). Reviewed-by: Chaitanya Kulkarni Reviewed-by: Bart Van Assche Reviewed-by: Nikolay Borisov Signed-off-by: Guoqing Jiang --- block/blk-flush.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/block/blk-flush.c b/block/blk-flush.c index 7f7f98305115..843d25683691 100644 --- a/block/blk-flush.c +++ b/block/blk-flush.c @@ -160,9 +160,6 @@ static void blk_account_io_flush(struct request *rq) * * CONTEXT: * spin_lock_irq(fq->mq_flush_lock) - * - * RETURNS: - * %true if requests were added to the dispatch queue, %false otherwise. */ static void blk_flush_complete_seq(struct request *rq, struct blk_flush_queue *fq,