diff options
author | Joe Perches <joe@perches.com> | 2013-04-30 18:27:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-30 20:04:05 -0400 |
commit | c2b3e1f76e5c90215bc7f740b376c0220eb8a8e3 (patch) | |
tree | 4ffbb3029d06909e05621ebb96b66052640f3ff7 /fs/hfs/extent.c | |
parent | 5f3726f9457d5a863721353786e3395cdbd0f943 (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/hfs/extent.c')
-rw-r--r-- | fs/hfs/extent.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/fs/hfs/extent.c b/fs/hfs/extent.c index 813447b5b052..e33a0d36a93e 100644 --- a/fs/hfs/extent.c +++ b/fs/hfs/extent.c | |||
@@ -205,11 +205,12 @@ static void hfs_dump_extent(struct hfs_extent *extent) | |||
205 | { | 205 | { |
206 | int i; | 206 | int i; |
207 | 207 | ||
208 | dprint(DBG_EXTENT, " "); | 208 | hfs_dbg(EXTENT, " "); |
209 | for (i = 0; i < 3; i++) | 209 | for (i = 0; i < 3; i++) |
210 | dprint(DBG_EXTENT, " %u:%u", be16_to_cpu(extent[i].block), | 210 | hfs_dbg_cont(EXTENT, " %u:%u", |
211 | be16_to_cpu(extent[i].count)); | 211 | be16_to_cpu(extent[i].block), |
212 | dprint(DBG_EXTENT, "\n"); | 212 | be16_to_cpu(extent[i].count)); |
213 | hfs_dbg_cont(EXTENT, "\n"); | ||
213 | } | 214 | } |
214 | 215 | ||
215 | static int hfs_add_extent(struct hfs_extent *extent, u16 offset, | 216 | static int hfs_add_extent(struct hfs_extent *extent, u16 offset, |
@@ -404,10 +405,10 @@ int hfs_extend_file(struct inode *inode) | |||
404 | goto out; | 405 | goto out; |
405 | } | 406 | } |
406 | 407 | ||
407 | dprint(DBG_EXTENT, "extend %lu: %u,%u\n", inode->i_ino, start, len); | 408 | hfs_dbg(EXTENT, "extend %lu: %u,%u\n", inode->i_ino, start, len); |
408 | if (HFS_I(inode)->alloc_blocks == HFS_I(inode)->first_blocks) { | 409 | if (HFS_I(inode)->alloc_blocks == HFS_I(inode)->first_blocks) { |
409 | if (!HFS_I(inode)->first_blocks) { | 410 | if (!HFS_I(inode)->first_blocks) { |
410 | dprint(DBG_EXTENT, "first extents\n"); | 411 | hfs_dbg(EXTENT, "first extents\n"); |
411 | /* no extents yet */ | 412 | /* no extents yet */ |
412 | HFS_I(inode)->first_extents[0].block = cpu_to_be16(start); | 413 | HFS_I(inode)->first_extents[0].block = cpu_to_be16(start); |
413 | HFS_I(inode)->first_extents[0].count = cpu_to_be16(len); | 414 | HFS_I(inode)->first_extents[0].count = cpu_to_be16(len); |
@@ -449,7 +450,7 @@ out: | |||
449 | return res; | 450 | return res; |
450 | 451 | ||
451 | insert_extent: | 452 | insert_extent: |
452 | dprint(DBG_EXTENT, "insert new extent\n"); | 453 | hfs_dbg(EXTENT, "insert new extent\n"); |
453 | res = hfs_ext_write_extent(inode); | 454 | res = hfs_ext_write_extent(inode); |
454 | if (res) | 455 | if (res) |
455 | goto out; | 456 | goto out; |
@@ -474,8 +475,9 @@ void hfs_file_truncate(struct inode *inode) | |||
474 | u32 size; | 475 | u32 size; |
475 | int res; | 476 | int res; |
476 | 477 | ||
477 | dprint(DBG_INODE, "truncate: %lu, %Lu -> %Lu\n", inode->i_ino, | 478 | hfs_dbg(INODE, "truncate: %lu, %Lu -> %Lu\n", |
478 | (long long)HFS_I(inode)->phys_size, inode->i_size); | 479 | inode->i_ino, (long long)HFS_I(inode)->phys_size, |
480 | inode->i_size); | ||
479 | if (inode->i_size > HFS_I(inode)->phys_size) { | 481 | if (inode->i_size > HFS_I(inode)->phys_size) { |
480 | struct address_space *mapping = inode->i_mapping; | 482 | struct address_space *mapping = inode->i_mapping; |
481 | void *fsdata; | 483 | void *fsdata; |