Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp1028395lqb; Wed, 17 Apr 2024 19:43:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV9Mjh2xNbNIacD15wah/EZbNd8gpjHVzmahC1dOUHg56c3qYTQGffsu0Zoywtyuvaahi8HG5U6NuV244HKy+Iw4RL9OOQJt7W0XsA23w== X-Google-Smtp-Source: AGHT+IGeqefsF9HwiuagnqyWCsCeKU1HqGm2dJeOTSGHlyIi5H8L/wj19K+z+V8iFAJqC6s9D1et X-Received: by 2002:a05:6a00:1256:b0:6ed:4b2e:49be with SMTP id u22-20020a056a00125600b006ed4b2e49bemr1429708pfi.2.1713408221569; Wed, 17 Apr 2024 19:43:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713408221; cv=pass; d=google.com; s=arc-20160816; b=H8Qj2yDzRjPrsg+J/jc1yJAJkO2ygsnF7zF/w8DKinGoekPJizx9ffrO1W2YsuEvWF konjUKGg1TKEOlUMB0cEIYpQUqEg0/3eOCSlhhZHxI4hzxGo1ryrwlI/6l0/EBLNRPWE AwA4cN5gasQV/kf/CkEtR/KHDQHsCjeVN/0y3FqPj/tQHz/gcfBDcnwq8jTiICnZz9md LjfLZXJ8HM33wrmmoFYQIWZMnYzhyIT1vE4ubP+6D6IyFdb6k4ZgCmhdDKeWPiSJY6jw grsMfys3WUgyKJbZGPo5VOqKTp8dIUN6yclQ0c996h0o+j1anJJRthahsfBvXlKFaaDA fZ1A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=lHdJ1IEQUe90imoIzR17oc110KfFYytLZPC+x7YJWuU=; fh=WPQXqOs7smJpdaCVy+h5Jd4cJTTdsdT2MhsAM6uuIOQ=; b=XI/UtM4sqEMnhS7Ef2Y+1oG0zLBWi2RD1iKS6Et4vLe7OcZsiLCcCfnGtv05B7nJ57 6cfjAI5wk5O7cxombVF9FN3XEW2H/F2c2w8YSR/oS+pJ4Y3CgOOFJE+HEXTq9k8W0pvk /H6bQLh86SqN+dF/uGu+0LPUzVsmQUgKms4FtKAjIbUTKtGryD+J8siRkEJxIBuGQ+sE YOwm2pfqqE0Je748qbGGuG2lmcpaT7CFU+7Hr1hWVrd8aPsPPSfAc8qZEacmARzyEj91 +R1mr7PDMSbe2QwWPGqaGtbsTGiuvemHtM7ncYqJZGatRWcupdX6k5BfWgHwmNDVmMVt MTkA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="NnRP/WzU"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-149448-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149448-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id p20-20020a63e654000000b005d3f4474fddsi518065pgj.167.2024.04.17.19.43.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Apr 2024 19:43:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-149448-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="NnRP/WzU"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-149448-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149448-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 3382D282740 for ; Thu, 18 Apr 2024 02:43:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3959F54676; Thu, 18 Apr 2024 02:43:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="NnRP/WzU" Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D5FA854672; Thu, 18 Apr 2024 02:43:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713408185; cv=none; b=GbxO5ISq61dsF10sr8LGpGCEwlSDe5KuKTpePvxlNAVhiaFkMz4m/XlQhTQxWd6odgTkRjwGWj2MQe7/V3qns23Tfyi72v9Sk44LoYJ+gpiCZ0v3W0pelqiFHg6ziEOAOJuSwqPQpYLD+EG1FSRGyhZMFOjlhfW4Evt0GfwhlqE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713408185; c=relaxed/simple; bh=Uxd1qPAx5E6F5mJHBCGrEZTgf0AAm5zPYB/SG3EV6QQ=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=Z1p45+9jbG0tuj16J32xxuXE8p0ZZzUgMWdhC8yflwb2YBkC6HVb0qGlXsygXQx/pFEtua9Ajqyg8jZ+M5vfb7MnWqa2RU3+TsUD/II/ZtwzmYJKHd4DxlPGTucjTD0ZIwrlY3CT4TA7Z7PFjnkLChijfJL4hoGlT2OukHctXcM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=NnRP/WzU; arc=none smtp.client-ip=209.85.208.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lj1-f177.google.com with SMTP id 38308e7fff4ca-2dac77cdf43so5093361fa.2; Wed, 17 Apr 2024 19:43:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713408181; x=1714012981; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=lHdJ1IEQUe90imoIzR17oc110KfFYytLZPC+x7YJWuU=; b=NnRP/WzUyLHebsMbBGqFaPueYZubEnyVZEvNk+woBCt1J65HHmUp6TQNnXXC9NiEJm jzfZmHx2G352qQVb6xCcbteqtCBGr35szRbAa8vQkpjKkqhS6q/tRaltIDGL2Tl2snxO CABw6ldPN/iDR6i1J7l+BbWanJXNMuZUNg4MwG70zOWq8ZGP6uqsGx0PQ4w4v1V1fKvS BuFKKbnNA53KeFJ+xKl+C5zd5yRnKabmo/9qxmhyIjI8q3poIEC4AvBoun/EwbhkKR46 1Y3NOM2vmtt3w0rIPxB7C5yFW9qksfbEzjk8hbdcuyMScsVPsfOOr5bJKK5NzD9rh7o9 gleQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713408181; x=1714012981; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lHdJ1IEQUe90imoIzR17oc110KfFYytLZPC+x7YJWuU=; b=YDscnnzYoO5U1Ug5oeprhvKw66zaa1nv/OKsveSRnWAuqrmqaHUdwLPhNUVqJ7y11T oAz3ATQrI3+G3HuzIOQFt9MITBQcxlI6YHty+loziL820EIPdtdhJ1bs9xY83p34G6xE 3FwFFDjJoRFSaiSVw0n7WpS4FEI0jO+ZrE7xywJ8olqLpxyXa/Hmkp/TMx9kLvmNcjot Xxc812oQQ8Icdj8vSy79thWNpK8k1Y5caTzPXHTH9xA5wC0PEHpFnne0rUzDLnOwkxTe oILuETG4mxssBDZHRCmRh4c+6WFH82aMJQhMx19sCuQMYM27qNv7Nn4h3DLd0se3/ufe GyVA== X-Forwarded-Encrypted: i=1; AJvYcCVgujcg/Pd5qy+jKtg1nPoHGKIB5PjUmO/xKqrlJrWmsywPRVjUiR1vAcEzKeqHPllH4L7tu2pJVNEol0bwUQgyhf1yebeY4A/534kRy3nLoD/SLLUjINo2VmN0gVMu/sWwtrCHzVgVnzMFp7EVDoFic4REcMTV58ffMtfPy4DVDh3kabsEuKAR X-Gm-Message-State: AOJu0YwEHdFwmVp2Mhpbeu4AGUfLPr+yI17xYy73AG7noYcYhJK6EGjf vHtOHtcjKJrfTim9RqoxPv7NYeKpoQQ6OR7a43wMl3valothC5Twsi6Y+MoHhjgXTPNZ44fKO5Y 4C2n7ryvpeRtqFisyBFQIc2/wqvc= X-Received: by 2002:a2e:a986:0:b0:2d8:55f0:476b with SMTP id x6-20020a2ea986000000b002d855f0476bmr713852ljq.23.1713408180752; Wed, 17 Apr 2024 19:43:00 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240417160842.76665-1-ryncsn@gmail.com> <20240417160842.76665-3-ryncsn@gmail.com> In-Reply-To: From: Kairui Song Date: Thu, 18 Apr 2024 10:42:43 +0800 Message-ID: Subject: Re: [PATCH 2/8] nilfs2: drop usage of page_index To: Matthew Wilcox Cc: linux-mm@kvack.org, Andrew Morton , "Huang, Ying" , Chris Li , Barry Song , Ryan Roberts , Neil Brown , Minchan Kim , Hugh Dickins , David Hildenbrand , Yosry Ahmed , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Ryusuke Konishi , linux-nilfs@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Apr 18, 2024 at 12:14=E2=80=AFAM Matthew Wilcox wrote: > > On Thu, Apr 18, 2024 at 12:08:36AM +0800, Kairui Song wrote: > > +++ b/fs/nilfs2/bmap.c > > @@ -453,8 +453,7 @@ __u64 nilfs_bmap_data_get_key(const struct nilfs_bm= ap *bmap, > > struct buffer_head *pbh; > > __u64 key; > > > > - key =3D page_index(bh->b_page) << (PAGE_SHIFT - > > - bmap->b_inode->i_blkbits); > > + key =3D bh->b_page->index << (PAGE_SHIFT - bmap->b_inode->i_blkbi= ts); > > I'd prefer this were > > key =3D bh->b_folio->index << (PAGE_SHIFT - bmap->b_inode->i_blkb= its); > > (pages only have a ->index field for historical reasons; I'm trying to > get rid of it) > Good suggestion! For easier review I just copied the original logic from page_index, I will update with folio conventions in V2.