diff options
Diffstat (limited to 'fs/exofs/ios.c')
-rw-r--r-- | fs/exofs/ios.c | 38 |
1 files changed, 32 insertions, 6 deletions
diff --git a/fs/exofs/ios.c b/fs/exofs/ios.c index 5bad01fa1f9f..3cc0dd3f0eb2 100644 --- a/fs/exofs/ios.c +++ b/fs/exofs/ios.c | |||
@@ -26,6 +26,9 @@ | |||
26 | 26 | ||
27 | #include "exofs.h" | 27 | #include "exofs.h" |
28 | 28 | ||
29 | #define EXOFS_DBGMSG2(M...) do {} while (0) | ||
30 | /* #define EXOFS_DBGMSG2 EXOFS_DBGMSG */ | ||
31 | |||
29 | void exofs_make_credential(u8 cred_a[OSD_CAP_LEN], const struct osd_obj_id *obj) | 32 | void exofs_make_credential(u8 cred_a[OSD_CAP_LEN], const struct osd_obj_id *obj) |
30 | { | 33 | { |
31 | osd_sec_init_nosec_doall_caps(cred_a, obj, false, true); | 34 | osd_sec_init_nosec_doall_caps(cred_a, obj, false, true); |
@@ -73,6 +76,8 @@ int exofs_get_io_state(struct exofs_sb_info *sbi, struct exofs_io_state** pios) | |||
73 | */ | 76 | */ |
74 | ios = kzalloc(exofs_io_state_size(sbi->s_numdevs), GFP_KERNEL); | 77 | ios = kzalloc(exofs_io_state_size(sbi->s_numdevs), GFP_KERNEL); |
75 | if (unlikely(!ios)) { | 78 | if (unlikely(!ios)) { |
79 | EXOFS_DBGMSG("Faild kzalloc bytes=%d\n", | ||
80 | exofs_io_state_size(sbi->s_numdevs)); | ||
76 | *pios = NULL; | 81 | *pios = NULL; |
77 | return -ENOMEM; | 82 | return -ENOMEM; |
78 | } | 83 | } |
@@ -276,6 +281,9 @@ int exofs_sbi_write(struct exofs_io_state *ios) | |||
276 | bio = bio_kmalloc(GFP_KERNEL, | 281 | bio = bio_kmalloc(GFP_KERNEL, |
277 | ios->bio->bi_max_vecs); | 282 | ios->bio->bi_max_vecs); |
278 | if (unlikely(!bio)) { | 283 | if (unlikely(!bio)) { |
284 | EXOFS_DBGMSG( | ||
285 | "Faild to allocate BIO size=%u\n", | ||
286 | ios->bio->bi_max_vecs); | ||
279 | ret = -ENOMEM; | 287 | ret = -ENOMEM; |
280 | goto out; | 288 | goto out; |
281 | } | 289 | } |
@@ -290,14 +298,21 @@ int exofs_sbi_write(struct exofs_io_state *ios) | |||
290 | 298 | ||
291 | osd_req_write(or, &ios->obj, ios->offset, bio, | 299 | osd_req_write(or, &ios->obj, ios->offset, bio, |
292 | ios->length); | 300 | ios->length); |
293 | /* EXOFS_DBGMSG("write sync=%d\n", sync);*/ | 301 | EXOFS_DBGMSG("write(0x%llx) offset=0x%llx " |
302 | "length=0x%llx dev=%d\n", | ||
303 | _LLU(ios->obj.id), _LLU(ios->offset), | ||
304 | _LLU(ios->length), i); | ||
294 | } else if (ios->kern_buff) { | 305 | } else if (ios->kern_buff) { |
295 | osd_req_write_kern(or, &ios->obj, ios->offset, | 306 | osd_req_write_kern(or, &ios->obj, ios->offset, |
296 | ios->kern_buff, ios->length); | 307 | ios->kern_buff, ios->length); |
297 | /* EXOFS_DBGMSG("write_kern sync=%d\n", sync);*/ | 308 | EXOFS_DBGMSG2("write_kern(0x%llx) offset=0x%llx " |
309 | "length=0x%llx dev=%d\n", | ||
310 | _LLU(ios->obj.id), _LLU(ios->offset), | ||
311 | _LLU(ios->length), i); | ||
298 | } else { | 312 | } else { |
299 | osd_req_set_attributes(or, &ios->obj); | 313 | osd_req_set_attributes(or, &ios->obj); |
300 | /* EXOFS_DBGMSG("set_attributes sync=%d\n", sync);*/ | 314 | EXOFS_DBGMSG2("obj(0x%llx) set_attributes=%d dev=%d\n", |
315 | _LLU(ios->obj.id), ios->out_attr_len, i); | ||
301 | } | 316 | } |
302 | 317 | ||
303 | if (ios->out_attr) | 318 | if (ios->out_attr) |
@@ -335,14 +350,25 @@ int exofs_sbi_read(struct exofs_io_state *ios) | |||
335 | if (ios->bio) { | 350 | if (ios->bio) { |
336 | osd_req_read(or, &ios->obj, ios->offset, ios->bio, | 351 | osd_req_read(or, &ios->obj, ios->offset, ios->bio, |
337 | ios->length); | 352 | ios->length); |
338 | /* EXOFS_DBGMSG("read sync=%d\n", sync);*/ | 353 | EXOFS_DBGMSG("read(0x%llx) offset=0x%llx length=0x%llx" |
354 | " dev=%d\n", _LLU(ios->obj.id), | ||
355 | _LLU(ios->offset), | ||
356 | _LLU(ios->length), | ||
357 | first_dev); | ||
339 | } else if (ios->kern_buff) { | 358 | } else if (ios->kern_buff) { |
340 | osd_req_read_kern(or, &ios->obj, ios->offset, | 359 | osd_req_read_kern(or, &ios->obj, ios->offset, |
341 | ios->kern_buff, ios->length); | 360 | ios->kern_buff, ios->length); |
342 | /* EXOFS_DBGMSG("read_kern sync=%d\n", sync);*/ | 361 | EXOFS_DBGMSG2("read_kern(0x%llx) offset=0x%llx " |
362 | "length=0x%llx dev=%d\n", | ||
363 | _LLU(ios->obj.id), | ||
364 | _LLU(ios->offset), | ||
365 | _LLU(ios->length), | ||
366 | first_dev); | ||
343 | } else { | 367 | } else { |
344 | osd_req_get_attributes(or, &ios->obj); | 368 | osd_req_get_attributes(or, &ios->obj); |
345 | /* EXOFS_DBGMSG("get_attributes sync=%d\n", sync);*/ | 369 | EXOFS_DBGMSG2("obj(0x%llx) get_attributes=%d dev=%d\n", |
370 | _LLU(ios->obj.id), ios->in_attr_len, | ||
371 | first_dev); | ||
346 | } | 372 | } |
347 | 373 | ||
348 | if (ios->out_attr) | 374 | if (ios->out_attr) |