瀏覽代碼

ceph: set up readahead size when rsize is not passed

This should improve the default read performance, as without it
readahead is practically disabled.

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
Yehuda Sadeh 14 年之前
父節點
當前提交
e985222743
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      fs/ceph/super.c

+ 4 - 0
fs/ceph/super.c

@@ -779,6 +779,10 @@ static int ceph_register_bdi(struct super_block *sb,
 		fsc->backing_dev_info.ra_pages =
 			(fsc->mount_options->rsize + PAGE_CACHE_SIZE - 1)
 			>> PAGE_SHIFT;
+	else
+		fsc->backing_dev_info.ra_pages =
+			default_backing_dev_info.ra_pages;
+
 	err = bdi_register(&fsc->backing_dev_info, NULL, "ceph-%d",
 			   atomic_long_inc_return(&bdi_seq));
 	if (!err)