diff options
author | Sage Weil <sage@newdream.net> | 2010-02-17 13:02:43 -0500 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-02-17 13:02:43 -0500 |
commit | 85ccce43a3fc15a40ded6ae1603e3f68a17f4d24 (patch) | |
tree | 1e15fb7dc7df43da4a3feacff671c8169e96291d /fs/ceph/debugfs.c | |
parent | 5ce6e9dbe6805ab8ee67e21936d17f431adc63c6 (diff) |
ceph: clean up readdir caps reservation
Use a global counter for the minimum number of allocated caps instead of
hard coding a check against readdir_max. This takes into account multiple
client instances, and avoids examining the superblock mount options when a
cap is dropped.
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/debugfs.c')
-rw-r--r-- | fs/ceph/debugfs.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/ceph/debugfs.c b/fs/ceph/debugfs.c index b58bd9188692..1a47b5c25b5f 100644 --- a/fs/ceph/debugfs.c +++ b/fs/ceph/debugfs.c | |||
@@ -255,14 +255,15 @@ static int osdc_show(struct seq_file *s, void *pp) | |||
255 | static int caps_show(struct seq_file *s, void *p) | 255 | static int caps_show(struct seq_file *s, void *p) |
256 | { | 256 | { |
257 | struct ceph_client *client = p; | 257 | struct ceph_client *client = p; |
258 | int total, avail, used, reserved; | 258 | int total, avail, used, reserved, min; |
259 | 259 | ||
260 | ceph_reservation_status(client, &total, &avail, &used, &reserved); | 260 | ceph_reservation_status(client, &total, &avail, &used, &reserved, &min); |
261 | seq_printf(s, "total\t\t%d\n" | 261 | seq_printf(s, "total\t\t%d\n" |
262 | "avail\t\t%d\n" | 262 | "avail\t\t%d\n" |
263 | "used\t\t%d\n" | 263 | "used\t\t%d\n" |
264 | "reserved\t%d\n", | 264 | "reserved\t%d\n" |
265 | total, avail, used, reserved); | 265 | "min\t%d\n", |
266 | total, avail, used, reserved, min); | ||
266 | return 0; | 267 | return 0; |
267 | } | 268 | } |
268 | 269 | ||