Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp345898lqt; Thu, 6 Jun 2024 05:38:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW7Bif4gAmqcfC/QYwwX5npzoEuMOzA68OoEp1nMPS4Erqrsv3wLBJqkuilx2r4ua3ulbt8OzMTfcByn43r5ZTAF2+mhXJXXHs5F4cSUQ== X-Google-Smtp-Source: AGHT+IHPMv3Ia7rMuh7nIplb9KQPlrkhLSXnIa1zlbqCwrgSKkh2ouaI/MIehrylAglFS56VkdQj X-Received: by 2002:a2e:a9a6:0:b0:2ea:8201:4a10 with SMTP id 38308e7fff4ca-2eac7a68589mr46986981fa.42.1717677507202; Thu, 06 Jun 2024 05:38:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717677507; cv=pass; d=google.com; s=arc-20160816; b=EN5+dCf3Vj1THTTdzhp0eHhHESAnlmfwHuFNTP3jls+ObBUzqMdxXzta9qxWTydAeV HzPUP15lHHBi/1KYwToK8/f16sWKOcVJLvEXrMfwDgcZOoTs3YPFA3GxizMSkyCgbm1q SZKUjT8+MK+31I7vGr94k9xXUXKJqNlabnw8ohuYHyNiM/KXpjwdgRk5jyf9hFhrvrpk cxLq6eBmDWDc9jZWdzPflvDK2waTClL4/ozDf3pptk8w6tX3JQL6/hbC62jPOvfk26hU beQlIJ7EtzOEYMyvzGUS4JI/pcXDzIV+1xgjOrnoPzSGClb+ZG0vtI2dkz5wHsc++3pA brow== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=wTgnAQ+pKxAYFknJ3Qb4mN2BUWUuDM11bEhEheLrtn8=; fh=NXk619aQi/tIjokylVtwpcUPW7Pk/U453Q+o/kM/Jbc=; b=w1NEVT+xW4gv3YCZxiYmCwbiDOYjqvACVOJ9v6mxcBLmi8p1hy9DEdPhR3S2UwdKfM wwVqfPsOFNOApsWfbmeg2S+/g+2lM608Jc6x03Svm8PcjuC60mld4tXbJCNWBvZXq+3G 4xkrKAamd5MOEqZ2Bzojfehe7ypweFgdeG8Eq6iGwXhOe0sKlcCuBSvD59xo2TaCYMTv BW0wrCtIWkcX6fCUWdm6X/M6zbHhSMMM8h74KBlxJlwyf7aB1O0NPZFtBMxcPRCe6RDK SI6mChvrwXCAmppAC1zb/XDw018rl3udXVijWgX0DeCbu9j22TiI7m9vpr/DmroccYG+ 3I6w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="tnaMhI/b"; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-204281-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204281-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a6c80706fa1si66457666b.515.2024.06.06.05.38.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 05:38:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-204281-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="tnaMhI/b"; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-204281-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204281-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id E12271F25167 for ; Thu, 6 Jun 2024 12:38:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4843D195996; Thu, 6 Jun 2024 12:38:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="tnaMhI/b" Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (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 F090C13B28A for ; Thu, 6 Jun 2024 12:38:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717677498; cv=none; b=ul9t/LD7UKv2ecdQdsFpIvnqeISG/yoW5ma02DxocLT6fks+434mLO52NuELw14WQItuWT7fWuENt7P7LF42Fm+4kWPSnM2FGuv8IBSMOgi/eJXmV6AWN+OQNSYUZ1/+xaC3DZ47/BwtSWPihesniBkr1CkkeRM/mY7k2pjLbJA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717677498; c=relaxed/simple; bh=As1pZa7eTukJhlvtuFr8QZj2m1//MHH82Nzoo+Skxkg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=U8BY6v2/7/gf7VH0r7lPgR/DX/7SkLnEVumPUTDC5jyo9V6GkOJuU0X7/vWmgY+vcSCLaiTlwAX+ahB8dMYb3Q7suaf0TEhKMuI93KrfVi7bQ6wGz7SuANP9QUD+TGzST09aMHgmktzcJx9eMIZVBnA/LczTJblZIDziN8pi474= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=tnaMhI/b; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=wTgnAQ+pKxAYFknJ3Qb4mN2BUWUuDM11bEhEheLrtn8=; b=tnaMhI/busE8aGAHG/PxrF7UmB 6Zhok6QfwzslX5poFwaFdTfywNDnbQcCPC7cF4smgnr2K5t+S7duTWug1nQklpcRKwMGbY4RH8Fa1 +8ltCuaHgx+yCRWzbtvsLRnCavYO86FnkAik5P7zJrm6oTWA+0LKscjJi8TIvzHqiSN9x6UInbQt4 HM71Ag6keJHCp8LTppHUsh1oZigC45fjo94Rt/gYHrXhiyKYAyRADCBIz/twwBaEOnRiHv1MfK3bM 1UkA60YFZOhAdVWhod2JzyoGnMMNkW5/gAd9XVs8wUc3A9dtsEiGJLf2iFYJPpE23wREXRGiph2zS 87HxemXA==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1sFCNi-0000000EWBT-43Q7; Thu, 06 Jun 2024 12:38:14 +0000 Date: Thu, 6 Jun 2024 13:38:14 +0100 From: Matthew Wilcox To: Chao Yu Cc: jaegeuk@kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: Re: [PATCH] f2fs: get rid of buffer_head use Message-ID: References: <20240606095037.4086881-1-chao@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240606095037.4086881-1-chao@kernel.org> On Thu, Jun 06, 2024 at 05:50:37PM +0800, Chao Yu wrote: > For later folio conversion. What tree is this against? > @@ -3957,32 +3976,32 @@ static int read_raw_super_block(struct f2fs_sb_info *sbi, > return -ENOMEM; > > for (block = 0; block < 2; block++) { > - bh = sb_bread(sb, block); > - if (!bh) { > + page = read_mapping_page(sb->s_bdev->bd_inode->i_mapping, > + block, NULL); You need to use bd_mapping, not bd_inode->i_mapping (since May 21 in Linus' tree). And I don't think there's much point in switching to pages as an intermediate step. You may as well go straight to folios. folio = read_mapping_folio(sb->s_bdev->bd_mapping, block, NULL);