diff options
| -rw-r--r-- | fs/exofs/inode.c | 23 | ||||
| -rw-r--r-- | fs/exofs/ios.c | 38 |
2 files changed, 45 insertions, 16 deletions
diff --git a/fs/exofs/inode.c b/fs/exofs/inode.c index 2afbcebeda71..c88a0c5250cb 100644 --- a/fs/exofs/inode.c +++ b/fs/exofs/inode.c | |||
| @@ -193,7 +193,7 @@ static int __readpages_done(struct page_collect *pcol, bool do_unlock) | |||
| 193 | else | 193 | else |
| 194 | good_bytes = pcol->length - resid; | 194 | good_bytes = pcol->length - resid; |
| 195 | 195 | ||
| 196 | EXOFS_DBGMSG("readpages_done(0x%lx) good_bytes=0x%llx" | 196 | EXOFS_DBGMSG2("readpages_done(0x%lx) good_bytes=0x%llx" |
| 197 | " length=0x%lx nr_pages=%u\n", | 197 | " length=0x%lx nr_pages=%u\n", |
| 198 | pcol->inode->i_ino, _LLU(good_bytes), pcol->length, | 198 | pcol->inode->i_ino, _LLU(good_bytes), pcol->length, |
| 199 | pcol->nr_pages); | 199 | pcol->nr_pages); |
| @@ -222,7 +222,7 @@ static int __readpages_done(struct page_collect *pcol, bool do_unlock) | |||
| 222 | } | 222 | } |
| 223 | 223 | ||
| 224 | pcol_free(pcol); | 224 | pcol_free(pcol); |
| 225 | EXOFS_DBGMSG("readpages_done END\n"); | 225 | EXOFS_DBGMSG2("readpages_done END\n"); |
| 226 | return ret; | 226 | return ret; |
| 227 | } | 227 | } |
| 228 | 228 | ||
| @@ -290,7 +290,7 @@ static int read_exec(struct page_collect *pcol, bool is_sync) | |||
| 290 | 290 | ||
| 291 | atomic_inc(&pcol->sbi->s_curr_pending); | 291 | atomic_inc(&pcol->sbi->s_curr_pending); |
| 292 | 292 | ||
| 293 | EXOFS_DBGMSG("read_exec obj=0x%llx start=0x%llx length=0x%lx\n", | 293 | EXOFS_DBGMSG2("read_exec obj=0x%llx start=0x%llx length=0x%lx\n", |
| 294 | ios->obj.id, _LLU(ios->offset), pcol->length); | 294 | ios->obj.id, _LLU(ios->offset), pcol->length); |
| 295 | 295 | ||
| 296 | /* pages ownership was passed to pcol_copy */ | 296 | /* pages ownership was passed to pcol_copy */ |
| @@ -462,7 +462,7 @@ static void writepages_done(struct exofs_io_state *ios, void *p) | |||
| 462 | else | 462 | else |
| 463 | good_bytes = pcol->length - resid; | 463 | good_bytes = pcol->length - resid; |
| 464 | 464 | ||
| 465 | EXOFS_DBGMSG("writepages_done(0x%lx) good_bytes=0x%llx" | 465 | EXOFS_DBGMSG2("writepages_done(0x%lx) good_bytes=0x%llx" |
| 466 | " length=0x%lx nr_pages=%u\n", | 466 | " length=0x%lx nr_pages=%u\n", |
| 467 | pcol->inode->i_ino, _LLU(good_bytes), pcol->length, | 467 | pcol->inode->i_ino, _LLU(good_bytes), pcol->length, |
| 468 | pcol->nr_pages); | 468 | pcol->nr_pages); |
| @@ -490,7 +490,7 @@ static void writepages_done(struct exofs_io_state *ios, void *p) | |||
| 490 | 490 | ||
| 491 | pcol_free(pcol); | 491 | pcol_free(pcol); |
| 492 | kfree(pcol); | 492 | kfree(pcol); |
| 493 | EXOFS_DBGMSG("writepages_done END\n"); | 493 | EXOFS_DBGMSG2("writepages_done END\n"); |
| 494 | } | 494 | } |
| 495 | 495 | ||
| 496 | static int write_exec(struct page_collect *pcol) | 496 | static int write_exec(struct page_collect *pcol) |
| @@ -527,7 +527,7 @@ static int write_exec(struct page_collect *pcol) | |||
| 527 | } | 527 | } |
| 528 | 528 | ||
| 529 | atomic_inc(&pcol->sbi->s_curr_pending); | 529 | atomic_inc(&pcol->sbi->s_curr_pending); |
| 530 | EXOFS_DBGMSG("write_exec(0x%lx, 0x%llx) start=0x%llx length=0x%lx\n", | 530 | EXOFS_DBGMSG2("write_exec(0x%lx, 0x%llx) start=0x%llx length=0x%lx\n", |
| 531 | pcol->inode->i_ino, pcol->pg_first, _LLU(ios->offset), | 531 | pcol->inode->i_ino, pcol->pg_first, _LLU(ios->offset), |
| 532 | pcol->length); | 532 | pcol->length); |
| 533 | /* pages ownership was passed to pcol_copy */ | 533 | /* pages ownership was passed to pcol_copy */ |
| @@ -616,7 +616,7 @@ try_again: | |||
| 616 | 616 | ||
| 617 | ret = pcol_add_page(pcol, page, len); | 617 | ret = pcol_add_page(pcol, page, len); |
| 618 | if (unlikely(ret)) { | 618 | if (unlikely(ret)) { |
| 619 | EXOFS_DBGMSG("Failed pcol_add_page " | 619 | EXOFS_DBGMSG2("Failed pcol_add_page " |
| 620 | "nr_pages=%u total_length=0x%lx\n", | 620 | "nr_pages=%u total_length=0x%lx\n", |
| 621 | pcol->nr_pages, pcol->length); | 621 | pcol->nr_pages, pcol->length); |
| 622 | 622 | ||
| @@ -663,7 +663,7 @@ static int exofs_writepages(struct address_space *mapping, | |||
| 663 | if (expected_pages < 32L) | 663 | if (expected_pages < 32L) |
| 664 | expected_pages = 32L; | 664 | expected_pages = 32L; |
| 665 | 665 | ||
| 666 | EXOFS_DBGMSG("inode(0x%lx) wbc->start=0x%llx wbc->end=0x%llx " | 666 | EXOFS_DBGMSG2("inode(0x%lx) wbc->start=0x%llx wbc->end=0x%llx " |
| 667 | "nrpages=%lu start=0x%lx end=0x%lx expected_pages=%ld\n", | 667 | "nrpages=%lu start=0x%lx end=0x%lx expected_pages=%ld\n", |
| 668 | mapping->host->i_ino, wbc->range_start, wbc->range_end, | 668 | mapping->host->i_ino, wbc->range_start, wbc->range_end, |
| 669 | mapping->nrpages, start, end, expected_pages); | 669 | mapping->nrpages, start, end, expected_pages); |
| @@ -1170,8 +1170,10 @@ static int exofs_update_inode(struct inode *inode, int do_sync) | |||
| 1170 | int ret; | 1170 | int ret; |
| 1171 | 1171 | ||
| 1172 | args = kzalloc(sizeof(*args), GFP_KERNEL); | 1172 | args = kzalloc(sizeof(*args), GFP_KERNEL); |
| 1173 | if (!args) | 1173 | if (!args) { |
| 1174 | EXOFS_DBGMSG("Faild kzalloc of args\n"); | ||
| 1174 | return -ENOMEM; | 1175 | return -ENOMEM; |
| 1176 | } | ||
| 1175 | 1177 | ||
| 1176 | fcb = &args->fcb; | 1178 | fcb = &args->fcb; |
| 1177 | 1179 | ||
| @@ -1234,7 +1236,8 @@ static int exofs_update_inode(struct inode *inode, int do_sync) | |||
| 1234 | free_args: | 1236 | free_args: |
| 1235 | kfree(args); | 1237 | kfree(args); |
| 1236 | out: | 1238 | out: |
| 1237 | EXOFS_DBGMSG("ret=>%d\n", ret); | 1239 | EXOFS_DBGMSG("(0x%lx) do_sync=%d ret=>%d\n", |
| 1240 | inode->i_ino, do_sync, ret); | ||
| 1238 | return ret; | 1241 | return ret; |
| 1239 | } | 1242 | } |
| 1240 | 1243 | ||
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) |
