summaryrefslogtreecommitdiff
path: root/include/linux/buffer_head.h
diff options
context:
space:
mode:
authorChris Mason <mason@suse.com>2004-08-22 22:38:24 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-08-22 22:38:24 -0700
commitd16b94fe079f79cb9a268a2fb9576a84c562d4e3 (patch)
treefd87566198a4295ad9d9562bce07a101f4906d8b /include/linux/buffer_head.h
parenta88cff7fcf8532decbbec25aaf0ba57e97d98227 (diff)
[PATCH] add BH_Eopnotsupp for testing async barrier failures
In order for filesystems to detect asynchronous ordered write failures for buffers sent via submit_bh, they need a bit they can test for in the buffer head. This adds BH_Eopnotsupp and the related buffer operations end_buffer_write_sync is changed to avoid a printk for BH_Eoptnotsupp related failures, since the FS is responsible for a retry. sync_dirty_buffer is changed to test for BH_Eopnotsupp and return -EOPNOTSUPP to the caller Some of this came from Jens Axboe Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/buffer_head.h')
-rw-r--r--include/linux/buffer_head.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h
index ef849b7a1f6d..59ed4d09a9db 100644
--- a/include/linux/buffer_head.h
+++ b/include/linux/buffer_head.h
@@ -27,6 +27,7 @@ enum bh_state_bits {
BH_Boundary, /* Block is followed by a discontiguity */
BH_Write_EIO, /* I/O error on write */
BH_Ordered, /* ordered write */
+ BH_Eopnotsupp, /* operation not supported (barrier) */
BH_PrivateStart,/* not a state bit, but the first bit available
* for private allocation by other entities
@@ -113,6 +114,7 @@ BUFFER_FNS(Delay, delay)
BUFFER_FNS(Boundary, boundary)
BUFFER_FNS(Write_EIO, write_io_error)
BUFFER_FNS(Ordered, ordered)
+BUFFER_FNS(Eopnotsupp, eopnotsupp)
#define bh_offset(bh) ((unsigned long)(bh)->b_data & ~PAGE_MASK)
#define touch_buffer(bh) mark_page_accessed(bh->b_page)