From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 37498268C63 for ; Wed, 25 Jun 2025 14:36:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=18.9.28.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750862206; cv=none; b=AQZBpjSIPdpaqrQvOQX2/KqOaASrSCJBjEk8ZOFhRr5+qyDjJO8Dkhd9bedWa9jhKYFjeZx85LQwAjyaa0IUpDWJYxiMYG1Y1Qa2Q6Mik3NqftTD6iv2r9VXG8tfghwPdGbDz5pavHOc9FtQHh3R1k4/BDum5paF7LYTJA8huM0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750862206; c=relaxed/simple; bh=NXzXaf7EW6iEYKg0rmfnP1h7InpF/i0PwOvPVjkKJu8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=bVd8HLonqH+Oyy9JsB2rH4Q85gOo0pEZRK5aOddbuQYF1tp0wt+pPvDaE+Z0pF+720f34yo80/7tpcnvtEyeHWlIJ/Z9dy6epVEg3qm2niOFc0DkrCci50b/PzqBALL515pnpTRkK5ve0UJcR57IZxp+hlyyUSkRJbPE/VlHh3c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mit.edu; spf=pass smtp.mailfrom=mit.edu; arc=none smtp.client-ip=18.9.28.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mit.edu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mit.edu Received: from trampoline.thunk.org (pool-173-48-82-219.bstnma.fios.verizon.net [173.48.82.219]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 55PEZxBr000389 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 25 Jun 2025 10:36:00 -0400 Received: by trampoline.thunk.org (Postfix, from userid 15806) id 660662E00D5; Wed, 25 Jun 2025 10:35:59 -0400 (EDT) Date: Wed, 25 Jun 2025 10:35:59 -0400 From: "Theodore Ts'o" To: =?utf-8?B?6ZmI5rab5rab?= Taotao Chen Cc: "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" , "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" Subject: Re: [PATCH v2 4/5] ext4: handle IOCB_DONTCACHE in buffered write path Message-ID: <20250625143559.GE28249@mit.edu> References: <20250624121149.2927-1-chentaotao@didiglobal.com> <20250624121149.2927-5-chentaotao@didiglobal.com> Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20250624121149.2927-5-chentaotao@didiglobal.com> On Tue, Jun 24, 2025 at 12:12:09PM +0000, 陈涛涛 Taotao Chen wrote: > From: Taotao Chen > > Add support for the IOCB_DONTCACHE flag in ext4_write_begin() and > ext4_da_write_begin(). When set in the kiocb, the FGP_DONTCACHE bit > is passed to the page cache lookup, preventing written pages from > being retained in the cache. > > Only the handling logic is implemented here; the behavior remains > inactive until ext4 advertises support via FOP_DONTCACHE. > > This change relies on prior patches that refactor the write_begin > interface to use struct kiocb and introduce DONTCACHE handling in ext4. > > 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