From nobody Wed Oct 8 22:35:37 2025 Received: from mx10.didiglobal.com (mx10.didiglobal.com [111.202.70.125]) by smtp.subspace.kernel.org (Postfix) with SMTP id 98FF722CBC6; Tue, 24 Jun 2025 12:12:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=111.202.70.125 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750767160; cv=none; b=bMmM5M30Oe1O3t98mpUyMn1b8GjYYYWALKWYmhCUbnSz1NgJ+gltLXl9GxxsVHgi17azK5YnTKH/gQm9xoH3xCLMrWBqnqrj5JAALRJFC3rUpbFaRpWqO0lmEdWRZVMSgbTntWO+cdGV2jzoRQpt2dsrpXsd6pXs6RV79awsruw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750767160; c=relaxed/simple; bh=iuF1ZOur63OjUvd6ybvJnLgKwbJ3U/NzwPXRo3n32rY=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:Content-Type: MIME-Version; b=SS5AkFix8Cyu8iw9MmoHgPV5VY3hTtic3ey1Sd1GVebT1DRRDf2sLSbW8qYq8qQ6iNxPV8a4Qa8vibkbCb39VDXSBqIB/4n1+29JA6Rm6SelDIIsrWlNjCZPuV3SVmiPK7YEmUBXiSZojjbZKPzOw/Q3hy9Y6gZ/wsx058BE+Dw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=didiglobal.com; spf=pass smtp.mailfrom=didiglobal.com; dkim=pass (1024-bit key) header.d=didiglobal.com header.i=@didiglobal.com header.b=jG1fTpFZ; arc=none smtp.client-ip=111.202.70.125 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=didiglobal.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=didiglobal.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=didiglobal.com header.i=@didiglobal.com header.b="jG1fTpFZ" Received: from mail.didiglobal.com (unknown [10.79.65.20]) by mx10.didiglobal.com (MailData Gateway V2.8.8) with ESMTPS id 3B0B71808ACADD; Tue, 24 Jun 2025 20:11:29 +0800 (CST) Received: from BJ02-ACTMBX-08.didichuxing.com (10.79.65.15) by BJ02-ACTMBX-02.didichuxing.com (10.79.65.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.10; Tue, 24 Jun 2025 20:12:11 +0800 Received: from BJ03-ACTMBX-07.didichuxing.com (10.79.71.34) by BJ02-ACTMBX-08.didichuxing.com (10.79.65.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.10; Tue, 24 Jun 2025 20:12:11 +0800 Received: from BJ03-ACTMBX-07.didichuxing.com ([fe80::b00b:de35:2067:9787]) by BJ03-ACTMBX-07.didichuxing.com ([fe80::b00b:de35:2067:9787%7]) with mapi id 15.02.1748.010; Tue, 24 Jun 2025 20:12:11 +0800 X-MD-Sfrom: chentaotao@didiglobal.com X-MD-SrcIP: 10.79.65.20 From: =?gb2312?B?s8LMzszOIFRhb3RhbyBDaGVu?= To: "tytso@mit.edu" , "hch@infradead.org" , "adilger.kernel@dilger.ca" , "willy@infradead.org" , "brauner@kernel.org" , "jani.nikula@linux.intel.com" , "rodrigo.vivi@intel.com" , "tursulin@ursulin.net" , "airlied@gmail.com" CC: "linux-fsdevel@vger.kernel.org" , "linux-ext4@vger.kernel.org" , "linux-block@vger.kernel.org" , "intel-gfx@lists.freedesktop.org" , "dri-devel@lists.freedesktop.org" , "linux-mm@kvack.org" , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "chentao325@qq.com" , =?gb2312?B?s8LMzszOIFRhb3RhbyBDaGVu?= Subject: [PATCH v2 5/5] ext4: declare support for FOP_DONTCACHE Thread-Topic: [PATCH v2 5/5] ext4: declare support for FOP_DONTCACHE Thread-Index: AQHb5QE2ZjIKcQrU5kGPOqcDpxUbGg== Date: Tue, 24 Jun 2025 12:12:10 +0000 Message-ID: <20250624121149.2927-6-chentaotao@didiglobal.com> In-Reply-To: <20250624121149.2927-1-chentaotao@didiglobal.com> Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Transfer-Encoding: quoted-printable Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=didiglobal.com; s=2025; t=1750767111; bh=iuF1ZOur63OjUvd6ybvJnLgKwbJ3U/NzwPXRo3n32rY=; h=From:To:CC:Subject:Date:Message-ID:Content-Type; b=jG1fTpFZ5DZ3tvJBBpHiw+NcCQv4XiH7nagDsfHKhol3W/U+kb7vKldOhO7jBL3pp RxJTpSe2q3R/f5c6cru5v8cqEeQmrQEfxebUH3R6/qe2L9xn1IfGNMxKbvlG0CMej/ MWF3ZmON8QiK9ShSKWFSJqmAkMqCtXz1mbNVHfOg= Content-Type: text/plain; charset="utf-8" From: Taotao Chen Set the FOP_DONTCACHE flag in ext4_file_operations to indicate that ext4 supports IOCB_DONTCACHE handling in buffered write paths. Part of a series refactoring address_space_operations write_begin and write_end callbacks to use struct kiocb for passing write context and flags. Signed-off-by: Taotao Chen Acked-by: Theodore Ts'o --- fs/ext4/file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/ext4/file.c b/fs/ext4/file.c index 21df81347147..274b41a476c8 100644 --- a/fs/ext4/file.c +++ b/fs/ext4/file.c @@ -977,7 +977,8 @@ const struct file_operations ext4_file_operations =3D { .splice_write =3D iter_file_splice_write, .fallocate =3D ext4_fallocate, .fop_flags =3D FOP_MMAP_SYNC | FOP_BUFFER_RASYNC | - FOP_DIO_PARALLEL_WRITE, + FOP_DIO_PARALLEL_WRITE | + FOP_DONTCACHE, }; =20 const struct inode_operations ext4_file_inode_operations =3D { --=20 2.34.1