aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hfsplus/extents.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-04-30 18:27:54 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-30 20:04:05 -0400
commitc2b3e1f76e5c90215bc7f740b376c0220eb8a8e3 (patch)
tree4ffbb3029d06909e05621ebb96b66052640f3ff7 /fs/hfsplus/extents.c
parent5f3726f9457d5a863721353786e3395cdbd0f943 (diff)
hfs/hfsplus: convert dprint to hfs_dbg
Use a more current logging style. Rename macro and uses. Add do {} while (0) to macro. Add DBG_ to macro. Add and use hfs_dbg_cont variant where appropriate. Signed-off-by: Joe Perches <joe@perches.com> Cc: Vyacheslav Dubeyko <slava@dubeyko.com> Cc: Hin-Tak Leung <htl10@users.sourceforge.net> Cc: Christoph Hellwig <hch@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/hfsplus/extents.c')
-rw-r--r--fs/hfsplus/extents.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/fs/hfsplus/extents.c b/fs/hfsplus/extents.c
index fe0a76213d9e..64a532acc5e2 100644
--- a/fs/hfsplus/extents.c
+++ b/fs/hfsplus/extents.c
@@ -265,7 +265,7 @@ int hfsplus_get_block(struct inode *inode, sector_t iblock,
265 mutex_unlock(&hip->extents_lock); 265 mutex_unlock(&hip->extents_lock);
266 266
267done: 267done:
268 dprint(DBG_EXTENT, "get_block(%lu): %llu - %u\n", 268 hfs_dbg(EXTENT, "get_block(%lu): %llu - %u\n",
269 inode->i_ino, (long long)iblock, dblock); 269 inode->i_ino, (long long)iblock, dblock);
270 270
271 mask = (1 << sbi->fs_shift) - 1; 271 mask = (1 << sbi->fs_shift) - 1;
@@ -288,11 +288,12 @@ static void hfsplus_dump_extent(struct hfsplus_extent *extent)
288{ 288{
289 int i; 289 int i;
290 290
291 dprint(DBG_EXTENT, " "); 291 hfs_dbg(EXTENT, " ");
292 for (i = 0; i < 8; i++) 292 for (i = 0; i < 8; i++)
293 dprint(DBG_EXTENT, " %u:%u", be32_to_cpu(extent[i].start_block), 293 hfs_dbg_cont(EXTENT, " %u:%u",
294 be32_to_cpu(extent[i].block_count)); 294 be32_to_cpu(extent[i].start_block),
295 dprint(DBG_EXTENT, "\n"); 295 be32_to_cpu(extent[i].block_count));
296 hfs_dbg_cont(EXTENT, "\n");
296} 297}
297 298
298static int hfsplus_add_extent(struct hfsplus_extent *extent, u32 offset, 299static int hfsplus_add_extent(struct hfsplus_extent *extent, u32 offset,
@@ -349,7 +350,7 @@ found:
349 err = hfsplus_block_free(sb, start, count); 350 err = hfsplus_block_free(sb, start, count);
350 if (err) { 351 if (err) {
351 printk(KERN_ERR "hfs: can't free extent\n"); 352 printk(KERN_ERR "hfs: can't free extent\n");
352 dprint(DBG_EXTENT, " start: %u count: %u\n", 353 hfs_dbg(EXTENT, " start: %u count: %u\n",
353 start, count); 354 start, count);
354 } 355 }
355 extent->block_count = 0; 356 extent->block_count = 0;
@@ -360,7 +361,7 @@ found:
360 err = hfsplus_block_free(sb, start + count, block_nr); 361 err = hfsplus_block_free(sb, start + count, block_nr);
361 if (err) { 362 if (err) {
362 printk(KERN_ERR "hfs: can't free extent\n"); 363 printk(KERN_ERR "hfs: can't free extent\n");
363 dprint(DBG_EXTENT, " start: %u count: %u\n", 364 hfs_dbg(EXTENT, " start: %u count: %u\n",
364 start, count); 365 start, count);
365 } 366 }
366 extent->block_count = cpu_to_be32(count); 367 extent->block_count = cpu_to_be32(count);
@@ -459,11 +460,11 @@ int hfsplus_file_extend(struct inode *inode)
459 } 460 }
460 } 461 }
461 462
462 dprint(DBG_EXTENT, "extend %lu: %u,%u\n", inode->i_ino, start, len); 463 hfs_dbg(EXTENT, "extend %lu: %u,%u\n", inode->i_ino, start, len);
463 464
464 if (hip->alloc_blocks <= hip->first_blocks) { 465 if (hip->alloc_blocks <= hip->first_blocks) {
465 if (!hip->first_blocks) { 466 if (!hip->first_blocks) {
466 dprint(DBG_EXTENT, "first extents\n"); 467 hfs_dbg(EXTENT, "first extents\n");
467 /* no extents yet */ 468 /* no extents yet */
468 hip->first_extents[0].start_block = cpu_to_be32(start); 469 hip->first_extents[0].start_block = cpu_to_be32(start);
469 hip->first_extents[0].block_count = cpu_to_be32(len); 470 hip->first_extents[0].block_count = cpu_to_be32(len);
@@ -500,7 +501,7 @@ out:
500 return res; 501 return res;
501 502
502insert_extent: 503insert_extent:
503 dprint(DBG_EXTENT, "insert new extent\n"); 504 hfs_dbg(EXTENT, "insert new extent\n");
504 res = hfsplus_ext_write_extent_locked(inode); 505 res = hfsplus_ext_write_extent_locked(inode);
505 if (res) 506 if (res)
506 goto out; 507 goto out;
@@ -525,9 +526,8 @@ void hfsplus_file_truncate(struct inode *inode)
525 u32 alloc_cnt, blk_cnt, start; 526 u32 alloc_cnt, blk_cnt, start;
526 int res; 527 int res;
527 528
528 dprint(DBG_INODE, "truncate: %lu, %llu -> %llu\n", 529 hfs_dbg(INODE, "truncate: %lu, %llu -> %llu\n",
529 inode->i_ino, (long long)hip->phys_size, 530 inode->i_ino, (long long)hip->phys_size, inode->i_size);
530 inode->i_size);
531 531
532 if (inode->i_size > hip->phys_size) { 532 if (inode->i_size > hip->phys_size) {
533 struct address_space *mapping = inode->i_mapping; 533 struct address_space *mapping = inode->i_mapping;