summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaugata Das <saugata.das@linaro.org>2012-05-17 17:51:29 +0530
committerVenkatraman S <svenkatr@ti.com>2012-08-21 13:57:22 +0530
commita8dac16b0f0aaa07604b52712d611034dee40e1f (patch)
tree72553b620b78cd54545ac06348bbf52ee264e9a1
parentd9875690d9b89a866022ff49e3fcea892345ad92 (diff)
downloadlinux-topics-a8dac16b0f0aaa07604b52712d611034dee40e1f.tar.gz
block: add BH_Meta flag
Today, storage devices like eMMC has special features like data tagging (introduced in MMC-4.5 version) in order to improve performance of some specific writes. On MMC stack, data tagging is used for all writes which has REQ_META flag set. This patch adds the capability to add REQ_META flag during meta data write. Signed-off-by: Saugata Das <saugata.das@linaro.org> changes in v2: Replaced the conditionals around submit_bh as suggested in the review comments from Boaz
-rw-r--r--fs/buffer.c6
-rw-r--r--include/linux/buffer_head.h2
2 files changed, 6 insertions, 2 deletions
diff --git a/fs/buffer.c b/fs/buffer.c
index 9f6d2e41281..81d724b1fc1 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -1690,7 +1690,8 @@ static int __block_write_full_page(struct inode *inode, struct page *page,
do {
struct buffer_head *next = bh->b_this_page;
if (buffer_async_write(bh)) {
- submit_bh(write_op, bh);
+ submit_bh(write_op |
+ (buffer_meta(bh) << __REQ_META), bh);
nr_underway++;
}
bh = next;
@@ -1744,7 +1745,8 @@ recover:
struct buffer_head *next = bh->b_this_page;
if (buffer_async_write(bh)) {
clear_buffer_dirty(bh);
- submit_bh(write_op, bh);
+ submit_bh(write_op |
+ (buffer_meta(bh) << __REQ_META), bh);
nr_underway++;
}
bh = next;
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h
index 458f497738a..13bba1796db 100644
--- a/include/linux/buffer_head.h
+++ b/include/linux/buffer_head.h
@@ -34,6 +34,7 @@ enum bh_state_bits {
BH_Write_EIO, /* I/O error on write */
BH_Unwritten, /* Buffer is allocated on disk but not written */
BH_Quiet, /* Buffer Error Prinks to be quiet */
+ BH_Meta, /* Is meta */
BH_PrivateStart,/* not a state bit, but the first bit available
* for private allocation by other entities
@@ -124,6 +125,7 @@ BUFFER_FNS(Delay, delay)
BUFFER_FNS(Boundary, boundary)
BUFFER_FNS(Write_EIO, write_io_error)
BUFFER_FNS(Unwritten, unwritten)
+BUFFER_FNS(Meta, meta)
#define bh_offset(bh) ((unsigned long)(bh)->b_data & ~PAGE_MASK)
#define touch_buffer(bh) mark_page_accessed(bh->b_page)