Merge commit 'refs/top-bases/linux-zfs-branch' into linux-zfs-branch

This commit is contained in:
Brian Behlendorf 2010-07-20 13:44:42 -07:00
commit b8ce701cb4
2 changed files with 17 additions and 11 deletions

View File

@ -55,8 +55,16 @@ extern int zfs_flags;
#ifdef ZFS_DEBUG
#if defined(_KERNEL) && defined(HAVE_SPL)
#include <sys/debug.h>
#define dprintf(...) CDEBUG_LIMIT(D_DPRINTF, __VA_ARGS__)
/*
* Log ZFS debug messages as the spl SS_USER1 subsystem.
*/
#include <spl-debug.h>
#ifdef SS_DEBUG_SUBSYS
#undef SS_DEBUG_SUBSYS
#endif
#define SS_DEBUG_SUBSYS SS_USER1
#define dprintf(...) SDEBUG_LIMIT(SD_DPRINTF, __VA_ARGS__)
#else
extern void __dprintf(const char *file, const char *func,
int line, const char *fmt, ...);

View File

@ -235,15 +235,13 @@ BIO_END_IO_PROTO(vdev_disk_physio_completion, bio, size, error)
int rc;
/* Fatal error but print some useful debugging before asserting */
if (dr == NULL) {
printk("FATAL: bio->bi_private == NULL\n"
"bi_next: %p, bi_flags: %lx, bi_rw: %lu, bi_vcnt: %d\n"
"bi_idx: %d, bi_size: %d, bi_end_io: %p, bi_cnt: %d\n",
bio->bi_next, bio->bi_flags, bio->bi_rw, bio->bi_vcnt,
bio->bi_idx, bio->bi_size, bio->bi_end_io,
atomic_read(&bio->bi_cnt));
SBUG();
}
if (dr == NULL)
PANIC("dr == NULL, bio->bi_private == NULL\n"
"bi_next: %p, bi_flags: %lx, bi_rw: %lu, bi_vcnt: %d\n"
"bi_idx: %d, bi_size: %d, bi_end_io: %p, bi_cnt: %d\n",
bio->bi_next, bio->bi_flags, bio->bi_rw, bio->bi_vcnt,
bio->bi_idx, bio->bi_size, bio->bi_end_io,
atomic_read(&bio->bi_cnt));
#ifndef HAVE_2ARGS_BIO_END_IO_T
if (bio->bi_size)