linux/fs/f2fs
Jaegeuk Kim 763bfe1bc5 f2fs: remove reusing any prefree segments
This patch removes check_prefree_segments initially designed to enhance the
performance by narrowing the range of LBA usage across the whole block device.

When allocating a new segment, previous f2fs tries to find proper prefree
segments, and then, if finds a segment, it reuses the segment for further
data or node block allocation.

However, I found that this was totally wrong approach since the prefree segments
have several data or node blocks that will be used by the roll-forward mechanism
operated after sudden-power-off.

Let's assume the following scenario.

/* write 8MB with fsync */
for (i = 0; i < 2048; i++) {
	offset = i * 4096;
	write(fd, offset, 4KB);
	fsync(fd);
}

In this case, naive segment allocation sequence will be like:
 data segment: x, x+1, x+2, x+3
 node segment: y, y+1, y+2, y+3.

But, if we can reuse prefree segments, the sequence can be like:
 data segment: x, x+1, y, y+1
 node segment: y, y+1, y+2, y+3.
Because, y, y+1, and y+2 became prefree segments one by one, and those are
reused by data allocation.

After conducting this workload, we should consider how to recover the latest
inode with its data.
If we reuse the prefree segments such as y or y+1, we lost the old node blocks
so that f2fs even cannot start roll-forward recovery.

Therefore, I suggest that we should remove reusing prefree segments.

Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
2013-07-02 08:48:15 +09:00
..
acl.c f2fs: support xattr security labels 2013-06-11 16:01:03 +09:00
acl.h f2fs: adjust kernel coding style 2012-12-11 13:43:42 +09:00
checkpoint.c f2fs: fix crc endian conversion 2013-07-02 08:47:35 +09:00
data.c f2fs: optimize do_write_data_page() 2013-06-14 09:04:44 +09:00
debug.c f2fs: use list_for_each_entry rather than list_for_each_entry_safe 2013-05-28 15:03:02 +09:00
dir.c f2fs: recover wrong pino after checkpoint during fsync 2013-06-14 09:04:45 +09:00
f2fs.h f2fs: fix crc endian conversion 2013-07-02 08:47:35 +09:00
file.c f2fs: recover wrong pino after checkpoint during fsync 2013-06-14 09:04:45 +09:00
gc.c f2fs: code cleanup and simplify in func {find/add}_gc_inode 2013-07-02 08:48:14 +09:00
gc.h f2fs: avoid frequent background GC 2013-04-26 10:35:03 +09:00
hash.c f2fs: unify string length declarations and usage 2012-12-28 11:27:53 +09:00
inode.c f2fs: avoid freqeunt write_inode calls 2013-06-14 09:04:43 +09:00
Kconfig f2fs: support xattr security labels 2013-06-11 16:01:03 +09:00
Makefile f2fs: update Kconfig and Makefile 2012-12-11 13:43:42 +09:00
namei.c f2fs: recover wrong pino after checkpoint during fsync 2013-06-14 09:04:45 +09:00
node.c f2fs: support xattr security labels 2013-06-11 16:01:03 +09:00
node.h f2fs: recover wrong pino after checkpoint during fsync 2013-06-14 09:04:45 +09:00
recovery.c f2fs: fix an endian conversion bug detected by sparse 2013-07-02 08:48:13 +09:00
segment.c f2fs: remove reusing any prefree segments 2013-07-02 08:48:15 +09:00
segment.h f2fs: modify the number of issued pages to merge IOs 2013-04-30 12:07:32 +09:00
super.c f2fs: add remount_fs callback support 2013-06-17 21:17:55 +09:00
xattr.c f2fs: support xattr security labels 2013-06-11 16:01:03 +09:00
xattr.h f2fs: support xattr security labels 2013-06-11 16:01:03 +09:00