aboutsummaryrefslogtreecommitdiffstats
path: root/fs/logfs/logfs.h
diff options
context:
space:
mode:
authorJoern Engel <joern@logfs.org>2010-05-07 13:38:40 -0400
committerJoern Engel <joern@logfs.org>2010-05-07 13:38:40 -0400
commit6f485b41875dbf5160c1990322469c1f65f77b28 (patch)
tree9912cee9517b57c2cb3c0318861f2a9eeb4139b2 /fs/logfs/logfs.h
parentccf31c10f125ab5233c8517f91d4b3bd0bd60936 (diff)
logfs: handle powerfail on NAND flash
The write buffer may not have been written and may no longer be written due to an interrupted write in the affected page. Signed-off-by: Joern Engel <joern@logfs.org>
Diffstat (limited to 'fs/logfs/logfs.h')
-rw-r--r--fs/logfs/logfs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/logfs/logfs.h b/fs/logfs/logfs.h
index 26a9458e6b13..93b55f337245 100644
--- a/fs/logfs/logfs.h
+++ b/fs/logfs/logfs.h
@@ -144,6 +144,7 @@ struct logfs_area_ops {
144 * @erase: erase one segment 144 * @erase: erase one segment
145 * @read: read from the device 145 * @read: read from the device
146 * @erase: erase part of the device 146 * @erase: erase part of the device
147 * @can_write_buf: decide whether wbuf can be written to ofs
147 */ 148 */
148struct logfs_device_ops { 149struct logfs_device_ops {
149 struct page *(*find_first_sb)(struct super_block *sb, u64 *ofs); 150 struct page *(*find_first_sb)(struct super_block *sb, u64 *ofs);
@@ -153,6 +154,7 @@ struct logfs_device_ops {
153 void (*writeseg)(struct super_block *sb, u64 ofs, size_t len); 154 void (*writeseg)(struct super_block *sb, u64 ofs, size_t len);
154 int (*erase)(struct super_block *sb, loff_t ofs, size_t len, 155 int (*erase)(struct super_block *sb, loff_t ofs, size_t len,
155 int ensure_write); 156 int ensure_write);
157 int (*can_write_buf)(struct super_block *sb, u64 ofs);
156 void (*sync)(struct super_block *sb); 158 void (*sync)(struct super_block *sb);
157 void (*put_device)(struct super_block *sb); 159 void (*put_device)(struct super_block *sb);
158}; 160};