summaryrefslogtreecommitdiff
path: root/fs/logfs/dev_bdev.c
diff options
context:
space:
mode:
authorJoern Engel <joern@logfs.org>2010-05-07 19:38:40 +0200
committerJoern Engel <joern@logfs.org>2010-05-07 19:38:40 +0200
commit6f485b41875dbf5160c1990322469c1f65f77b28 (patch)
tree9912cee9517b57c2cb3c0318861f2a9eeb4139b2 /fs/logfs/dev_bdev.c
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/dev_bdev.c')
-rw-r--r--fs/logfs/dev_bdev.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/logfs/dev_bdev.c b/fs/logfs/dev_bdev.c
index 243c00071f76..9bd2ce2a3040 100644
--- a/fs/logfs/dev_bdev.c
+++ b/fs/logfs/dev_bdev.c
@@ -303,6 +303,11 @@ static void bdev_put_device(struct super_block *sb)
close_bdev_exclusive(logfs_super(sb)->s_bdev, FMODE_READ|FMODE_WRITE);
}
+static int bdev_can_write_buf(struct super_block *sb, u64 ofs)
+{
+ return 0;
+}
+
static const struct logfs_device_ops bd_devops = {
.find_first_sb = bdev_find_first_sb,
.find_last_sb = bdev_find_last_sb,
@@ -310,6 +315,7 @@ static const struct logfs_device_ops bd_devops = {
.readpage = bdev_readpage,
.writeseg = bdev_writeseg,
.erase = bdev_erase,
+ .can_write_buf = bdev_can_write_buf,
.sync = bdev_sync,
.put_device = bdev_put_device,
};