diff options
| -rw-r--r-- | fs/relayfs/relay.c | 8 | ||||
| -rw-r--r-- | include/linux/relayfs_fs.h | 5 |
2 files changed, 9 insertions, 4 deletions
diff --git a/fs/relayfs/relay.c b/fs/relayfs/relay.c index 16446a15c96d..2a6f7f12b7f9 100644 --- a/fs/relayfs/relay.c +++ b/fs/relayfs/relay.c | |||
| @@ -333,8 +333,7 @@ size_t relay_switch_subbuf(struct rchan_buf *buf, size_t length) | |||
| 333 | return length; | 333 | return length; |
| 334 | 334 | ||
| 335 | toobig: | 335 | toobig: |
| 336 | printk(KERN_WARNING "relayfs: event too large (%Zd)\n", length); | 336 | buf->chan->last_toobig = length; |
| 337 | WARN_ON(1); | ||
| 338 | return 0; | 337 | return 0; |
| 339 | } | 338 | } |
| 340 | 339 | ||
| @@ -399,6 +398,11 @@ void relay_close(struct rchan *chan) | |||
| 399 | relay_close_buf(chan->buf[i]); | 398 | relay_close_buf(chan->buf[i]); |
| 400 | } | 399 | } |
| 401 | 400 | ||
| 401 | if (chan->last_toobig) | ||
| 402 | printk(KERN_WARNING "relayfs: one or more items not logged " | ||
| 403 | "[item size (%Zd) > sub-buffer size (%Zd)]\n", | ||
| 404 | chan->last_toobig, chan->subbuf_size); | ||
| 405 | |||
| 402 | kref_put(&chan->kref, relay_destroy_channel); | 406 | kref_put(&chan->kref, relay_destroy_channel); |
| 403 | } | 407 | } |
| 404 | 408 | ||
diff --git a/include/linux/relayfs_fs.h b/include/linux/relayfs_fs.h index cfafc3e76bc2..fb7e80737325 100644 --- a/include/linux/relayfs_fs.h +++ b/include/linux/relayfs_fs.h | |||
| @@ -20,9 +20,9 @@ | |||
| 20 | #include <linux/kref.h> | 20 | #include <linux/kref.h> |
| 21 | 21 | ||
| 22 | /* | 22 | /* |
| 23 | * Tracks changes to rchan_buf struct | 23 | * Tracks changes to rchan/rchan_buf structs |
| 24 | */ | 24 | */ |
| 25 | #define RELAYFS_CHANNEL_VERSION 5 | 25 | #define RELAYFS_CHANNEL_VERSION 6 |
| 26 | 26 | ||
| 27 | /* | 27 | /* |
| 28 | * Per-cpu relay channel buffer | 28 | * Per-cpu relay channel buffer |
| @@ -60,6 +60,7 @@ struct rchan | |||
| 60 | struct rchan_callbacks *cb; /* client callbacks */ | 60 | struct rchan_callbacks *cb; /* client callbacks */ |
| 61 | struct kref kref; /* channel refcount */ | 61 | struct kref kref; /* channel refcount */ |
| 62 | void *private_data; /* for user-defined data */ | 62 | void *private_data; /* for user-defined data */ |
| 63 | size_t last_toobig; /* tried to log event > subbuf size */ | ||
| 63 | struct rchan_buf *buf[NR_CPUS]; /* per-cpu channel buffers */ | 64 | struct rchan_buf *buf[NR_CPUS]; /* per-cpu channel buffers */ |
| 64 | }; | 65 | }; |
| 65 | 66 | ||
