Received: by 2002:a05:6358:51dd:b0:131:369:b2a3 with SMTP id 29csp829687rwl; Thu, 10 Aug 2023 02:10:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHA4ghcyLN1/JtYY7v6fPiG1f4bGJVO8LVpkA3XEbEvbZ3vMzyk8DeTpdSRh/LGoEfgEfPC X-Received: by 2002:a05:6a20:12cb:b0:141:d54e:a908 with SMTP id v11-20020a056a2012cb00b00141d54ea908mr1991620pzg.41.1691658631580; Thu, 10 Aug 2023 02:10:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691658631; cv=none; d=google.com; s=arc-20160816; b=kVhhjYBlHzvSGAPyZqXi39v3q6O3AdvnWu7crQl26YI50M41cIQ9mo9W3wC6xPBbxR ZEEU2dR5aUgG/MtQnybt9J+dbu1xss5Tp+UtZWd+PYMLCpt44KdcFnYcEaHD+42giN7s ZH6zYLMsUfrn8xcyEaeAb10Uh5QyHLuXByZ+o3FkZgG8aPPEZ8NfUe+YZ1eSGP+xbfSo lMdG+TiJGXZ5SlJtN/ujgN+UJyACbSQVH+8HRmZ5/n+tqLISdUIViW6H3UHCISZkTm+9 aVvOLYobAmbEg+TVW3EvRfyoq6ulIP+foiDK5UaRjsEFhBNODoatW33eFBDN1BIwOcyv KToA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=eqBylSiH3ft3C0/TDYUYjgtODf0JpoAch8yY9bEWVts=; fh=fyGKuVBssQbePDGdX70JMMt+prpgYh6vEKQt76EVmtg=; b=aPjod+/Gd2BJtjkOryryxBaTZ7IOlgzn/JQaWa77r5Uk559LnoW75dqgQ1xm6i/FHb KHOWQ2D7DX5cc2y+QSOgwhR5wBOqENWqDnnyUZZyYm+rxRDSJOHD3KMi+j9QmCqRBdiv uhapbsl9k/AD/bVOPqfkBh+g7E/rH28BbRjoRr8m69lMmik1oJlb4pjYA13ARjAcOQjh rIZhGkHVGTbZYeAT8k8X7hPV5aooZTu5ZmbmPYodiwWKKNb4stxb98d2qNjgwJ1jmfFf ELhYyMf6yLep2vrD4YCYsdBm0KogEsNaXqtmiIWjulo3n2p6SkhkDqTYpTPnn5Rfgyo+ oQ9A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z16-20020a634c10000000b0055339507f67si1186125pga.836.2023.08.10.02.10.18; Thu, 10 Aug 2023 02:10:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233912AbjHJIlV (ORCPT + 99 others); Thu, 10 Aug 2023 04:41:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231978AbjHJIlU (ORCPT ); Thu, 10 Aug 2023 04:41:20 -0400 Received: from SHSQR01.spreadtrum.com (mx1.unisoc.com [222.66.158.135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 785BDDC for ; Thu, 10 Aug 2023 01:41:15 -0700 (PDT) Received: from dlp.unisoc.com ([10.29.3.86]) by SHSQR01.spreadtrum.com with ESMTP id 37A8eUDM002273; Thu, 10 Aug 2023 16:40:30 +0800 (+08) (envelope-from Zhiguo.Niu@unisoc.com) Received: from SHDLP.spreadtrum.com (bjmbx02.spreadtrum.com [10.0.64.8]) by dlp.unisoc.com (SkyGuard) with ESMTPS id 4RM0gq6Mh1z2PN3Fg; Thu, 10 Aug 2023 16:38:31 +0800 (CST) Received: from bj08434pcu.spreadtrum.com (10.0.73.87) by BJMBX02.spreadtrum.com (10.0.64.8) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Thu, 10 Aug 2023 16:40:28 +0800 From: Zhiguo Niu To: , CC: , , , Subject: [PATCH] f2fs: should update REQ_TIME for direct write Date: Thu, 10 Aug 2023 16:40:00 +0800 Message-ID: <1691656800-21616-1-git-send-email-zhiguo.niu@unisoc.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.0.73.87] X-ClientProxiedBy: SHCAS03.spreadtrum.com (10.0.1.207) To BJMBX02.spreadtrum.com (10.0.64.8) X-MAIL: SHSQR01.spreadtrum.com 37A8eUDM002273 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The sending interval of discard and GC should also consider direct write requests; filesystem is not idle if there is direct write. Signed-off-by: Zhiguo Niu --- fs/f2fs/file.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 5ac53d2627d2..713a2d98728a 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -4537,6 +4537,7 @@ static int f2fs_dio_write_end_io(struct kiocb *iocb, ssize_t size, int error, dec_page_count(sbi, F2FS_DIO_WRITE); if (error) return error; + f2fs_update_time(sbi, REQ_TIME); f2fs_update_iostat(sbi, NULL, APP_DIRECT_IO, size); return 0; } -- 2.37.3