Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2461664pxb; Tue, 13 Apr 2021 02:26:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJ5Cal89Sgh81R2dNBLJIGDQlRNI9NDiZCcicvgZ90KNbH0JrO59R+0fZSAcpBGQDfnlnu X-Received: by 2002:a05:6402:520b:: with SMTP id s11mr34318626edd.212.1618305987582; Tue, 13 Apr 2021 02:26:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618305987; cv=none; d=google.com; s=arc-20160816; b=KmjMjxh+xMGFYUxeW7I4VkvuJi+JWPXTnf7+M6fm+KW9vNCbnenI2/h//OcWoUakn4 87ccmrw4b+iSAE5wahqgzq++tCQfFOavHf9FyudskZDx5sbygxJSvV0ZmMbWlEI0ecjk OsdBGFrmHY9VLiYuxOAPec3V8Oy9jQyjIlBrMq/pkeBuvD1A0Tb/CeCL3HkAXMizy/X+ hHRZlLXUNZ3tpsqR/I1EOa3omi99y9Yr0o+xGBIBaXZT15mf3C3pvKBRmRuHWQ52OFBO W6tptqhQY5UevIOVuq8eqOj4Gz39bcQY9LzSqnlmnCgABn+zB4oy8d7CbeZuCvHVcoln IMug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=bFMFapyaFrni1HarYM4k3DklZgi869kS2+NhJmZxP/E=; b=ln3onMv2yeTlsGPbYN3tPEbY5Az/oluQgnnYNm5JE0B1rwJTE+Arbm5DVgEXJ/Iygx IDooX70K6W1OqBs/d15Y5stCjo3ETzsp/bqkTak4o0iBp9l9o3uDhXzFQUUjkGaCfG9V ADi9QT6p5xogTXC1hoiAITFpApz/cwadqpjBFbkPmxsS80QkoYXRK3ECAvdB2YjcNmRG +RgtJXkvGJgdI191Dc6/mlTrxxjr3+G0p05oDb8x+bjhFE/88rzfKnObNIbpRLXiZOZP 6VqHP3Wxm6XTxmvpVr2aoNvDsgGiLEd3rUCre4hYllgoN/pxOL4waiwHSYNenF2+qnmT fb/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=O7lCWUve; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hr16si7679389ejc.250.2021.04.13.02.26.02; Tue, 13 Apr 2021 02:26:27 -0700 (PDT) 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=@linuxfoundation.org header.s=korg header.b=O7lCWUve; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239062AbhDMHfa (ORCPT + 99 others); Tue, 13 Apr 2021 03:35:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:35866 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231236AbhDMHf2 (ORCPT ); Tue, 13 Apr 2021 03:35:28 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 29246613B8; Tue, 13 Apr 2021 07:35:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1618299309; bh=hrLewTy+tax+Ne9nlzA7X9m5SbQlFR8964ZNQauoK2k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=O7lCWUve2gHCK/PTOlQakXcSd8bD7rUvQP3uQTBTSn163QoboBGGXsVSHRYLgvBVU M+PWgWJzqWMvNwFkAoSxjcDdqd5UrdlteUrmCQU3xJlWQtyPs7IRQPdh9c24QxCMUo 2bASHbAAkeQEMCJ+4ZNJ8VvE9RoW0DlJhFLT4aPE= Date: Tue, 13 Apr 2021 09:35:07 +0200 From: Greg KH To: Changheun Lee Cc: damien.lemoal@wdc.com, bvanassche@acm.org, Johannes.Thumshirn@wdc.com, asml.silence@gmail.com, axboe@kernel.dk, hch@infradead.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, ming.lei@redhat.com, osandov@fb.com, patchwork-bot@kernel.org, tj@kernel.org, tom.leiming@gmail.com, jisoo2146.oh@samsung.com, junho89.kim@samsung.com, mj0123.lee@samsung.com, seunghwan.hyun@samsung.com, sookwan7.kim@samsung.com, woosung2.lee@samsung.com, yt0928.kim@samsung.com Subject: Re: [PATCH v7 3/3] bio: add limit_bio_size sysfs Message-ID: References: <20210413025502.31579-1-nanich.lee@samsung.com> <20210413025502.31579-4-nanich.lee@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210413025502.31579-4-nanich.lee@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 13, 2021 at 11:55:02AM +0900, Changheun Lee wrote: > 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 > --- > Documentation/ABI/testing/sysfs-block | 10 ++++++++++ > Documentation/block/queue-sysfs.rst | 7 +++++++ > block/blk-sysfs.c | 3 +++ > 3 files changed, 20 insertions(+) Isn't it too late to change the sysfs entry after the device has been probed and initialized by the kernel as the kernel does not look at this value after that? Why do you need a userspace knob for this? What tool is going to ever change this, and what logic is it going to use to change it? Why can't the kernel also just "do the right thing" and properly detect this option as well as userspace can? thanks, greg k-h