Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp142973pxb; Wed, 3 Feb 2021 01:42:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJyakcnb1KzaWgBrP1+mxdbJ7EUDF7E5kupr7UG60UAlHghUikhyBBHHkYbWZKmEe8SYaW92 X-Received: by 2002:a17:906:798:: with SMTP id l24mr2425838ejc.92.1612345354253; Wed, 03 Feb 2021 01:42:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612345354; cv=none; d=google.com; s=arc-20160816; b=zBE4KH+jVAOqWN2pxK4AmpaUe4sh04gfomSmqS9FVcvUURZY0r/S1De7gohWEDpI8C QydEV0syRF6Vs7EAHKRi427zjFdlm4aExfXHpTG+TrpMlV3S3NQ0jOlwneFQ7mSLSsWU IlxwhIDQDOxsDkrZAY1IwfiN5wre5D0YdxwlsqKYwAzKXfiMnVjsUjNJnhObsCoKvjjn sCaInIdc7T0apkKXpVv2T/At+quv6GmsY+F6XYD6rtVNU560PyksCk9lqNdNpzVDTbho EZ7t5lejhcOlavZV4DlXHYfECpPH63B+RG7TzExF/l69p0D2YLd3LTz3G2bBO1Qz0aKN VjTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:dlp-filter:cms-type :content-transfer-encoding:mime-version:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=++Jnb3SqoJaKXZ2SwuM4efupS68kYYz0Kg14bYc0z1k=; b=ZwuMRk2GY6qbsZFJl1PtTdmPIUjshAIxpxQHVEYk9ak4Vwmd7aVsWYwkuHj43n1HAm LFIvjPl5JucZRs4T8P+2Z9ChdqJJWCRWbLdE9ZdQWgmxgMbZmRO+pGCOvlBFRgMYX4Hl glLWmg+hUvj61ISxLBgEHMhj4NLXffdfQY2MHgdCY/94bsPLvT8ONGTPRos1gp3STl/L 0V5dO/prvVCVAxEGAmuMDNmjSRw7MKkgJS8b6midt4GwxBjtv3J6CDiNhxNYVMmylyPd nSJcu5Hhdn+MKZCqEYAaaebabHrSyX4fjRSdCy//Vh8J3e7nXjvqtRShvvQ2sR/wVaKa 2g2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=f4YGsWKH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k8si858277edx.303.2021.02.03.01.42.09; Wed, 03 Feb 2021 01:42:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=f4YGsWKH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232815AbhBCJjZ (ORCPT + 99 others); Wed, 3 Feb 2021 04:39:25 -0500 Received: from mailout2.samsung.com ([203.254.224.25]:29544 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231355AbhBCJjV (ORCPT ); Wed, 3 Feb 2021 04:39:21 -0500 Received: from epcas1p1.samsung.com (unknown [182.195.41.45]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20210203093838epoutp02a614bf398934519f0f976372883f42f4~gM1e0zSKa2524525245epoutp02L for ; Wed, 3 Feb 2021 09:38:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20210203093838epoutp02a614bf398934519f0f976372883f42f4~gM1e0zSKa2524525245epoutp02L DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1612345118; bh=++Jnb3SqoJaKXZ2SwuM4efupS68kYYz0Kg14bYc0z1k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f4YGsWKHxRSce9baGr9hwT5FKueXznfmOBb22afwuUWLaFpbutFgZym/boBcP/7LJ 2DdYBLzLS6ni1FDuCYieinBI7nY/gEYu+3a9pPbCINEjPxNHQJ4DfjAWbyReLmemZV 7EocNEDnUzkenvRKRtyT8u+k6x1muAawtFCYNxbc= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas1p3.samsung.com (KnoxPortal) with ESMTP id 20210203093837epcas1p3cde587ad432277e767b65539c8057de4~gM1eNH3GS1876818768epcas1p3B; Wed, 3 Feb 2021 09:38:37 +0000 (GMT) Received: from epsmges1p2.samsung.com (unknown [182.195.40.160]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4DVxSr2Ckxz4x9Q3; Wed, 3 Feb 2021 09:38:36 +0000 (GMT) Received: from epcas1p2.samsung.com ( [182.195.41.46]) by epsmges1p2.samsung.com (Symantec Messaging Gateway) with SMTP id CE.CE.63458.C1F6A106; Wed, 3 Feb 2021 18:38:36 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas1p2.samsung.com (KnoxPortal) with ESMTPA id 20210203093835epcas1p2e86a35ba3012882950abc7013cae59b9~gM1cWcHSB1322013220epcas1p27; Wed, 3 Feb 2021 09:38:35 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20210203093835epsmtrp1e0af78c4d2cb5b81b577e5f66dd467ca~gM1cTWyH70886908869epsmtrp1V; Wed, 3 Feb 2021 09:38:35 +0000 (GMT) X-AuditID: b6c32a36-6c9ff7000000f7e2-ca-601a6f1c67e6 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 3E.5E.08745.B1F6A106; Wed, 3 Feb 2021 18:38:35 +0900 (KST) Received: from localhost.localdomain (unknown [10.253.99.105]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20210203093835epsmtip203e0316ecaa2edc1409ef6193337ae94~gM1cGcN7J1238212382epsmtip2S; Wed, 3 Feb 2021 09:38:35 +0000 (GMT) From: Changheun Lee To: gregkh@linuxfoundation.org Cc: Johannes.Thumshirn@wdc.com, asml.silence@gmail.com, axboe@kernel.dk, damien.lemoal@wdc.com, hch@infradead.org, jisoo2146.oh@samsung.com, junho89.kim@samsung.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, ming.lei@redhat.com, mj0123.lee@samsung.com, nanich.lee@samsung.com, osandov@fb.com, patchwork-bot@kernel.org, seunghwan.hyun@samsung.com, sookwan7.kim@samsung.com, tj@kernel.org, tom.leiming@gmail.com, woosung2.lee@samsung.com, yt0928.kim@samsung.com Subject: [PATCH v4 2/2] bio: add limit_bio_size sysfs Date: Wed, 3 Feb 2021 18:22:47 +0900 Message-Id: <20210203092247.29258-1-nanich.lee@samsung.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Brightmail-Tracker: H4sIAAAAAAAAA02Te0xTVxzHc3rbe8ujeCkgx8YAu5t/iFBbauEMZDFiXJcZQ9z+WNyWcgNX IPS1XspkMRMGIq8pYKa8qsg6WAoLW3kMGCBBibyzyYApQ0AwyAwPYaiIj7W9kPHf9/zy+Z7v +f3OOUJMPIdLhIm6ZMaoozUU7spvurlXGrxbL4mRrbxyQ+XWJoBqJi7i6Nz5pzyU8X0djvoL Knkof/YbAXqVe5+H1qZZ1H5vHxpuLcdR16UMHrpSX46h0ckBAt28P8JH05ZCDA31rgjQ1ZlD 6EV1N0BLz8cI1Nd8CUN17ev4IR9VYcYioWopnSBU9T8GqoYHTSqbNQdX3TDXEqqljhFcdaHB ClSrNj/V+c48XrTrSc3BBI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fI2VYs5q7YxWqy+289m 0dr+jcmiefF6NovTExYxWfQ8aWK1+Nt1j8ni68Nii723tC0u75rDZnFocjOTxfTNc5gtrt0/ w25x+N5VFouHSyYyW5w7+YnVYt5jB4tfy48yWrz/cZ3d4tSOycwW6/f+ZHMQ9ZjY/I7dY+es u+wem1doeVw+W+qxaVUnm8f+uWvYPd7vu8rm0bdlFaPH501yHu0HupkCuKK4bFJSczLLUov0 7RK4Mpace8he8JC74sT8vSwNjDO4uhg5OSQETCQaN19m7mLk4hAS2MEoMWP+NGaIhJTE8RNv WbsYOYBsYYnDh4shaj4ySvzq/cEKUsMmoCPR9/YWG4gtIiAn8eT2H7BBzAJNLBLXz69mBEkI C5hKHDn9CKyIRUBV4v6cE8wgQ3kFrCW+vqiE2CUv8bR3OdheTgFNid8d3WDzhQQ0JH6d6gVr 5RUQlDg58wkLiM0MVN+8dTbzBEaBWUhSs5CkFjAyrWKUTC0ozk3PLTYsMMpLLdcrTswtLs1L 10vOz93ECI5ELa0djHtWfdA7xMjEwXiIUYKDWUmE99QksQQh3pTEyqrUovz4otKc1OJDjNIc LErivBe6TsYLCaQnlqRmp6YWpBbBZJk4OKUamFapPeLbqVy3uyXc42U4c42X2c9O5S1KCncu r49pWzORiyP/QdZ04cC28s15DRU5E2u49c50uSv9WN3Ln/W5+QTfEyfOmgp5tTO6326VzPsy 2aV6vj9P18aSyEV3DabXWfVyzZk77eCjq/tVr0p5XLSTvtqpW8Iqc6v855aOFSvSjp5UPtW0 8u/qbRI7rjm9Y/DUrj6mnWwS8PB0aFDc9GlfctewX5vicbLq/sy1UlFOZ/0rs1eUa/8tXzrh 4yfv5auObyr9O89M5dra8sYpgSEqTrF/N3xL7fqesVMkalGWc8aHjY4p2df/3M2UV9X6bNzF eG9Huoj71qWVc/5383zPVuGQ79fycbjNe9l/qxJLcUaioRZzUXEiACQ6ogMzAwAA X-CMS-MailID: 20210203093835epcas1p2e86a35ba3012882950abc7013cae59b9 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: SVC_REQ_APPROVE CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20210203093835epcas1p2e86a35ba3012882950abc7013cae59b9 References: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add limit_bio_size block sysfs node to limit bio size. Queue flag QUEUE_FLAG_LIMIT_BIO_SIZE will be set if limit_bio_size is set. And bio max size will be limited by queue max sectors via QUEUE_FLAG_LIMIT_BIO_SIZE set. Signed-off-by: Changheun Lee --- block/blk-sysfs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index b513f1683af0..840d97f427e6 100644 --- a/block/blk-sysfs.c +++ b/block/blk-sysfs.c @@ -288,6 +288,7 @@ QUEUE_SYSFS_BIT_FNS(nonrot, NONROT, 1); QUEUE_SYSFS_BIT_FNS(random, ADD_RANDOM, 0); QUEUE_SYSFS_BIT_FNS(iostats, IO_STAT, 0); QUEUE_SYSFS_BIT_FNS(stable_writes, STABLE_WRITES, 0); +QUEUE_SYSFS_BIT_FNS(limit_bio_size, LIMIT_BIO_SIZE, 0); #undef QUEUE_SYSFS_BIT_FNS static ssize_t queue_zoned_show(struct request_queue *q, char *page) @@ -615,6 +616,7 @@ QUEUE_RW_ENTRY(queue_nonrot, "rotational"); QUEUE_RW_ENTRY(queue_iostats, "iostats"); QUEUE_RW_ENTRY(queue_random, "add_random"); QUEUE_RW_ENTRY(queue_stable_writes, "stable_writes"); +QUEUE_RW_ENTRY(queue_limit_bio_size, "limit_bio_size"); static struct attribute *queue_attrs[] = { &queue_requests_entry.attr, @@ -648,6 +650,7 @@ static struct attribute *queue_attrs[] = { &queue_rq_affinity_entry.attr, &queue_iostats_entry.attr, &queue_stable_writes_entry.attr, + &queue_limit_bio_size_entry.attr, &queue_random_entry.attr, &queue_poll_entry.attr, &queue_wc_entry.attr, -- 2.28.0