|
19 | 19 | pr_debug("%.*s %12.12s:%-4d : " fmt, \ |
20 | 20 | 8 - (int)sizeof(KBUILD_MODNAME), " ", \ |
21 | 21 | kbasename(__FILE__), __LINE__, ##__VA_ARGS__) |
| 22 | +# define doutc(client, fmt, ...) \ |
| 23 | + pr_debug("%.*s %12.12s:%-4d : [%pU %llu] " fmt, \ |
| 24 | + 8 - (int)sizeof(KBUILD_MODNAME), " ", \ |
| 25 | + kbasename(__FILE__), __LINE__, \ |
| 26 | + &client->fsid, client->monc.auth->global_id, \ |
| 27 | + ##__VA_ARGS__) |
22 | 28 | # else |
23 | 29 | /* faux printk call just to see any compiler warnings. */ |
24 | 30 | # define dout(fmt, ...) do { \ |
25 | 31 | if (0) \ |
26 | 32 | printk(KERN_DEBUG fmt, ##__VA_ARGS__); \ |
27 | 33 | } while (0) |
| 34 | +# define doutc(client, fmt, ...) do { \ |
| 35 | + if (0) \ |
| 36 | + printk(KERN_DEBUG "[%pU %llu] " fmt, \ |
| 37 | + &client->fsid, \ |
| 38 | + client->monc.auth->global_id, \ |
| 39 | + ##__VA_ARGS__); \ |
| 40 | + } while (0) |
28 | 41 | # endif |
29 | 42 |
|
30 | 43 | #else |
|
33 | 46 | * or, just wrap pr_debug |
34 | 47 | */ |
35 | 48 | # define dout(fmt, ...) pr_debug(" " fmt, ##__VA_ARGS__) |
| 49 | +# define doutc(client, fmt, ...) \ |
| 50 | + pr_debug(" [%pU %llu] %s: " fmt, &client->fsid, \ |
| 51 | + client->monc.auth->global_id, __func__, ##__VA_ARGS__) |
36 | 52 |
|
37 | 53 | #endif |
38 | 54 |
|
| 55 | +#define pr_notice_client(client, fmt, ...) \ |
| 56 | + pr_notice("[%pU %llu]: " fmt, &client->fsid, \ |
| 57 | + client->monc.auth->global_id, ##__VA_ARGS__) |
| 58 | +#define pr_info_client(client, fmt, ...) \ |
| 59 | + pr_info("[%pU %llu]: " fmt, &client->fsid, \ |
| 60 | + client->monc.auth->global_id, ##__VA_ARGS__) |
| 61 | +#define pr_warn_client(client, fmt, ...) \ |
| 62 | + pr_warn("[%pU %llu]: " fmt, &client->fsid, \ |
| 63 | + client->monc.auth->global_id, ##__VA_ARGS__) |
| 64 | +#define pr_warn_once_client(client, fmt, ...) \ |
| 65 | + pr_warn_once("[%pU %llu]: " fmt, &client->fsid, \ |
| 66 | + client->monc.auth->global_id, ##__VA_ARGS__) |
| 67 | +#define pr_err_client(client, fmt, ...) \ |
| 68 | + pr_err("[%pU %llu]: " fmt, &client->fsid, \ |
| 69 | + client->monc.auth->global_id, ##__VA_ARGS__) |
| 70 | +#define pr_warn_ratelimited_client(client, fmt, ...) \ |
| 71 | + pr_warn_ratelimited("[%pU %llu]: " fmt, &client->fsid, \ |
| 72 | + client->monc.auth->global_id, ##__VA_ARGS__) |
| 73 | +#define pr_err_ratelimited_client(client, fmt, ...) \ |
| 74 | + pr_err_ratelimited("[%pU %llu]: " fmt, &client->fsid, \ |
| 75 | + client->monc.auth->global_id, ##__VA_ARGS__) |
| 76 | + |
39 | 77 | #endif |
0 commit comments