From patchwork Mon Mar 21 16:14:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Thumshirn X-Patchwork-Id: 12787514 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A58ECC43219 for ; Mon, 21 Mar 2022 16:14:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350873AbiCUQQK (ORCPT ); Mon, 21 Mar 2022 12:16:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349263AbiCUQQC (ORCPT ); Mon, 21 Mar 2022 12:16:02 -0400 Received: from esa1.hgst.iphmx.com (esa1.hgst.iphmx.com [68.232.141.245]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89DC32314D for ; Mon, 21 Mar 2022 09:14:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1647879270; x=1679415270; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ht3ht7NGdEqqjqWIUOCUfml5Fc2/ivtasHKMfz/HYQI=; b=nN7l5SojrLL8kL7GWnBsDKLWoIdCbqOz1/Uo1K6WcAk3IuN4IFI6wvvv mbJEUydRTVi9Gvr7a3VeoRSIJswE2mIajl1UCTQHOwnp7FmdBzA5Oi8IU pJpjkUJxPMgT0TETA/GYeUvIKgt+pwbxmrzV75u/BETxb9phXt+sAAw31 iHLbJSUzuI6kWxb07w3hvJXcn/eBA5c0p+KxJL1vN6Xy8joBeyr843EEb Vvz/jbBFIdAtaIm8YzzK1QZl2a17qVDD7DXdxy/oo/9RiiWhYBIDnwO6M IvB1sHb6nSkOUVdbMXscDXduD8u1SWovnJFi9PQFC9rc0Dy8f4OLSezbG w==; X-IronPort-AV: E=Sophos;i="5.90,199,1643644800"; d="scan'208";a="307836353" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 22 Mar 2022 00:14:30 +0800 IronPort-SDR: WM9AfShHaIHgGqYIRLvO1xTRwUM/PDxmSQJI2+3kN8oRO5Uw1zHNxXrgElgJ21rkqgYh3q3ASX tjmrtOqsSYmTgpm0AJ0WpOFQSSrvOQCtWxf41hD/RL9eeXlCBkMB6gt1KDZqDGvWI9BUcoHMdU ERfTqJKk2Ww0IUnzS1G4GEA7Cw9yzbI3PePh78s28vSjTZW8YLYuhJDEma5Dl3/rGuuHujsuGq AeUf+XQFfDC5I+jt2rexrR1vlL7xZGvqeZYhJxagCEck6dsLhoV4IN0vTcYjzR1T5DMNcAI4E5 iVM3LKTyRvYA4PngdCxL3wTc Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Mar 2022 08:45:30 -0700 IronPort-SDR: VbXmbkN7f/4LJ4z7GTOhBqLU84r7wi1h3vVEwrf64StiX9oO6jTkQSwpxh/jjVgK0IsQROcs/D 82VrNhQBC/bCsW/ohbBXyaq9Kcm808vOiRLZN+HxBTUbSPgM/xCly40lIVUwgshUw0jiriWwqr sim3GvQsximeBwW9dbXVeMtzbHo+zJq0P2Jw48cSQaho42ESkgzj9KJ7agDn3bSpXrhIlhOrf0 XKhBnP+a9ujdDU+Vrz5Ee1akp4toXdVbFWQ7K6joJlPl2wP9NegrYkLvRKi0ewXdNp40gLTYZE DBk= WDCIronportException: Internal Received: from unknown (HELO redsun91.ssa.fujisawa.hgst.com) ([10.149.66.72]) by uls-op-cesaip01.wdc.com with ESMTP; 21 Mar 2022 09:14:29 -0700 From: Johannes Thumshirn To: David Sterba Cc: Josef Bacik , linux-btrfs@vger.kernel.org, Pankaj Raghav Subject: [PATCH 3/5] btrfs: change the bg_reclaim_threshold valid region from 0 to 100 Date: Mon, 21 Mar 2022 09:14:12 -0700 Message-Id: X-Mailer: git-send-email 2.35.1 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org From: Josef Bacik For the !zoned case we may want to set the threshold for reclaim to something below 50%. Change the acceptable threshold from 50-100 to 0-100. Signed-off-by: Josef Bacik --- fs/btrfs/sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c index 90da1ea0cae0..fdf9bf789528 100644 --- a/fs/btrfs/sysfs.c +++ b/fs/btrfs/sysfs.c @@ -746,7 +746,7 @@ static ssize_t btrfs_sinfo_bg_reclaim_threshold_store(struct kobject *kobj, if (ret) return ret; - if (thresh != 0 && (thresh <= 50 || thresh > 100)) + if (thresh < 0 || thresh > 100) return -EINVAL; WRITE_ONCE(space_info->bg_reclaim_threshold, thresh);