diff options
author | Joern Engel <joern@logfs.org> | 2010-05-07 19:38:40 +0200 |
---|---|---|
committer | Joern Engel <joern@logfs.org> | 2010-05-07 19:38:40 +0200 |
commit | 6f485b41875dbf5160c1990322469c1f65f77b28 (patch) | |
tree | 9912cee9517b57c2cb3c0318861f2a9eeb4139b2 /fs/logfs/dev_bdev.c | |
parent | ccf31c10f125ab5233c8517f91d4b3bd0bd60936 (diff) | |
download | talos-obmc-linux-6f485b41875dbf5160c1990322469c1f65f77b28.tar.gz talos-obmc-linux-6f485b41875dbf5160c1990322469c1f65f77b28.zip |
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.c | 6 |
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, }; |