Message ID | 20240429190500.30979-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 05C97C19F53 for <linux-mm@archiver.kernel.org>; Mon, 29 Apr 2024 19:07:04 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 79E236B0092; Mon, 29 Apr 2024 15:07:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 74CA36B0093; Mon, 29 Apr 2024 15:07:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5EDF96B0095; Mon, 29 Apr 2024 15:07:04 -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 40A746B0092 for <linux-mm@kvack.org>; Mon, 29 Apr 2024 15:07:04 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id ECBD0C028B for <linux-mm@kvack.org>; Mon, 29 Apr 2024 19:07:03 +0000 (UTC) X-FDA: 82063501926.08.FFBBED3 Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) by imf10.hostedemail.com (Postfix) with ESMTP id 14A88C0015 for <linux-mm@kvack.org>; Mon, 29 Apr 2024 19:07:01 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=PWsl6gGG; spf=pass (imf10.hostedemail.com: domain of ryncsn@gmail.com designates 209.85.210.172 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=1714417622; 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=5+IkB3+J9K42d+V5Wi+AdhWpwnXMtEpYhZXm/5fw+dM=; b=Fy5y8I54mBo5kE7jLnxojP9LbOBHxwCS0QfsijKJ/osEtKF8EY63EI09C9X4Eb5qhvfN1L UOiBqe/yeTepQRcAHEuJ4/5PJgfP3Jsl7XQkNLT9jTyc4g9o6b/2tc8qfs/F3QY9sU6YFz ocyYN8bY9b50iSyRpo/erO6dtPmmfvs= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=PWsl6gGG; spf=pass (imf10.hostedemail.com: domain of ryncsn@gmail.com designates 209.85.210.172 as permitted sender) smtp.mailfrom=ryncsn@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1714417622; a=rsa-sha256; cv=none; b=uEBpzAvx7RvQV4WZ9E/tGeURYsd5uIFhKYnxuqyCmi+iyJz/y0fCdBBtf5aGBMk6lmw+MM CmmE4wS7RX6rQ0GPTuWEVzKn5+aJFbXcLEANwIwGnNpLEc0Fa1OjeKul74hGThiBYXpIE4 /1x6i+5YdhFOnrqUEOT0YilLcSMLJmo= Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-6f043f9e6d7so5004858b3a.3 for <linux-mm@kvack.org>; Mon, 29 Apr 2024 12:07:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714417620; x=1715022420; 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=5+IkB3+J9K42d+V5Wi+AdhWpwnXMtEpYhZXm/5fw+dM=; b=PWsl6gGG9UK8HLIk2uGwa71yidhCOrZEMjTIBCS9HbXP8aoQnvK74Lq4Sl51Ji7JRf B1Q4P0wFe1nUwlfxmUDijyF4R9naS9lu/D2IEgo3g5DLo9CNBrNkZq08A2Lv6IGMeFm/ ReBPmg4Pv1ST276ufDumxdiXQCx7JFluQNrswniVr5hIvRv+6A2PHKc98intZbJy93BM BAE9nVArtblB9UzpGETKH2UXHMtUBtJwvJ+YJW1WrbdUBqGUfwtaxqd6CfHg7fTJErGq YcZkoDRbXvcCQgsz9NhihDkZdNPn9jTpi6XweNtvOPR9Q+6lyS9LkCBHWyqsurO5U9FH DTkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714417620; x=1715022420; 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=5+IkB3+J9K42d+V5Wi+AdhWpwnXMtEpYhZXm/5fw+dM=; b=jBX5QScpV8H6YSwirioYc6QMTRSMDjbA65rFYNP6oVR88xKQmus4Uvoy3BAL8KdzlD TEmhhwbhOhfvPGLkz5wKYfOESOVwh/hf6twyZhMWTiwYk0FiHuWiaylMVGzeVi5E9QvY GdufawY+YIqQHok5SdAaVOUiXrG/iEE8oZRdF1GGc1259dWCvb9taHom+8Up3fQzrbZL hDkGPTsAfqv56k1tE5wgWJdV+4eoJsHQshXCBtRMhUBwum3eUykip2iRaPwhKbcC652N C9qLnR5239ZcJaSSZY3rKqj0ypynwEaO4D8uRCjwul+Q3fLQApIHPbkTGCEzgtAGCfZB USMw== X-Gm-Message-State: AOJu0YzF2/JPfoRkYUp40TsuflYPS/AKpJyIUg3N/E0O5OzDfF9kiKOt A878k6I/szn6DpPnbZrE4PeIGsTf1OrS5N0iIzCXFrKAIOXCjNi6vYHkSANluo4= X-Google-Smtp-Source: AGHT+IGvkma+YPu9xzUecSUUsFD1l+4n7xw1LuJ9VLq1yA2mCnKc5mpq0XVMSd8n6uL8gi84MJzVXg== X-Received: by 2002:a05:6a20:f393:b0:1ad:682d:55b3 with SMTP id qr19-20020a056a20f39300b001ad682d55b3mr555060pzb.3.1714417620501; Mon, 29 Apr 2024 12:07:00 -0700 (PDT) Received: from KASONG-MB2.tencent.com ([1.203.116.31]) by smtp.gmail.com with ESMTPSA id y4-20020a170902864400b001e49428f313sm20619356plt.261.2024.04.29.12.06.56 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 29 Apr 2024 12:07:00 -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>, Hugh Dickins <hughd@google.com>, David Hildenbrand <david@redhat.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 v3 03/12] ceph: drop usage of page_index Date: Tue, 30 Apr 2024 03:04:51 +0800 Message-ID: <20240429190500.30979-4-ryncsn@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240429190500.30979-1-ryncsn@gmail.com> References: <20240429190500.30979-1-ryncsn@gmail.com> Reply-To: Kairui Song <kasong@tencent.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Stat-Signature: 8b8sbgoqzk637rhsansfmoqhxfaq716d X-Rspam-User: X-Rspamd-Queue-Id: 14A88C0015 X-Rspamd-Server: rspam05 X-HE-Tag: 1714417621-937844 X-HE-Meta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viXaj4twmEzsKkYKL7WcZ67zKDFMTFJJIXD2ZshliFiE6TsEWTububgndt9g2BsOjAR7O0zmcv6QQUw4nG4whjPdDc0+fw9cCWv7SwP1cU64ceDlbwDB/vLp/PynK3MtgyDuAkjUXqF2aKvPlJlB2sFE+Ju5T9RI0nOoXDDQ1gKRDWESbnLNHf2SF8i4BWu0vvgQBk0jl+mf+AY3/NhP5sNV6T8tGCuMeN1WYq5vdxjcbodSpUxMx/IlIfakhWwX6QPATX9lyYeVDigf8Ttf8kOUugpv1uaYWq2ekKXL56AdwKtYnV7horJDOL/GOxQ+CvRFDmIEdV+MeePhJumsVDNVTPvPovFWsZsHdbzLuaoGh6U8aSqu9T/u2xmQR7+IUU+rV5ugpvNwXGTiG9T381LvHycs7IvxTZzNeBBDppkZjriZ2BzQ4z7+A+YZkf91sgU5rV5INO5mVK4vJesyxIt2iz+00PhZRrZ7NY/JJkds638dYZ92+cLDU5SExCHf99rLAleh1NE61RX+zW+1lGMAcrbfj+h3Xs9PGY+mOc2GPs5n0F2sdooz6ALTxZUFWr8Q1HE2oZgcwyLl0ZrtGu+Uudsgt9GwcFCmi1zNIGOI/4Ps66d7J+i16vuF/IihHu6/k/6VNjqwelJfSiBjgiWCi84AzrrXlGt288YZl7eGAevvnVsBHX024lw3f0ff+hVsEXB/qjWQzOtKodgga54UfgwGBZXROiJes5SpL+0APlTpQL1tUb5nSqDB87cNUM2YTn8juQNyJnMp+zPHgqjDpJEgrBpSZfLw2D3xY= 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);