Searched hist:"211 a6fa04c56e8c57faca245880148bcb6419073" (Results 1 – 2 of 2) sorted by relevance
/openbmc/linux/fs/f2fs/ |
H A D | inode.c | diff 211a6fa04c56e8c57faca245880148bcb6419073 Mon Dec 04 22:07:47 CST 2017 Yunlei He <heyunlei@huawei.com> f2fs: fix an error case of missing update inode page
-Thread A Thread B
-write_checkpoint -block_operations -f2fs_unlock_all -f2fs_sync_file -f2fs_write_inode -f2fs_inode_synced -f2fs_sync_inode_meta -sync_node_pages -set_page_drity
In this case, if sudden power off without next new checkpoint, the last inode page update will lost. wb_writeback is same with fsync.
Yunlei also reproduced the bug by:
@@ -366,7 +366,7 @@ int update_inode(struct inode *inode, struct page *node_page) struct extent_tree *et = F2FS_I(inode)->extent_tree;
f2fs_inode_synced(inode); - + msleep(10000); f2fs_wait_on_page_writeback(node_page, NODE, true);
shell 1: shell2:
dd if=/dev/zero of=./test bs=1M count=10 sync echo "hello" >> ./test fsync test // sleep 10s sync //return quickly echo c > /proc/sysrq-trigger
Signed-off-by: Yunlei He <heyunlei@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
H A D | f2fs.h | diff 211a6fa04c56e8c57faca245880148bcb6419073 Mon Dec 04 22:07:47 CST 2017 Yunlei He <heyunlei@huawei.com> f2fs: fix an error case of missing update inode page
-Thread A Thread B
-write_checkpoint -block_operations -f2fs_unlock_all -f2fs_sync_file -f2fs_write_inode -f2fs_inode_synced -f2fs_sync_inode_meta -sync_node_pages -set_page_drity
In this case, if sudden power off without next new checkpoint, the last inode page update will lost. wb_writeback is same with fsync.
Yunlei also reproduced the bug by:
@@ -366,7 +366,7 @@ int update_inode(struct inode *inode, struct page *node_page) struct extent_tree *et = F2FS_I(inode)->extent_tree;
f2fs_inode_synced(inode); - + msleep(10000); f2fs_wait_on_page_writeback(node_page, NODE, true);
shell 1: shell2:
dd if=/dev/zero of=./test bs=1M count=10 sync echo "hello" >> ./test fsync test // sleep 10s sync //return quickly echo c > /proc/sysrq-trigger
Signed-off-by: Yunlei He <heyunlei@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|