diff options
author | Chao Yu <yuchao0@huawei.com> | 2017-01-07 11:50:26 +0100 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-02-23 03:48:48 +0100 |
commit | 5fe457430e554a2f5188f13c1a2e36ad845640c5 (patch) | |
tree | b20d30d298e89235c3d55fe3a1ef7835d834bcd5 /fs/f2fs/gc.c | |
parent | f2fs: clean up with list_{first, last}_entry (diff) | |
download | linux-5fe457430e554a2f5188f13c1a2e36ad845640c5.tar.xz linux-5fe457430e554a2f5188f13c1a2e36ad845640c5.zip |
f2fs: introduce FI_ATOMIC_COMMIT
This patch introduces a new flag to indicate inode status of doing atomic
write committing, so that, we can keep atomic write status for inode
during atomic committing, then we can skip GCing pages of atomic write inode,
that avoids random GCed datas being mixed with current transaction, so
isolation of transaction can be kept.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/gc.c')
-rw-r--r-- | fs/f2fs/gc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 88bfc3dff496..88e5e7b10ab6 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -569,6 +569,9 @@ static void move_encrypted_block(struct inode *inode, block_t bidx, if (!check_valid_map(F2FS_I_SB(inode), segno, off)) goto out; + if (f2fs_is_atomic_file(inode)) + goto out; + set_new_dnode(&dn, inode, NULL, NULL, 0); err = get_dnode_of_data(&dn, bidx, LOOKUP_NODE); if (err) @@ -661,6 +664,9 @@ static void move_data_page(struct inode *inode, block_t bidx, int gc_type, if (!check_valid_map(F2FS_I_SB(inode), segno, off)) goto out; + if (f2fs_is_atomic_file(inode)) + goto out; + if (gc_type == BG_GC) { if (PageWriteback(page)) goto out; |