From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
To: Xiubo Li <xiubli@redhat.com>, Ilya Dryomov <idryomov@gmail.com>
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>,
Jeff Layton <jlayton@kernel.org>,
ceph-devel@vger.kernel.org, David Howells <dhowells@redhat.com>,
linux-fsdevel@vger.kernel.org
Subject: [PATCH 12/15] ceph: Convert ceph_fill_inode() to take a folio
Date: Fri, 25 Aug 2023 21:12:22 +0100 [thread overview]
Message-ID: <20230825201225.348148-13-willy@infradead.org> (raw)
In-Reply-To: <20230825201225.348148-1-willy@infradead.org>
Its one caller already has a folio, so pass it through req->r_locked_folio
into ceph_fill_inode().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
fs/ceph/inode.c | 10 +++++-----
fs/ceph/mds_client.h | 2 +-
fs/ceph/super.h | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
index ced036d47b3b..d5f0fe39b92f 100644
--- a/fs/ceph/inode.c
+++ b/fs/ceph/inode.c
@@ -913,7 +913,7 @@ static int decode_encrypted_symlink(const char *encsym, int symlen, u8 **decsym)
* Populate an inode based on info from mds. May be called on new or
* existing inodes.
*/
-int ceph_fill_inode(struct inode *inode, struct page *locked_page,
+int ceph_fill_inode(struct inode *inode, struct folio *locked_folio,
struct ceph_mds_reply_info_in *iinfo,
struct ceph_mds_reply_dirfrag *dirinfo,
struct ceph_mds_session *session, int cap_fmode,
@@ -1261,7 +1261,7 @@ int ceph_fill_inode(struct inode *inode, struct page *locked_page,
int cache_caps = CEPH_CAP_FILE_CACHE | CEPH_CAP_FILE_LAZYIO;
ci->i_inline_version = iinfo->inline_version;
if (ceph_has_inline_data(ci) &&
- (locked_page || (info_caps & cache_caps)))
+ (locked_folio || (info_caps & cache_caps)))
fill_inline = true;
}
@@ -1277,7 +1277,7 @@ int ceph_fill_inode(struct inode *inode, struct page *locked_page,
ceph_fscache_register_inode_cookie(inode);
if (fill_inline)
- ceph_fill_inline_data(inode, locked_page,
+ ceph_fill_inline_data(inode, &locked_folio->page,
iinfo->inline_data, iinfo->inline_len);
if (wake)
@@ -1596,7 +1596,7 @@ int ceph_fill_trace(struct super_block *sb, struct ceph_mds_request *req)
BUG_ON(!req->r_target_inode);
in = req->r_target_inode;
- err = ceph_fill_inode(in, req->r_locked_page, &rinfo->targeti,
+ err = ceph_fill_inode(in, req->r_locked_folio, &rinfo->targeti,
NULL, session,
(!test_bit(CEPH_MDS_R_ABORTED, &req->r_req_flags) &&
!test_bit(CEPH_MDS_R_ASYNC, &req->r_req_flags) &&
@@ -2836,7 +2836,7 @@ int __ceph_do_getattr(struct inode *inode, struct folio *locked_folio,
ihold(inode);
req->r_num_caps = 1;
req->r_args.getattr.mask = cpu_to_le32(mask);
- req->r_locked_page = &locked_folio->page;
+ req->r_locked_folio = locked_folio;
err = ceph_mdsc_do_request(mdsc, NULL, req);
if (locked_folio && err == 0) {
u64 inline_version = req->r_reply_info.targeti.inline_version;
diff --git a/fs/ceph/mds_client.h b/fs/ceph/mds_client.h
index 1fa0f78b7b79..d2cf2ff9fa66 100644
--- a/fs/ceph/mds_client.h
+++ b/fs/ceph/mds_client.h
@@ -320,7 +320,7 @@ struct ceph_mds_request {
int r_err;
u32 r_readdir_offset;
- struct page *r_locked_page;
+ struct folio *r_locked_folio;
int r_dir_caps;
int r_num_caps;
diff --git a/fs/ceph/super.h b/fs/ceph/super.h
index 3649ac41a626..d741a9d15f52 100644
--- a/fs/ceph/super.h
+++ b/fs/ceph/super.h
@@ -1038,7 +1038,7 @@ extern void ceph_fill_file_time(struct inode *inode, int issued,
u64 time_warp_seq, struct timespec64 *ctime,
struct timespec64 *mtime,
struct timespec64 *atime);
-extern int ceph_fill_inode(struct inode *inode, struct page *locked_page,
+int ceph_fill_inode(struct inode *inode, struct folio *locked_folio,
struct ceph_mds_reply_info_in *iinfo,
struct ceph_mds_reply_dirfrag *dirinfo,
struct ceph_mds_session *session, int cap_fmode,
--
2.40.1
next prev parent reply other threads:[~2023-08-25 20:13 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-25 20:12 [PATCH 00/15] Many folio conversions for ceph Matthew Wilcox (Oracle)
2023-08-25 20:12 ` [PATCH 01/15] ceph: Convert ceph_writepages_start() to use folios a little more Matthew Wilcox (Oracle)
2023-08-28 1:18 ` Xiubo Li
2023-11-20 0:30 ` Xiubo Li
2023-08-25 20:12 ` [PATCH 02/15] ceph: Convert ceph_page_mkwrite() to use a folio Matthew Wilcox (Oracle)
2023-08-28 1:21 ` Xiubo Li
2023-08-25 20:12 ` [PATCH 03/15] mm: Delete page_mkwrite_check_truncate() Matthew Wilcox (Oracle)
2023-08-25 20:12 ` [PATCH 04/15] ceph: Add a migrate_folio method Matthew Wilcox (Oracle)
2023-08-25 20:12 ` [PATCH 05/15] ceph: Remove ceph_writepage() Matthew Wilcox (Oracle)
2023-08-25 20:12 ` [PATCH 06/15] ceph: Convert ceph_find_incompatible() to take a folio Matthew Wilcox (Oracle)
2023-08-25 20:12 ` [PATCH 07/15] ceph: Convert writepage_nounlock() " Matthew Wilcox (Oracle)
2023-08-25 20:12 ` [PATCH 08/15] ceph: Convert writepages_finish() to use " Matthew Wilcox (Oracle)
2023-08-25 20:12 ` [PATCH 09/15] ceph: Use a folio in ceph_filemap_fault() Matthew Wilcox (Oracle)
2023-08-26 3:00 ` Matthew Wilcox
2023-08-28 1:19 ` Xiubo Li
2023-08-29 11:55 ` Jeff Layton
2023-08-29 13:30 ` Matthew Wilcox
2023-08-30 10:44 ` Ilya Dryomov
2023-08-31 3:52 ` Xiubo Li
2023-08-25 20:12 ` [PATCH 10/15] ceph: Convert ceph_read_iter() to use a folio to read inline data Matthew Wilcox (Oracle)
2023-08-25 20:12 ` [PATCH 11/15] ceph: Convert __ceph_do_getattr() to take a folio Matthew Wilcox (Oracle)
2023-08-25 20:12 ` Matthew Wilcox (Oracle) [this message]
2023-08-25 20:12 ` [PATCH 13/15] ceph: Convert ceph_fill_inline_data() " Matthew Wilcox (Oracle)
2023-08-25 20:12 ` [PATCH 14/15] ceph: Convert ceph_set_page_fscache() to ceph_folio_start_fscache() Matthew Wilcox (Oracle)
2023-08-25 20:12 ` [PATCH 15/15] netfs: Remove unused functions Matthew Wilcox (Oracle)
2023-11-17 15:37 ` [PATCH 00/15] Many folio conversions for ceph Matthew Wilcox
2023-11-20 0:32 ` Xiubo Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230825201225.348148-13-willy@infradead.org \
--to=willy@infradead.org \
--cc=ceph-devel@vger.kernel.org \
--cc=dhowells@redhat.com \
--cc=idryomov@gmail.com \
--cc=jlayton@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=xiubli@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).