linux/fs/f2fs
Dongho Sim 33be828ada f2fs: remove redundant lines in allocate_data_block
There are redundant lines in allocate_data_block.

In this function, we call refresh_sit_entry with old seg and old curseg.
After that, we call locate_dirty_segment with old curseg.

But, the new address is always allocated from old curseg and
we call locate_dirty_segment with old curseg in refresh_sit_entry.
So, we do not need to call locate_dirty_segment with old curseg again.

We've discussed like below:

Jaegeuk said:
 "When considering SSR, we need to take care of the following scenario.
  - old segno : X
  - new address : Z
  - old curseg : Y
  This means, a new block is supposed to be written to Z from X.
  And Z is newly allocated in the same path from Y.

  In that case, we should trigger locate_dirty_segment for Y, since
  it was a current_segment and can be dirty owing to SSR.
  But that was not included in the dirty list."

Changman said:
 "We already choosed old curseg(Y) and then we allocate new address(Z) from old
  curseg(Y). After that we call refresh_sit_entry(old address, new address).
  In the funcation, we call locate_dirty_segment with old seg and old curseg.
  So calling locate_dirty_segment after refresh_sit_entry again is redundant."

Jaegeuk said:
 "Right. The new address is always allocated from old_curseg."

Reviewed-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Dongho Sim <dh.sim@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2014-07-30 15:38:59 -07:00
..
acl.c f2fs: remove the redundant validation check of acl 2014-07-09 14:04:25 -07:00
acl.h f2fs: use generic posix ACL infrastructure 2014-01-25 23:58:19 -05:00
checkpoint.c f2fs: avoid retrying wrong recovery routine when error was occurred 2014-07-30 14:13:35 -07:00
data.c f2fs: add info of appended or updated data writes 2014-07-29 07:46:11 -07:00
debug.c f2fs: add infra for ino management 2014-07-29 07:45:54 -07:00
dir.c f2fs: check name_len of dir entry to prevent from deadloop 2014-07-10 17:00:02 -07:00
f2fs.h f2fs: avoid retrying wrong recovery routine when error was occurred 2014-07-30 14:13:35 -07:00
file.c f2fs: enable in-place-update for fdatasync 2014-07-30 14:13:23 -07:00
gc.c f2fs: remove the unused ctor argument of f2fs_kmem_cache_create() 2014-03-10 18:45:14 +09:00
gc.h f2fs: add a sysfs entry to control max_victim_search 2014-01-08 13:45:08 +09:00
hash.c f2fs: arguments cleanup of finding file flow functions 2014-07-09 14:04:26 -07:00
inline.c f2fs: add info of appended or updated data writes 2014-07-29 07:46:11 -07:00
inode.c f2fs: add info of appended or updated data writes 2014-07-29 07:46:11 -07:00
Kconfig f2fs: introduce CONFIG_F2FS_CHECK_FS for BUG_ON control 2013-10-29 15:43:01 +09:00
Makefile f2fs: key functions to handle inline data 2013-12-26 20:40:09 +09:00
namei.c f2fs: support ->rename2() 2014-07-25 08:14:08 -07:00
node.c f2fs: refactor flush_nat_entries codes for reducing NAT writes 2014-07-09 14:04:25 -07:00
node.h f2fs: refactor flush_nat_entries codes for reducing NAT writes 2014-07-09 14:04:25 -07:00
recovery.c f2fs: avoid retrying wrong recovery routine when error was occurred 2014-07-30 14:13:35 -07:00
segment.c f2fs: remove redundant lines in allocate_data_block 2014-07-30 15:38:59 -07:00
segment.h f2fs: enable in-place-update for fdatasync 2014-07-30 14:13:23 -07:00
super.c f2fs: add infra for ino management 2014-07-29 07:45:54 -07:00
xattr.c f2fs: fix recursive lock by f2fs_setxattr 2014-06-02 22:13:16 +09:00
xattr.h f2fs: pass flags field to setxattr functions 2014-05-07 10:21:56 +09:00