f2fs: clean up structure extent_node
PATCH 1/2 f2fs: clean up structure extent_node
The union in struct extent_node wass only to indicate below fields
struct rb_node rb_node;
union {
struct {
unsigned int fofs;
unsigned int len;
...
...can be parsed as fields in struct rb_entry, but they were never be used explicitly before, so let's remove them for cleanup.
Signed-off-by Chao Yu <[email protected]>
--- fs/f2fs/f2fs.h | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-)
fs/f2fs/f2fs.h +2 -10
@@ -559,16 +559,8 @@ struct extent_info { };struct extent_node { -struct rb_node rb_node; -union { -struct { -unsigned int fofs; -unsigned int len; -u32 blk; - }; -struct extent_info ei;/* extent info */ - - }; +struct rb_node rb_node;/* rb node located in rb-tree */ +struct extent_info ei;/* extent info */ struct list_head list;/* node in global extent list of sbi */ struct extent_tree *et;/* extent tree pointer */ };
Signature · 1 line
2.18.0.rc1
PATCH 2/2 f2fs: fix to dirty inode synchronously
If user change inode's i_flags via ioctl, let's add it into global dirty list, so that checkpoint can guarantee its persistence before fsync, it can make checkpoint keeping strong consistency.
Signed-off-by Chao Yu <[email protected]>
--- fs/f2fs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/f2fs/file.c +1 -1
@@ -1685,7 +1685,7 @@ static int __f2fs_ioc_setflags(struct inode *inode, unsigned int flags) inode->i_ctime =current_time (inode);f2fs_set_inode_flags (inode); -f2fs_mark_inode_dirty_sync (inode, false); +f2fs_mark_inode_dirty_sync (inode, true);return 0 ; }
Signature · 1 line
2.18.0.rc1