[RFC PATCH 8/10] relay - Clean up remaining padding-related junk.

Previous thread: [RFC PATCH 7/10] relay - Remove padding-related code from relay_read()/relay_splice_read() et al. by Tom Zanussi on Friday, September 26, 2008 - 11:18 pm. (1 message)

Next thread: [RFC PATCH 9/10] relay - Replace subbuf_start and notify_consumers callbacks with new_subbuf. by Tom Zanussi on Friday, September 26, 2008 - 11:18 pm. (1 message)
From: Tom Zanussi
Date: Friday, September 26, 2008 - 11:18 pm

Clean up remaining padding-related junk.

Removes the rest of the padding-related junk.  Also simplifies the
subbuf_start callback a bit.
---
 block/blktrace.c      |    5 +++--
 include/linux/relay.h |   12 ++----------
 kernel/relay.c        |   20 ++++----------------
 virt/kvm/kvm_trace.c  |    7 ++++---
 4 files changed, 13 insertions(+), 31 deletions(-)

diff --git a/block/blktrace.c b/block/blktrace.c
index 150c5f7..271b7b7 100644
--- a/block/blktrace.c
+++ b/block/blktrace.c
@@ -334,8 +334,9 @@ static const struct file_operations blk_msg_fops = {
  * Keep track of how many times we encountered a full subbuffer, to aid
  * the user space app in telling how many lost events there were.
  */
-static int blk_subbuf_start_callback(struct rchan_buf *buf, void *subbuf,
-				     void *prev_subbuf, size_t prev_padding)
+static int blk_subbuf_start_callback(struct rchan_buf *buf,
+				     void *subbuf,
+				     int first_subbuf)
 {
 	struct blk_trace *bt;
 
diff --git a/include/linux/relay.h b/include/linux/relay.h
index 21eba2a..172c904 100644
--- a/include/linux/relay.h
+++ b/include/linux/relay.h
@@ -51,8 +51,6 @@ struct rchan_buf
 	struct page **page_array;	/* array of current buffer pages */
 	unsigned int page_count;	/* number of current buffer pages */
 	unsigned int finalized;		/* buffer has been finalized */
-	size_t *padding;		/* padding counts per sub-buffer */
-	size_t prev_padding;		/* temporary variable */
 	size_t bytes_consumed;		/* bytes consumed in cur read subbuf */
 	size_t early_bytes;		/* bytes consumed before VFS inited */
 	unsigned int cpu;		/* this buf's cpu */
@@ -88,23 +86,17 @@ struct rchan_callbacks
 	 * subbuf_start - called on buffer-switch to a new sub-buffer
 	 * @buf: the channel buffer containing the new sub-buffer
 	 * @subbuf: the start of the new sub-buffer
-	 * @prev_subbuf: the start of the previous sub-buffer
-	 * @prev_padding: unused space at the end of previous sub-buffer
+	 * @first_subbuf: boolean, is this the first ...
Previous thread: [RFC PATCH 7/10] relay - Remove padding-related code from relay_read()/relay_splice_read() et al. by Tom Zanussi on Friday, September 26, 2008 - 11:18 pm. (1 message)

Next thread: [RFC PATCH 9/10] relay - Replace subbuf_start and notify_consumers callbacks with new_subbuf. by Tom Zanussi on Friday, September 26, 2008 - 11:18 pm. (1 message)