Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4030397imu; Mon, 28 Jan 2019 15:48:26 -0800 (PST) X-Google-Smtp-Source: ALg8bN4ChBfR4ah5M222GHwxVVwo2LBlyZOAMmhpSpNHMVuYAVNPXhhYpGg1p5fX0fxfwPSWYVDz X-Received: by 2002:a63:e051:: with SMTP id n17mr21706584pgj.258.1548719306629; Mon, 28 Jan 2019 15:48:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548719306; cv=none; d=google.com; s=arc-20160816; b=Ist9KqJX6IVNfWzhLVLIq6lnAu+t7VDi+XrglMrAR8ZyP/bR4+tfBtMwqO8FcZ/coP Dwk271aYnx6WH8U28rfFQ46vQup8Rb95wJqom1jmhGEX8h5I4C1GkpBVLRMjfE1k+Ra4 Qcm3uca4jCZmx0+RfJGLa3nZxJgKGMJl2SBB04FVtNcgTZ0IUMlPI4/QIQIYTMqiA8nd BdYLk+tZbwq+YHNFf7kXt4BVjSU25h0JNFmKnzncS+FdfV3Hnn0tLOb/BQfwK2RvmgYk iB3ZSzCnYg9GHiIj0bdkoBKtAUKzR5XY0ZGD8OUsH7CLY1kiUFHPUVAvz/zg4Ve2NoNA FKCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=hxKBxHFB4dWznw27t7fzFElZqG0womSt7lhT8mtMw1k=; b=L3Zn9moGf5rFCaNnkUO2qy+DO9cGMG62sr+E5rvs7CWrUP01OwTpe9fi3GUNkrGr0W t8yEo5QrUwyxhxY35A/eewmgKKwJvZ8ymYFBPnVyrgGyXeILqdECJDe13f3XuAj0a+aH U4JtZSOVmT6lnVrEf5437IRlfiwrKV9g7Q1MrnHoWlMgYtUPlxGvPlba6Umd01BUqm1U bBogWNcnT3nTaFJPW2EfSE4+FWHRvOd7eGHIxvY92XzZ1+zE4Vwc1YXg6d1MZPjH//Fm TYyqip3jB9S8ckw19O7MbW4wJkRh05fWUQyu78GegzFOyXzLnXbluL7SoNvKvf4Az1fD HCvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=K3MrECao; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t17si10216927pgk.217.2019.01.28.15.48.11; Mon, 28 Jan 2019 15:48:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=K3MrECao; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727747AbfA1Xr1 (ORCPT + 99 others); Mon, 28 Jan 2019 18:47:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:39754 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727558AbfA1Xr0 (ORCPT ); Mon, 28 Jan 2019 18:47:26 -0500 Received: from localhost (203-69-98-252.HINET-IP.hinet.net [203.69.98.252]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BD6E821783; Mon, 28 Jan 2019 23:47:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548719246; bh=zUuOtI+Del2uu5VYzfUqOE11gveyD1HlqXa37CIY8TY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K3MrECaocuO/hv5//cfavrkC6LAYHqB3Rj36E2B+Zn8wlOwOyLrCNSt9sNcwlWIPC 67RiugTENIYNPpw/bYoTfJ5UzAnTiuMaYFaFIYVXLCzTod6z8lvU3Zh+gk3YCs80G0 f/c7cPoOTImsTB667lxmRkDGbEXNL2d7A9PLvJXI= From: Jaegeuk Kim To: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Cc: Jaegeuk Kim Subject: [PATCH 3/7] f2fs: try to keep CP_TRIMMED_FLAG after successful umount Date: Tue, 29 Jan 2019 07:47:13 +0800 Message-Id: <20190128234717.77225-3-jaegeuk@kernel.org> X-Mailer: git-send-email 2.19.0.605.g01d371f741-goog In-Reply-To: <20190128234717.77225-1-jaegeuk@kernel.org> References: <20190128234717.77225-1-jaegeuk@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If every discard were issued successfully, we can avoid further discard. Signed-off-by: Jaegeuk Kim --- fs/f2fs/segment.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 342b720fb4db..fdd8cd21522f 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -1063,6 +1063,8 @@ static void __init_discard_policy(struct f2fs_sb_info *sbi, } else if (discard_type == DPOLICY_UMOUNT) { dpolicy->max_requests = UINT_MAX; dpolicy->io_aware = false; + /* we need to issue all to keep CP_TRIMMED_FLAG */ + dpolicy->granularity = 1; } } -- 2.19.0.605.g01d371f741-goog