diff options
author | Yan, Zheng | 2014-03-29 13:41:15 +0800 |
---|---|---|
committer | Sage Weil | 2014-04-04 21:08:22 -0700 |
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 { /* for readdir results */ struct { struct ceph_mds_reply_dirfrag *dir_dir; + size_t dir_buf_size; int dir_nr; char **dir_dname; u32 *dir_dname_len; @@ -346,7 +347,8 @@ extern void ceph_mdsc_lease_release(struct ceph_mds_client *mdsc, struct dentry *dn); extern void ceph_invalidate_dir_request(struct ceph_mds_request *req); - +extern int ceph_alloc_readdir_reply_buffer(struct ceph_mds_request *req, + struct inode *dir); extern struct ceph_mds_request * ceph_mdsc_create_request(struct ceph_mds_client *mdsc, int op, int mode); extern void ceph_mdsc_submit_request(struct ceph_mds_client *mdsc, |