Re: [PATCH] Btrfs: Include the device in most error printk()s

2013-03-03 Thread David Sterba
On Fri, Feb 15, 2013 at 05:12:37PM -0600, Simon Kirby wrote:
[...]
 Signed-off-by: Simon Kirby s...@hostway.ca

Thanks! 2 comments below.

Reviewed-by: David Sterba dste...@suse.cz

 @@ -2919,8 +2923,9 @@ int btrfs_write_out_ino_cache(struct btrfs_root *root,
   if (ret) {
   btrfs_delalloc_release_metadata(inode, inode-i_size);
  #ifdef DEBUG
 - printk(KERN_ERR btrfs: failed to write free ino cache 
 -for root %llu\n, root-root_key.objectid);
 + btrfs_err(root-fs_info,
 + btrfs %s: failed to write free ino cache for root 
 %llu,
 + root-root_key.objectid);

failed to write free ino cache for root %llu,

  #endif
   }
  
 @@ -2454,8 +2456,8 @@ int btrfs_orphan_cleanup(struct btrfs_root *root)
   ret = PTR_ERR(trans);
   goto out;
   }
 - printk(KERN_ERR auto deleting %Lu\n,
 -found_key.objectid);
 + btrfs_err(root-fs_info, auto deleting %Lu,
 + found_key.objectid);

That's probably only a debugging message, so btrfs_debug would be more
appropriate here.

   ret = btrfs_del_orphan_item(trans, root,
   found_key.objectid);
   BUG_ON(ret); /* -ENOMEM or corruption (JDM: Recheck) */
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Btrfs: Include the device in most error printk()s

2013-02-14 Thread David Sterba
On Wed, Feb 13, 2013 at 03:25:31PM -0600, Simon Kirby wrote:
 With more than one btrfs volume mounted, it can be very difficult to find
 out which volume is hitting an error. btrfs_error() will print this, but
 it is currently rigged as more of a fatal error handler, while many of
 the printk()s are currently for debugging and yet-unhandled cases.

Please use btrfs_printk(fs_info, format, ...) for that purpose. That way
we can tune the message output format at one place. Also please do not
split format strings to more lines, this breaks grep when looking for
error messages in the sources.

david
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html