[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1224137215.16328.239.camel@charm-linux>
Date: Thu, 16 Oct 2008 01:06:55 -0500
From: Tom Zanussi <zanussi@...cast.net>
To: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Cc: Martin Bligh <mbligh@...gle.com>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
prasad@...ux.vnet.ibm.com,
Linus Torvalds <torvalds@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
Mathieu Desnoyers <compudj@...stal.dyndns.org>,
Steven Rostedt <rostedt@...dmis.org>, od@...e.com,
"Frank Ch. Eigler" <fche@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>, hch@....de,
David Wilder <dwilder@...ibm.com>,
Jens Axboe <jens.axboe@...cle.com>,
Pekka Enberg <penberg@...helsinki.fi>,
Eduard - Gabriel Munteanu <eduard.munteanu@...ux360.ro>
Subject: [RFC PATCH 20/21] Call padding callback on flush.
---
kernel/relay_pagewriter.c | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/kernel/relay_pagewriter.c b/kernel/relay_pagewriter.c
index 9bc1461..c3369f5 100644
--- a/kernel/relay_pagewriter.c
+++ b/kernel/relay_pagewriter.c
@@ -137,10 +137,18 @@ void pagewriter_flush(struct pagewriter *pagewriter)
return;
mutex_lock(&pagewriters_mutex);
- for_each_possible_cpu(i)
- if (pagewriter->buf[i])
- pagewriter->cb->switch_page(pagewriter->buf[i], 0,
- NULL);
+ for_each_possible_cpu(i) {
+ struct pagewriter_buf *buf = pagewriter->buf[i];
+ if (buf) {
+ if (buf->pagewriter->flags & PAGEWRITER_PAD_WRITES) {
+ void *padding = buf->data + buf->offset;
+ size_t padlen = PAGE_SIZE - buf->offset;
+ pagewriter->cb->write_padding(buf, padlen,
+ padding);
+ }
+ pagewriter->cb->switch_page(buf, 0, NULL);
+ }
+ }
relay_flush(pagewriter->rchan);
mutex_unlock(&pagewriters_mutex);
}
--
1.5.3.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists