<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/fs/f2fs/node.c, branch v4.0</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>f2fs: fix accessing wrong indexed data blocks</title>
<updated>2015-02-12T01:04:51+00:00</updated>
<author>
<name>Jaegeuk Kim</name>
<email>jaegeuk@kernel.org</email>
</author>
<published>2015-02-11T19:25:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f1a3b98e73a9f811ab4882669043c50c0e0dc7b6'/>
<id>f1a3b98e73a9f811ab4882669043c50c0e0dc7b6</id>
<content type='text'>
This patch fixes the following test.

This causes:
 attempt to access beyond end of device
 sdb2: rw=16384, want=14413962000, limit=16777216

The reason is:
 - f2fs_write_begin
  - f2fs_convert_inline_inode returns -ENOSPC
  - f2fs_write_failed
   - truncate_blocks
    - truncate_partial_data_page
     - find_data_page
      - get_dnode_of_data returns wrong data index retrieved from inline_data
      - f2fs_submit_page_bio(wrong data index)
       - submit_bio(wrong data index)

Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes the following test.

This causes:
 attempt to access beyond end of device
 sdb2: rw=16384, want=14413962000, limit=16777216

The reason is:
 - f2fs_write_begin
  - f2fs_convert_inline_inode returns -ENOSPC
  - f2fs_write_failed
   - truncate_blocks
    - truncate_partial_data_page
     - find_data_page
      - get_dnode_of_data returns wrong data index retrieved from inline_data
      - f2fs_submit_page_bio(wrong data index)
       - submit_bio(wrong data index)

Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>f2fs: check node page contents all the time</title>
<updated>2015-02-12T01:04:46+00:00</updated>
<author>
<name>Jaegeuk Kim</name>
<email>jaegeuk@kernel.org</email>
</author>
<published>2015-02-07T02:53:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=aaf9607516ed38825268515ef4d773289a44f429'/>
<id>aaf9607516ed38825268515ef4d773289a44f429</id>
<content type='text'>
In get_node_page, if the page is up-to-date, we assumed that the page was not
reclaimed at all.
But, sometimes it was reported that its contents was missing.
So, just for sure, let's check its mapping and contents.

Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In get_node_page, if the page is up-to-date, we assumed that the page was not
reclaimed at all.
But, sometimes it was reported that its contents was missing.
So, just for sure, let's check its mapping and contents.

Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>f2fs: merge {invalidate,release}page for meta/node/data pages</title>
<updated>2015-02-12T01:04:44+00:00</updated>
<author>
<name>Chao Yu</name>
<email>chao2.yu@samsung.com</email>
</author>
<published>2015-02-05T09:44:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=487261f39bcd8983f55c611e299f70f34659674b'/>
<id>487261f39bcd8983f55c611e299f70f34659674b</id>
<content type='text'>
This patch merges -&gt;{invalidate,release}page function for meta/node/data pages.

After this, duplication of codes could be removed.

Signed-off-by: Chao Yu &lt;chao2.yu@samsung.com&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch merges -&gt;{invalidate,release}page function for meta/node/data pages.

After this, duplication of codes could be removed.

Signed-off-by: Chao Yu &lt;chao2.yu@samsung.com&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>f2fs: keep PagePrivate during releasepage</title>
<updated>2015-02-12T01:04:42+00:00</updated>
<author>
<name>Jaegeuk Kim</name>
<email>jaegeuk@kernel.org</email>
</author>
<published>2015-01-30T19:39:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f68daeebba5a697f31f64c07b8693fa678981819'/>
<id>f68daeebba5a697f31f64c07b8693fa678981819</id>
<content type='text'>
If PagePrivate is removed by releasepage, f2fs loses counting dirty pages.

e.g., try_to_release_page will not release page when the page is dirty,
but our releasepage removes PagePrivate.

    [&lt;ffffffff81188d75&gt;] try_to_release_page+0x35/0x50
    [&lt;ffffffff811996f9&gt;] invalidate_inode_pages2_range+0x2f9/0x3b0
    [&lt;ffffffffa02a7f54&gt;] ? truncate_blocks+0x384/0x4d0 [f2fs]
    [&lt;ffffffffa02b7583&gt;] ? f2fs_direct_IO+0x283/0x290 [f2fs]
    [&lt;ffffffffa02b7fb0&gt;] ? get_data_block_fiemap+0x20/0x20 [f2fs]
    [&lt;ffffffff8118aa53&gt;] generic_file_direct_write+0x163/0x170
    [&lt;ffffffff8118ad06&gt;] __generic_file_write_iter+0x2a6/0x350
    [&lt;ffffffff8118adef&gt;] generic_file_write_iter+0x3f/0xb0
    [&lt;ffffffff81203081&gt;] new_sync_write+0x81/0xb0
    [&lt;ffffffff81203837&gt;] vfs_write+0xb7/0x1f0
    [&lt;ffffffff81204459&gt;] SyS_write+0x49/0xb0
    [&lt;ffffffff817c286d&gt;] system_call_fastpath+0x16/0x1b

Reviewed-by: Chao Yu &lt;chao2.yu@samsung.com&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If PagePrivate is removed by releasepage, f2fs loses counting dirty pages.

e.g., try_to_release_page will not release page when the page is dirty,
but our releasepage removes PagePrivate.

    [&lt;ffffffff81188d75&gt;] try_to_release_page+0x35/0x50
    [&lt;ffffffff811996f9&gt;] invalidate_inode_pages2_range+0x2f9/0x3b0
    [&lt;ffffffffa02a7f54&gt;] ? truncate_blocks+0x384/0x4d0 [f2fs]
    [&lt;ffffffffa02b7583&gt;] ? f2fs_direct_IO+0x283/0x290 [f2fs]
    [&lt;ffffffffa02b7fb0&gt;] ? get_data_block_fiemap+0x20/0x20 [f2fs]
    [&lt;ffffffff8118aa53&gt;] generic_file_direct_write+0x163/0x170
    [&lt;ffffffff8118ad06&gt;] __generic_file_write_iter+0x2a6/0x350
    [&lt;ffffffff8118adef&gt;] generic_file_write_iter+0x3f/0xb0
    [&lt;ffffffff81203081&gt;] new_sync_write+0x81/0xb0
    [&lt;ffffffff81203837&gt;] vfs_write+0xb7/0x1f0
    [&lt;ffffffff81204459&gt;] SyS_write+0x49/0xb0
    [&lt;ffffffff817c286d&gt;] system_call_fastpath+0x16/0x1b

Reviewed-by: Chao Yu &lt;chao2.yu@samsung.com&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>f2fs: merge flags in struct f2fs_sb_info</title>
<updated>2015-02-12T01:04:38+00:00</updated>
<author>
<name>Chao Yu</name>
<email>chao2.yu@samsung.com</email>
</author>
<published>2015-01-28T09:48:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=caf0047e7e1e60a7ad1d655d3b81b32e2dfb6095'/>
<id>caf0047e7e1e60a7ad1d655d3b81b32e2dfb6095</id>
<content type='text'>
Currently, there are several variables with Boolean type as below:

struct f2fs_sb_info {
...
	int s_dirty;
	bool need_fsck;
	bool s_closing;
...
	bool por_doing;
...
}

For this there are some issues:
1. there are some space of f2fs_sb_info is wasted due to aligning after Boolean
   type variables by compiler.
2. if we continuously add new flag into f2fs_sb_info, structure will be messed
   up.

So in this patch, we try to:
1. switch s_dirty to Boolean type variable since it has two status 0/1.
2. merge s_dirty/need_fsck/s_closing/por_doing variables into s_flag.
3. introduce an enum type which can indicate different states of sbi.
4. use new introduced universal interfaces is_sbi_flag_set/{set,clear}_sbi_flag
   to operate flags for sbi.

After that, above issues will be fixed.

Signed-off-by: Chao Yu &lt;chao2.yu@samsung.com&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, there are several variables with Boolean type as below:

struct f2fs_sb_info {
...
	int s_dirty;
	bool need_fsck;
	bool s_closing;
...
	bool por_doing;
...
}

For this there are some issues:
1. there are some space of f2fs_sb_info is wasted due to aligning after Boolean
   type variables by compiler.
2. if we continuously add new flag into f2fs_sb_info, structure will be messed
   up.

So in this patch, we try to:
1. switch s_dirty to Boolean type variable since it has two status 0/1.
2. merge s_dirty/need_fsck/s_closing/por_doing variables into s_flag.
3. introduce an enum type which can indicate different states of sbi.
4. use new introduced universal interfaces is_sbi_flag_set/{set,clear}_sbi_flag
   to operate flags for sbi.

After that, above issues will be fixed.

Signed-off-by: Chao Yu &lt;chao2.yu@samsung.com&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>f2fs: free radix_tree_nodes used by nat_set entries</title>
<updated>2015-01-10T01:02:28+00:00</updated>
<author>
<name>Jaegeuk Kim</name>
<email>jaegeuk@kernel.org</email>
</author>
<published>2015-01-07T18:47:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=7aed0d45376e531330cf20af581a76edc0347d06'/>
<id>7aed0d45376e531330cf20af581a76edc0347d06</id>
<content type='text'>
In the normal case, the radix_tree_nodes are freed successfully.
But, when cp_error was detected, we should destroy them forcefully.

Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the normal case, the radix_tree_nodes are freed successfully.
But, when cp_error was detected, we should destroy them forcefully.

Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>f2fs: avoid potential unnecessary codes</title>
<updated>2015-01-10T01:02:26+00:00</updated>
<author>
<name>Jaegeuk Kim</name>
<email>jaegeuk@kernel.org</email>
</author>
<published>2014-12-31T07:08:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=3547ea961dd66a474c6f709c4f5e8a2472289df9'/>
<id>3547ea961dd66a474c6f709c4f5e8a2472289df9</id>
<content type='text'>
This patch relocates some operations to avoid unnecessary execution.

Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch relocates some operations to avoid unnecessary execution.

Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>f2fs: activate f2fs_trace_pid</title>
<updated>2015-01-10T01:02:24+00:00</updated>
<author>
<name>Jaegeuk Kim</name>
<email>jaegeuk@kernel.org</email>
</author>
<published>2014-12-18T03:58:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=9e4ded3f309eb5b5a9be0ca2acd26e5ea7f00914'/>
<id>9e4ded3f309eb5b5a9be0ca2acd26e5ea7f00914</id>
<content type='text'>
This patch activates f2fs_trace_pid.

Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch activates f2fs_trace_pid.

Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>f2fs: use f2fs_io_info to clean up messy parameters during IO path</title>
<updated>2015-01-10T01:02:23+00:00</updated>
<author>
<name>Jaegeuk Kim</name>
<email>jaegeuk@kernel.org</email>
</author>
<published>2014-12-18T03:33:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=cf04e8eb55290c7b836c36f0b4e1a8d0fe8ee275'/>
<id>cf04e8eb55290c7b836c36f0b4e1a8d0fe8ee275</id>
<content type='text'>
This patch cleans up parameters on IO paths.
The key idea is to use f2fs_io_info adding a parameter, block address, and then
use this structure as parameters.

Reviewed-by: Chao Yu &lt;chao2.yu@samsung.com&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch cleans up parameters on IO paths.
The key idea is to use f2fs_io_info adding a parameter, block address, and then
use this structure as parameters.

Reviewed-by: Chao Yu &lt;chao2.yu@samsung.com&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>f2fs: use ra_meta_pages to simplify readahead code in restore_node_summary</title>
<updated>2015-01-10T01:02:23+00:00</updated>
<author>
<name>Chao Yu</name>
<email>chao2.yu@samsung.com</email>
</author>
<published>2014-12-18T10:29:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=9ecf4b80bd32ad727d7fca56706bb5b059935c18'/>
<id>9ecf4b80bd32ad727d7fca56706bb5b059935c18</id>
<content type='text'>
Use more common function ra_meta_pages() with META_POR to readahead node blocks
in restore_node_summary() instead of ra_sum_pages(), hence we can simplify the
readahead code there, and also we can remove unused function ra_sum_pages().

changes from v2:
 o use invalidate_mapping_pages as before suggested by Changman Lee.
changes from v1:
 o fix one bug when using truncate_inode_pages_range which is pointed out by
   Jaegeuk Kim.

Reviewed-by: Changman Lee &lt;cm224.lee@samsung.com&gt;
Signed-off-by: Chao Yu &lt;chao2.yu@samsung.com&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use more common function ra_meta_pages() with META_POR to readahead node blocks
in restore_node_summary() instead of ra_sum_pages(), hence we can simplify the
readahead code there, and also we can remove unused function ra_sum_pages().

changes from v2:
 o use invalidate_mapping_pages as before suggested by Changman Lee.
changes from v1:
 o fix one bug when using truncate_inode_pages_range which is pointed out by
   Jaegeuk Kim.

Reviewed-by: Changman Lee &lt;cm224.lee@samsung.com&gt;
Signed-off-by: Chao Yu &lt;chao2.yu@samsung.com&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
