<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/f2fs/gc.c, branch linux-3.17.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.17.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.17.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2014-09-02T07:22:24Z</updated>
<entry>
<title>f2fs: reposition unlock_new_inode to prevent accessing invalid inode</title>
<updated>2014-09-02T07:22:24Z</updated>
<author>
<name>Chao Yu</name>
</author>
<published>2014-08-30T01:52:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b73e52824c8920a5ff754e3c8ff68466a7dd61f9'/>
<id>urn:sha1:b73e52824c8920a5ff754e3c8ff68466a7dd61f9</id>
<content type='text'>
As the race condition on the inode cache, following scenario can appear:
[Thread a]				[Thread b]
					-&gt;f2fs_mkdir
					  -&gt;f2fs_add_link
					    -&gt;__f2fs_add_link
					      -&gt;init_inode_metadata failed here
-&gt;gc_thread_func
  -&gt;f2fs_gc
    -&gt;do_garbage_collect
      -&gt;gc_data_segment
        -&gt;f2fs_iget
          -&gt;iget_locked
            -&gt;wait_on_inode
					  -&gt;unlock_new_inode
        -&gt;move_data_page
					  -&gt;make_bad_inode
					  -&gt;iput

When we fail in create/symlink/mkdir/mknod/tmpfile, the new allocated inode
should be set as bad to avoid being accessed by other thread. But in above
scenario, it allows f2fs to access the invalid inode before this inode was set
as bad.
This patch fix the potential problem, and this issue was found by code review.

change log from v1:
 o Add condition judgment in gc_data_segment() suggested by Changman Lee.
 o use iget_failed to simplify code.

Signed-off-by: Chao Yu &lt;chao2.yu@samsung.com&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</content>
</entry>
<entry>
<title>f2fs: introduce f2fs_cp_error for readability</title>
<updated>2014-08-21T16:21:00Z</updated>
<author>
<name>Jaegeuk Kim</name>
</author>
<published>2014-08-11T23:49:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1e968fdfe69e4060f05fa04059ecad93a0284e32'/>
<id>urn:sha1:1e968fdfe69e4060f05fa04059ecad93a0284e32</id>
<content type='text'>
This patch adds f2fs_cp_error for readability.

Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</content>
</entry>
<entry>
<title>f2fs: fix typo</title>
<updated>2014-08-19T17:01:33Z</updated>
<author>
<name>arter97</name>
</author>
<published>2014-08-06T14:22:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e1c42045203071c4634b89e696037357810d3083'/>
<id>urn:sha1:e1c42045203071c4634b89e696037357810d3083</id>
<content type='text'>
Fix typo and some grammatical errors.

The words "filesystem" and "readahead" are being used without the space treewide.

Signed-off-by: Park Ju Hyung &lt;qkrwngud825@gmail.com&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</content>
</entry>
<entry>
<title>f2fs: use for_each_set_bit to simplify the code</title>
<updated>2014-08-04T20:20:53Z</updated>
<author>
<name>Chao Yu</name>
</author>
<published>2014-08-04T02:10:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b65ee14818e67127aa242fe1dbd3711b9c095cc0'/>
<id>urn:sha1:b65ee14818e67127aa242fe1dbd3711b9c095cc0</id>
<content type='text'>
This patch uses for_each_set_bit to simplify some codes in f2fs.

Signed-off-by: Chao Yu &lt;chao2.yu@samsung.com&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</content>
</entry>
<entry>
<title>f2fs: remove the unused ctor argument of f2fs_kmem_cache_create()</title>
<updated>2014-03-10T09:45:14Z</updated>
<author>
<name>Gu Zheng</name>
</author>
<published>2014-03-07T10:43:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e8512d2e0c4eb38cd78b1499bb08d7d8eea6c723'/>
<id>urn:sha1:e8512d2e0c4eb38cd78b1499bb08d7d8eea6c723</id>
<content type='text'>
Signed-off-by: Gu Zheng &lt;guz.fnst@cn.fujitsu.com&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk.kim@samsung.com&gt;
</content>
</entry>
<entry>
<title>f2fs: readahead contiguous SSA blocks for f2fs_gc</title>
<updated>2014-02-27T11:40:36Z</updated>
<author>
<name>Chao Yu</name>
</author>
<published>2014-02-27T11:12:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=81c1a0f13e6306a76fc3743b8504085d96659a5f'/>
<id>urn:sha1:81c1a0f13e6306a76fc3743b8504085d96659a5f</id>
<content type='text'>
If there are multi segments in one section, we will read those SSA blocks which
have contiguous address one by one in f2fs_gc. It may lost performance, let's
read ahead SSA blocks by merge multi read request.

Signed-off-by: Chao Yu &lt;chao2.yu@samsung.com&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk.kim@samsung.com&gt;
</content>
</entry>
<entry>
<title>f2fs: clean up redundant function call</title>
<updated>2014-02-17T05:58:53Z</updated>
<author>
<name>Jaegeuk Kim</name>
</author>
<published>2014-02-07T01:00:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1fe54f9dd3acfaa3ed4e1d1e3278fd0f1d1e98cd'/>
<id>urn:sha1:1fe54f9dd3acfaa3ed4e1d1e3278fd0f1d1e98cd</id>
<content type='text'>
This patch integrates inode_[inc|dec]_dirty_dents with inc_page_count to remove
redundant calls.

Signed-off-by: Jaegeuk Kim &lt;jaegeuk.kim@samsung.com&gt;
</content>
</entry>
<entry>
<title>f2fs: fix f2fs_write_meta_page at no checkpoint status</title>
<updated>2014-02-17T05:58:53Z</updated>
<author>
<name>Jaegeuk Kim</name>
</author>
<published>2014-02-05T04:03:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=203681f65b07055259bd475a6281136615b4e9a4'/>
<id>urn:sha1:203681f65b07055259bd475a6281136615b4e9a4</id>
<content type='text'>
If f2fs entered errorneous checkpoint status, it should skip writing meta
pages instead of redirtying the pages out.
Otherwise, it cannot unmount the partition even though f2fs is under read-only
status.

Signed-off-by: Jaegeuk Kim &lt;jaegeuk.kim@samsung.com&gt;
</content>
</entry>
<entry>
<title>f2fs: remove the needless parameter of f2fs_wait_on_page_writeback</title>
<updated>2014-01-14T08:45:54Z</updated>
<author>
<name>Yuan Zhong</name>
</author>
<published>2014-01-10T07:26:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5514f0aadddcdfaaaea697b60203f5402552eb7b'/>
<id>urn:sha1:5514f0aadddcdfaaaea697b60203f5402552eb7b</id>
<content type='text'>
"boo sync" parameter is never referenced in f2fs_wait_on_page_writeback.
We should remove this parameter.

Signed-off-by: Yuan Zhong &lt;yuan.mark.zhong@samsung.com&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk.kim@samsung.com&gt;
</content>
</entry>
<entry>
<title>f2fs: add a sysfs entry to control max_victim_search</title>
<updated>2014-01-08T04:45:08Z</updated>
<author>
<name>Jaegeuk Kim</name>
</author>
<published>2014-01-08T04:45:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b1c57c1caa753cec299e62bb4272da0e85a01ef0'/>
<id>urn:sha1:b1c57c1caa753cec299e62bb4272da0e85a01ef0</id>
<content type='text'>
Previously during SSR and GC, the maximum number of retrials to find a victim
segment was hard-coded by MAX_VICTIM_SEARCH, 4096 by default.

This number makes an effect on IO locality, when SSR mode is activated, which
results in performance fluctuation on some low-end devices.

If max_victim_search = 4, the victim will be searched like below.
("D" represents a dirty segment, and "*" indicates a selected victim segment.)

 D1 D2 D3 D4 D5 D6 D7 D8 D9
[   *       ]
      [   *    ]
            [         * ]
	                [ ....]

This patch adds a sysfs entry to control the number dynamically through:
  /sys/fs/f2fs/$dev/max_victim_search

Signed-off-by: Jaegeuk Kim &lt;jaegeuk.kim@samsung.com&gt;
</content>
</entry>
</feed>
