Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp373613lqt; Thu, 6 Jun 2024 06:22:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXUqG6lZu5BTHcgerEsNAS+OZe3VaCACAW65djkr5A8arN3LeSsFo89KV3iaRDkIKSFRoxS9IkjBN3qxNyD1Ivu1Z1XaBRllFXgPZ5bPg== X-Google-Smtp-Source: AGHT+IF4u7WusvC0w3KnGMiroMfUu/whqy56i/o4NqpgjGitXYjihwCmAtVuQx0VgHhoosiU2YZb X-Received: by 2002:a50:8d52:0:b0:57a:228e:4331 with SMTP id 4fb4d7f45d1cf-57a8b6974d2mr4406855a12.4.1717680143736; Thu, 06 Jun 2024 06:22:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717680143; cv=pass; d=google.com; s=arc-20160816; b=nlAQPBxKtuRnw6i3Sz3qD31sMq3y6x4JDRrM67/ADsi09AGw3u+zOu4kpcMrOgRdT3 FzpX/orscmjKgBt3d86sE8TtzFEC6eZFrCWZzQJKN/ZnZhy4WO0pESehNbJe/+tX2SBG JyE9Yby9EkKdvV5XzJHWCzcH7QYdPhLWoLETua0knkPppa/6kFLOzAuLkilrlQ1xI0T8 LAXTHyfkVF2HtuLcBeOVMm5akiK0kPizhY6uPqT2bshKxpemDco8oiDt4NjugojxftRZ Ma129/UFUpaiOK/33MZf4rSEZNd9g40dRYvz6WIEQ6HhzzeuD1v+zl9Aj6RyKwdUIrkm oHbg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=Qb3QzSk7hmd8VCOrQAOHEWV8WZJBpbSNa5uWGTwCDks=; fh=aZxnGY6DDy9fpaQ8sgauFxrOLW1h/pe2SVmJPZJU9to=; b=RFHuDEGFoInqNXqFdEMKOLBa7KHJtqKKvuLCnmWPuUrs3PLnFSZi6++ZNOZ3XzF0i4 F1hdJDsj+e11EzGYP1AfS4pKZNt2bGWj+unEKcnKQU7L/Ex/Flwjdj45bQUWQVWIoED6 MOujkg2nGxAARbQyXCFQHX2iVTCkTQyqDxXlk7rJJMr8Ydtw03uF751NxoZKequkWly/ O13BwMDXGlJnym1Do/e+rEgpm9plO6mR3neQaLYoTAJ39Jvgn6As3MJQcehYFYKPlUjr BR1GQZKjUGSFPCq9uUJAf3+XXg94U3t61lDiawoAVKaEaCwowCnStq1UMzRbLEEOQ7tA 4ZWA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=G13lutu8; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-204354-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204354-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 4fb4d7f45d1cf-57aae20182esi668975a12.208.2024.06.06.06.22.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 06:22:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-204354-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=@kernel.org header.s=k20201202 header.b=G13lutu8; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-204354-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204354-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 756221F23A7C for ; Thu, 6 Jun 2024 13:22:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8A088195F24; Thu, 6 Jun 2024 13:22:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="G13lutu8" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 9DB59195B0E for ; Thu, 6 Jun 2024 13:22:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717680120; cv=none; b=sgkfB+JiKnk860Wx9CBsKIMqpW+BfLER9qUhKvx2Z8f/b+Q4OA94jRemkddqBK6VTKGM5vsqEKd8RDXaMagBM+S9BcQDpsFRik45QoVjBjSLAgaW7HmLm5WHYf5eG5jpzGeFt3BWZqGsnufbV2iyHyMlqKA1yPwBpUjgB4IjLgg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717680120; c=relaxed/simple; bh=fjqEjkWA2RusVimCoeFUf+3aEstaA7Y6jxoveNe8UhY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Whp3t21ZlLs0Mn4a8D/bwqOUu04w4xNTPexzRsK4Gb+TNCDuQVCtTiChfOIYdCzaOpBzWTkp8uQCvi+xPpAqpQqiw8iHutrl/4J2heIpn60F3Ft+d3iEUBSfLgQnf9lLyDHsabYNXI10IG9xBprmydV0GglFR7Tpf/2GLY9RfQ4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=G13lutu8; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3EA2AC2BD10; Thu, 6 Jun 2024 13:21:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717680120; bh=fjqEjkWA2RusVimCoeFUf+3aEstaA7Y6jxoveNe8UhY=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=G13lutu8CuRuAAjeYkL7CNW5FbHI8z/9XaOcBPH9CjItJF3wwUYLG5gpahIvlzRt4 7qUkCdKFRjXUDdlr7Cv5fSAnIIKZKr1gD7d0uKtrfy0+mI4MNOBcwhKeE2L0T2Uyr1 FPxqF7t2yC3j+mVLbkWI6zvm67DRJYJ49D9uNpuLluAV3KBy/7CLO0rIHXSX2QhrH3 5wF4gC39WliiSsUefgG0PD4sk8LKCueHpqvMNFH8u2NiOf4dtLxHJgazKiPlZl+oDR FsDpv2uAqOtBEGW4KP3HZkujvRlvIFHqqloxSRiyW9LBH54Aqt2lrIjW3iwrZOQb1+ kKo/1W+553ZTA== Message-ID: <39ec8353-8f3e-45c6-b8a9-359ff96502f5@kernel.org> Date: Thu, 6 Jun 2024 21:22:00 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] f2fs: get rid of buffer_head use To: Matthew Wilcox Cc: jaegeuk@kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org References: <20240606095037.4086881-1-chao@kernel.org> Content-Language: en-US From: Chao Yu Autocrypt: addr=chao@kernel.org; keydata= xsFNBF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FlOu8iTGlD8sNjJK+Y/fPK3znFqoqqKmSFZ aiRALjAZH6ufspvYAJEJE9eZSX7Rtdyt30MMHQARAQABwsFfBBgBCgAJBQJWLOm1AhsMAAoJ EKTPgB1/p52GPpoP/2LOn/5KSkGHGmdjzRoQHBTdm2YV1YwgADg52/mU68Wo6viStZqcVEnX 3ALsWeETod3qeBCJ/TR2C6hnsqsALkXMFFJTX8aRi/E4WgBqNvNgAkWGsg5XKB3JUoJmQLqe CGVCT1OSQA/gTEfB8tTZAGFwlw1D3W988CiGnnRb2EEqU4pEuBoQir0sixJzFWybf0jjEi7P pODxw/NCyIf9GNRNYByUTVKnC7C51a3b1gNs10aTUmRfQuu+iM5yST5qMp4ls/yYl5ybr7N1 zSq9iuL13I35csBOn13U5NE67zEb/pCFspZ6ByU4zxChSOTdIJSm4/DEKlqQZhh3FnVHh2Ld eG/Wbc1KVLZYX1NNbXTz7gBlVYe8aGpPNffsEsfNCGsFDGth0tC32zLT+5/r43awmxSJfx2P 5aGkpdszvvyZ4hvcDfZ7U5CBItP/tWXYV0DDl8rCFmhZZw570vlx8AnTiC1v1FzrNfvtuxm3 92Qh98hAj3cMFKtEVbLKJvrc2AO+mQlS7zl1qWblEhpZnXi05S1AoT0gDW2lwe54VfT3ySon 8Klpbp5W4eEoY21tLwuNzgUMxmycfM4GaJWNCncKuMT4qGVQO9SPFs0vgUrdBUC5Pn5ZJ46X mZA0DUz0S8BJtYGI0DUC/jAKhIgy1vAx39y7sAshwu2VILa71tXJ In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2024/6/6 20:38, Matthew Wilcox wrote: > On Thu, Jun 06, 2024 at 05:50:37PM +0800, Chao Yu wrote: >> For later folio conversion. > > What tree is this against? Last dev-test branch of f2fs git tree, I guess it's a little behind to linus' tree. > >> @@ -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). Will update it once f2fs codebase was rebased to 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); Fine, let me work on this in v2. Thanks, >