diff options
author | Yan, Zheng <zheng.z.yan@intel.com> | 2014-03-29 01:41:15 -0400 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2014-04-05 00:08:22 -0400 |
commit | 54008399dc0ce511a07b87f1af3d1f5c791982a4 (patch) | |
tree | 6482779b43a6860debd35d11bc9a717efb262e20 /fs/ceph/mds_client.h | |
parent | 18cb95af2d7c69aa136ab13f02dd55188c120e75 (diff) |
ceph: preallocate buffer for readdir reply
Preallocate buffer for readdir reply. Limit number of entries in
readdir reply according to the buffer size.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Diffstat (limited to 'fs/ceph/mds_client.h')
-rw-r--r-- | fs/ceph/mds_client.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ceph/mds_client.h b/fs/ceph/mds_client.h index 68288917c737..e90cfccf93bd 100644 --- a/fs/ceph/mds_client.h +++ b/fs/ceph/mds_client.h | |||
@@ -67,6 +67,7 @@ struct ceph_mds_reply_info_parsed { | |||
67 | /* for readdir results */ | 67 | /* for readdir results */ |
68 | struct { | 68 | struct { |
69 | struct ceph_mds_reply_dirfrag *dir_dir; | 69 | struct ceph_mds_reply_dirfrag *dir_dir; |
70 | size_t dir_buf_size; | ||
70 | int dir_nr; | 71 | int dir_nr; |
71 | char **dir_dname; | 72 | char **dir_dname; |
72 | u32 *dir_dname_len; | 73 | u32 *dir_dname_len; |
@@ -346,7 +347,8 @@ extern void ceph_mdsc_lease_release(struct ceph_mds_client *mdsc, | |||
346 | struct dentry *dn); | 347 | struct dentry *dn); |
347 | 348 | ||
348 | extern void ceph_invalidate_dir_request(struct ceph_mds_request *req); | 349 | extern void ceph_invalidate_dir_request(struct ceph_mds_request *req); |
349 | 350 | extern int ceph_alloc_readdir_reply_buffer(struct ceph_mds_request *req, | |
351 | struct inode *dir); | ||
350 | extern struct ceph_mds_request * | 352 | extern struct ceph_mds_request * |
351 | ceph_mdsc_create_request(struct ceph_mds_client *mdsc, int op, int mode); | 353 | ceph_mdsc_create_request(struct ceph_mds_client *mdsc, int op, int mode); |
352 | extern void ceph_mdsc_submit_request(struct ceph_mds_client *mdsc, | 354 | extern void ceph_mdsc_submit_request(struct ceph_mds_client *mdsc, |