summaryrefslogtreecommitdiffstats
path: root/fs/ceph/super.h
diff options
context:
space:
mode:
authorXiubo Li <xiubli@redhat.com>2022-08-25 09:31:12 -0400
committerIlya Dryomov <idryomov@gmail.com>2023-08-24 11:24:35 +0200
commitd4d518871574ebbd53f054c16c085caa0a77b83d (patch)
tree20f9064939079eae4f26e0fad97fa924ee341472 /fs/ceph/super.h
parent4e8c4c235578b4d44bd6676df3a01dce98d0f7dd (diff)
downloadlinux-d4d518871574ebbd53f054c16c085caa0a77b83d.tar.gz
linux-d4d518871574ebbd53f054c16c085caa0a77b83d.tar.bz2
linux-d4d518871574ebbd53f054c16c085caa0a77b83d.zip
ceph: add object version support for sync read
Turn the guts of ceph_sync_read into a new helper that takes an inode and an offset instead of a kiocb struct, and make ceph_sync_read call the helper as a wrapper. Make the new helper always return the last object's version. Signed-off-by: Xiubo Li <xiubli@redhat.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-and-tested-by: Luís Henriques <lhenriques@suse.de> Reviewed-by: Milind Changire <mchangir@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/super.h')
-rw-r--r--fs/ceph/super.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ceph/super.h b/fs/ceph/super.h
index 11483855897e..d60342cc6f33 100644
--- a/fs/ceph/super.h
+++ b/fs/ceph/super.h
@@ -1300,6 +1300,9 @@ extern int ceph_renew_caps(struct inode *inode, int fmode);
extern int ceph_open(struct inode *inode, struct file *file);
extern int ceph_atomic_open(struct inode *dir, struct dentry *dentry,
struct file *file, unsigned flags, umode_t mode);
+extern ssize_t __ceph_sync_read(struct inode *inode, loff_t *ki_pos,
+ struct iov_iter *to, int *retry_op,
+ u64 *last_objver);
extern int ceph_release(struct inode *inode, struct file *filp);
extern void ceph_fill_inline_data(struct inode *inode, struct page *locked_page,
char *data, size_t len);