Files
scoutfs/kmod/src/msg.c
Zach Brown e67a5c9ba4 scoutfs: add _sk console message wrappers
Add some _sk suffix variants of the message printing calls so that we
can use per-cpu key buffer arguments without the full SK_PCPU() wrapper.

Signed-off-by: Zach Brown <zab@versity.com>
2017-11-21 13:11:43 -08:00

27 lines
613 B
C

#include <linux/kernel.h>
#include <linux/fs.h>
#include "msg.h"
/*
* This can be called with pre-emption disabled if the caller is printing
* the contents of formated per-cpu key string buffers.
*/
void scoutfs_msg(struct super_block *sb, const char *prefix, const char *str,
const char *fmt, ...)
{
struct va_format vaf;
va_list args;
va_start(args, fmt);
vaf.fmt = fmt;
vaf.va = &args;
printk("%sscoutfs (%s %u:%u)%s: %pV\n", prefix,
sb->s_id, MAJOR(sb->s_bdev->bd_dev), MINOR(sb->s_bdev->bd_dev),
str, &vaf);
va_end(args);
}