Message ID | 20240510114747.21548-4-ryncsn@gmail.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 455F9C25B5F for <linux-mm@archiver.kernel.org>; Fri, 10 May 2024 11:50:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D09B96B00C4; Fri, 10 May 2024 07:50:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CB9996B00C5; Fri, 10 May 2024 07:50:07 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B33816B00C6; Fri, 10 May 2024 07:50:07 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 924106B00C4 for <linux-mm@kvack.org>; Fri, 10 May 2024 07:50:07 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 49EBE141813 for <linux-mm@kvack.org>; Fri, 10 May 2024 11:50:07 +0000 (UTC) X-FDA: 82102317654.29.783FB2D Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) by imf01.hostedemail.com (Postfix) with ESMTP id 6CAD44001B for <linux-mm@kvack.org>; Fri, 10 May 2024 11:50:04 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=OvhZbKBr; spf=pass (imf01.hostedemail.com: domain of ryncsn@gmail.com designates 209.85.210.181 as permitted sender) smtp.mailfrom=ryncsn@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1715341804; h=from:from:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=7WZK1EC9ikQfyuHFTfKb94AiIKSPD5K2lma7no+Kt3Y=; b=ZuS7M2Hxb+rRx7R3exvPFOgKLGWeyIB2Kw84ziQPd3aTMmKhTyxIn7viuti0zy6a66eeVU QZawz28sNfEwolgwwgkUCfEeEaCPAsWoRL9BYldwB41spM6cM3VWLZE7lP53WPLVnFbijX 9yEyHIwXDvRwD7BYO51hm6QkVZtKdEY= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1715341804; a=rsa-sha256; cv=none; b=uBTzPPQGh3l5lsa7quoVhwMOvF55z5g5vcAr1ECS8PQejYAEp9OC9Y40bz9oL8yDQgD4UU 0M5RZQNtuKV9bYpReGySrB3LFnAPLYZhSPGC+ZzSIyZXv5hSIo9t6vslw79KsPZ7OM1pcF uHgfyeNkFiSv6nRxRYsJzY0KL3XttU4= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=OvhZbKBr; spf=pass (imf01.hostedemail.com: domain of ryncsn@gmail.com designates 209.85.210.181 as permitted sender) smtp.mailfrom=ryncsn@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-pf1-f181.google.com with SMTP id d2e1a72fcca58-6f44ed6e82fso1710960b3a.3 for <linux-mm@kvack.org>; Fri, 10 May 2024 04:50:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715341803; x=1715946603; darn=kvack.org; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=7WZK1EC9ikQfyuHFTfKb94AiIKSPD5K2lma7no+Kt3Y=; b=OvhZbKBrfHt8OYgZmNk9IysW3RrCmLXD9kNiyZoT0tg8fA7QObh9iI51rAoK/BNcKD yt6//0lmOpjU5whrBcpKaxpKwTBE9qy6EYVjqHfOCkk2I5K++KFj+wNX9fgjSgwIlwVP IlfHcUFOmHXpjtqDUt857Nn36lblHOzVmmJtwlo5x2SWtO+Qf58OKBwexXTa/x/n5Iaq nJX/And+tqUTZsxjvS3IBKOKPi24roefqwpRaULYb/qBu7HF3vS1LH9gbaF3aPJi2RVF O42HJSWV7lC2+b40XuTNPEDbC/i0Mm86AWJBJj/q1wYK2VyGhtLWZvut4Xl4B67vbWxQ l8MQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715341803; x=1715946603; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=7WZK1EC9ikQfyuHFTfKb94AiIKSPD5K2lma7no+Kt3Y=; b=hwRrc14S741L3pJhj7DJ/9C7kSjPBE+T+mynBBDZkOBaoYkaFc7R95L+JbMXCplAGU QH13Ut9cf1rxUDwRLVIokoBnnr1qNrKjvItsbDRio6QaUfxSJDpDlExrKCcNBrxtvnUc 7z12J9cIhD8fekgGuqqjRBW+1JQ/Q+lTQwS4pD5st3RgUGiFBOWn6SHZV67m+isU6y6L fkB3YrA6O+KjyVvX1987wrNI0d1gKuY8Z0h8o/dk5xmFhy1GLgsARJSeVhr/kFgdi/aB 6G2Wmb09zbB214yvfJAbJH03RNygd9Ot6iNr+xPIxTMS+mSjMRyddK3pXzE0gfeh+gA1 EHjg== X-Gm-Message-State: AOJu0YzzhMZF8Tix63LDQeqcjefHIyPsRs9xbhr7ui2b6E8PeQ+uomBe UM31C4uevj9kHaO3fiF7dUgd+6F52fxCIBkArXQ/Q6iklb39kFVRvsk7J0l9IreqQQ== X-Google-Smtp-Source: AGHT+IGzJePUE/u2//e0nGqK25e74fSzzO7KZJDptjk5/1bik27/+5woaxZ+Rq3FhnwvPq89SZQajQ== X-Received: by 2002:a05:6a21:339f:b0:1af:dbe7:ccbe with SMTP id adf61e73a8af0-1afde103d87mr3133457637.28.1715341803002; Fri, 10 May 2024 04:50:03 -0700 (PDT) Received: from KASONG-MC4.tencent.com ([43.132.141.20]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1ef0c134155sm30183825ad.231.2024.05.10.04.49.58 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 10 May 2024 04:50:02 -0700 (PDT) From: Kairui Song <ryncsn@gmail.com> To: linux-mm@kvack.org Cc: Andrew Morton <akpm@linux-foundation.org>, "Huang, Ying" <ying.huang@intel.com>, Matthew Wilcox <willy@infradead.org>, Chris Li <chrisl@kernel.org>, Barry Song <v-songbaohua@oppo.com>, Ryan Roberts <ryan.roberts@arm.com>, Neil Brown <neilb@suse.de>, Minchan Kim <minchan@kernel.org>, David Hildenbrand <david@redhat.com>, Hugh Dickins <hughd@google.com>, Yosry Ahmed <yosryahmed@google.com>, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Kairui Song <kasong@tencent.com>, Xiubo Li <xiubli@redhat.com>, Ilya Dryomov <idryomov@gmail.com>, Jeff Layton <jlayton@kernel.org>, ceph-devel@vger.kernel.org Subject: [PATCH v5 03/12] ceph: drop usage of page_index Date: Fri, 10 May 2024 19:47:38 +0800 Message-ID: <20240510114747.21548-4-ryncsn@gmail.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240510114747.21548-1-ryncsn@gmail.com> References: <20240510114747.21548-1-ryncsn@gmail.com> Reply-To: Kairui Song <kasong@tencent.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspam-User: X-Stat-Signature: 9zj7o3qrk5orwm9xztujnzkaramgsqgo X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: 6CAD44001B X-HE-Tag: 1715341804-977440 X-HE-Meta: U2FsdGVkX19ph44Zdeza1ZSDi2jiRt6afX8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spAc/YEb/siZXstxFSmaGGJN6YGaI8UHHHNQsaFsMuOJJyRMOciXKrX0FpFueMh7kJLhxXjosZO0j795pPUArrH25HWqpRnSY++KR4/Eg2UR9h6ZkdoiCZ1CfSzx1oGROxwz6AcBaMsWMZKO3ZE929JSgEcuI615RQmg24HGb7HElw9fuQOhZaKzEl6A5Drr9Qw6fcCRMOa3N8kQ+vmHWP78XVswGi0keTxHGErZtPpOjqKZ3/FC5aBJDlSaIZ3WjAthx/0vmWe2Gwy0UanySjLyC9EqAmmLbakeJccrfT51gw8o9rYlO6owpNl4jW5vzAYw+p7wyPFQ1Yx/lK9Jyw841T9Ul2MRYyuUXFuNmVkXN8GSG1b37VHPMQ4gOfqo/9hgtzWgtec2WLQb5T44s4s8pbQrcCnqJyG5wJI2+SBT8qfIlxY3/FO0AxpylB/wYGe/Tb7rvJ+nldTom9UF9Xr47Lz/CMoW9KwmhCoFqUiCZf8QwEdin2oggSjcBxQ5fvuUsBg30HnPeRVmWAHplIMp3LpLb9rGLR+z5Okp6lw35HTvdD8aTBSDAQo1svpGJvBm59onSBHtGDKmGedjt1zVHFEftMviY+baz4Rnlp6ocsqkEWtvZQqn9O/pFF781ywl6+fLzLIQwdAtkFWwVHj3OWY0bt3uMwaCTfTlRBcdOCPlF+Ni3clcCo54njNk0cx2VZRSCNi3yfy87BoWaUEnWwuqYGVB6TldMjP+jppsIR1pk19vD0MJaB+MyhD+0= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
mm/swap: clean up and optimize swap cache index
|
expand
|
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index 0e9f56eaba1e..570a9d634cc5 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c @@ -141,7 +141,7 @@ __dcache_find_get_entry(struct dentry *parent, u64 idx, if (ptr_pos >= i_size_read(dir)) return NULL; - if (!cache_ctl->page || ptr_pgoff != page_index(cache_ctl->page)) { + if (!cache_ctl->page || ptr_pgoff != cache_ctl->page->index) { ceph_readdir_cache_release(cache_ctl); cache_ctl->page = find_lock_page(&dir->i_data, ptr_pgoff); if (!cache_ctl->page) { diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index 7b2e77517f23..1f92d3faaa6b 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -1861,7 +1861,7 @@ static int fill_readdir_cache(struct inode *dir, struct dentry *dn, unsigned idx = ctl->index % nsize; pgoff_t pgoff = ctl->index / nsize; - if (!ctl->page || pgoff != page_index(ctl->page)) { + if (!ctl->page || pgoff != ctl->page->index) { ceph_readdir_cache_release(ctl); if (idx == 0) ctl->page = grab_cache_page(&dir->i_data, pgoff);