mirror of
https://github.com/torvalds/linux.git
synced 2024-11-14 08:02:07 +00:00
219ace6077
These are common private headers with rnbd protocol structures, logging, sysfs and other helper functions, which are used on both client and server sides. Link: https://lore.kernel.org/r/20200511135131.27580-16-danil.kipnis@cloud.ionos.com Signed-off-by: Danil Kipnis <danil.kipnis@cloud.ionos.com> Signed-off-by: Jack Wang <jinpu.wang@cloud.ionos.com> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Acked-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
42 lines
1.4 KiB
C
42 lines
1.4 KiB
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
/*
|
|
* RDMA Network Block Driver
|
|
*
|
|
* Copyright (c) 2014 - 2018 ProfitBricks GmbH. All rights reserved.
|
|
* Copyright (c) 2018 - 2019 1&1 IONOS Cloud GmbH. All rights reserved.
|
|
* Copyright (c) 2019 - 2020 1&1 IONOS SE. All rights reserved.
|
|
*/
|
|
#ifndef RNBD_LOG_H
|
|
#define RNBD_LOG_H
|
|
|
|
#include "rnbd-clt.h"
|
|
#include "rnbd-srv.h"
|
|
|
|
#define rnbd_clt_log(fn, dev, fmt, ...) ( \
|
|
fn("<%s@%s> " fmt, (dev)->pathname, \
|
|
(dev)->sess->sessname, \
|
|
##__VA_ARGS__))
|
|
#define rnbd_srv_log(fn, dev, fmt, ...) ( \
|
|
fn("<%s@%s>: " fmt, (dev)->pathname, \
|
|
(dev)->sess->sessname, ##__VA_ARGS__))
|
|
|
|
#define rnbd_clt_err(dev, fmt, ...) \
|
|
rnbd_clt_log(pr_err, dev, fmt, ##__VA_ARGS__)
|
|
#define rnbd_clt_err_rl(dev, fmt, ...) \
|
|
rnbd_clt_log(pr_err_ratelimited, dev, fmt, ##__VA_ARGS__)
|
|
#define rnbd_clt_info(dev, fmt, ...) \
|
|
rnbd_clt_log(pr_info, dev, fmt, ##__VA_ARGS__)
|
|
#define rnbd_clt_info_rl(dev, fmt, ...) \
|
|
rnbd_clt_log(pr_info_ratelimited, dev, fmt, ##__VA_ARGS__)
|
|
|
|
#define rnbd_srv_err(dev, fmt, ...) \
|
|
rnbd_srv_log(pr_err, dev, fmt, ##__VA_ARGS__)
|
|
#define rnbd_srv_err_rl(dev, fmt, ...) \
|
|
rnbd_srv_log(pr_err_ratelimited, dev, fmt, ##__VA_ARGS__)
|
|
#define rnbd_srv_info(dev, fmt, ...) \
|
|
rnbd_srv_log(pr_info, dev, fmt, ##__VA_ARGS__)
|
|
#define rnbd_srv_info_rl(dev, fmt, ...) \
|
|
rnbd_srv_log(pr_info_ratelimited, dev, fmt, ##__VA_ARGS__)
|
|
|
|
#endif /* RNBD_LOG_H */
|