diff mbox series

[RFC,2/5] ceph: set rsize in netfs_i_context from mount options

Message ID 20220407120224.76156-3-jlayton@kernel.org (mailing list archive)
State New, archived
Headers show
Series ceph: convert to netfs_direct_read_iter | expand

Commit Message

Jeff Layton April 7, 2022, 12:02 p.m. UTC
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
 fs/ceph/inode.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
index 1dad69a0ab70..8ea1b53b6ce9 100644
--- a/fs/ceph/inode.c
+++ b/fs/ceph/inode.c
@@ -450,6 +450,7 @@  static int ceph_fill_fragtree(struct inode *inode,
  */
 struct inode *ceph_alloc_inode(struct super_block *sb)
 {
+	struct ceph_mount_options *fsopt = ceph_sb_to_client(sb)->mount_options;
 	struct ceph_inode_info *ci;
 	struct netfs_i_context *ctx;
 	int i;
@@ -463,7 +464,7 @@  struct inode *ceph_alloc_inode(struct super_block *sb)
 	/* Set parameters for the netfs library */
 	ctx = netfs_i_context(&ci->vfs_inode);
 	netfs_i_context_init(&ci->vfs_inode, &ceph_netfs_ops);
-	ctx->rsize = 1024 * 1024;
+	ctx->rsize = fsopt->rsize;
 
 	spin_lock_init(&ci->i_ceph_lock);