diff options
author | Sage Weil <sage@newdream.net> | 2010-05-14 22:06:30 +0200 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-05-18 00:25:41 +0200 |
commit | 23804d91f112df09b832cd091b71af4dc2831aa8 (patch) | |
tree | 4b77c43b47d58f08ab02220c507dabfc8f6daf7a /fs/ceph/dir.c | |
parent | ceph: cleanup pool op strings (diff) | |
download | linux-23804d91f112df09b832cd091b71af4dc2831aa8.tar.xz linux-23804d91f112df09b832cd091b71af4dc2831aa8.zip |
ceph: specify max_bytes on readdir replies
Specify max bytes in request to bound size of reply. Add associated
mount option with default value of 512 KB.
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/dir.c')
-rw-r--r-- | fs/ceph/dir.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index d3bb8132a1aa..4fd30900eff7 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c @@ -233,6 +233,7 @@ static int ceph_readdir(struct file *filp, void *dirent, filldir_t filldir) u32 ftype; struct ceph_mds_reply_info_parsed *rinfo; const int max_entries = client->mount_args->max_readdir; + const int max_bytes = client->mount_args->max_readdir_bytes; dout("readdir %p filp %p frag %u off %u\n", inode, filp, frag, off); if (fi->at_end) @@ -316,6 +317,7 @@ more: req->r_readdir_offset = fi->next_offset; req->r_args.readdir.frag = cpu_to_le32(frag); req->r_args.readdir.max_entries = cpu_to_le32(max_entries); + req->r_args.readdir.max_bytes = cpu_to_le32(max_bytes); req->r_num_caps = max_entries + 1; err = ceph_mdsc_do_request(mdsc, NULL, req); if (err < 0) { |