<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/f2fs/checkpoint.c, branch linux-4.0.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.0.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.0.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2015-02-12T01:04:49Z</updated>
<entry>
<title>f2fs: fix sparse warnings</title>
<updated>2015-02-12T01:04:49Z</updated>
<author>
<name>Jaegeuk Kim</name>
</author>
<published>2015-02-11T00:23:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=29e7043f405c4c4c3a82f61222790f3ea8c0bf13'/>
<id>urn:sha1:29e7043f405c4c4c3a82f61222790f3ea8c0bf13</id>
<content type='text'>
This patch resolves the following warnings.

include/trace/events/f2fs.h:150:1: warning: expression using sizeof bool
include/trace/events/f2fs.h:180:1: warning: expression using sizeof bool
include/trace/events/f2fs.h:990:1: warning: expression using sizeof bool
include/trace/events/f2fs.h:990:1: warning: expression using sizeof bool
include/trace/events/f2fs.h:150:1: warning: odd constant _Bool cast (ffffffffffffffff becomes 1)
include/trace/events/f2fs.h:180:1: warning: odd constant _Bool cast (ffffffffffffffff becomes 1)
include/trace/events/f2fs.h:990:1: warning: odd constant _Bool cast (ffffffffffffffff becomes 1)
include/trace/events/f2fs.h:990:1: warning: odd constant _Bool cast (ffffffffffffffff becomes 1)

fs/f2fs/checkpoint.c:27:19: warning: symbol 'inode_entry_slab' was not declared. Should it be static?
fs/f2fs/checkpoint.c:577:15: warning: cast to restricted __le32
fs/f2fs/checkpoint.c:592:15: warning: cast to restricted __le32

fs/f2fs/trace.c:19:1: warning: symbol 'pids' was not declared. Should it be static?
fs/f2fs/trace.c:21:21: warning: symbol 'last_io' was not declared. Should it be static?

Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</content>
</entry>
<entry>
<title>f2fs: introduce macros to convert bytes and blocks in f2fs</title>
<updated>2015-02-12T01:04:48Z</updated>
<author>
<name>Jaegeuk Kim</name>
</author>
<published>2015-02-09T20:02:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f7ef9b83b583640111039b30e13263b71c3a6ed5'/>
<id>urn:sha1:f7ef9b83b583640111039b30e13263b71c3a6ed5</id>
<content type='text'>
This patch adds two macros for transition between byte and block offsets.
Currently, f2fs only supports 4KB blocks, so use the default size for now.

Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</content>
</entry>
<entry>
<title>f2fs: merge {invalidate,release}page for meta/node/data pages</title>
<updated>2015-02-12T01:04:44Z</updated>
<author>
<name>Chao Yu</name>
</author>
<published>2015-02-05T09:44:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=487261f39bcd8983f55c611e299f70f34659674b'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>f2fs: keep PagePrivate during releasepage</title>
<updated>2015-02-12T01:04:42Z</updated>
<author>
<name>Jaegeuk Kim</name>
</author>
<published>2015-01-30T19:39:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f68daeebba5a697f31f64c07b8693fa678981819'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>f2fs: split UMOUNT and FASTBOOT flags</title>
<updated>2015-02-12T01:04:41Z</updated>
<author>
<name>Jaegeuk Kim</name>
</author>
<published>2015-01-29T19:45:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=119ee9144534141822462e3e8a5ccc8dc537f712'/>
<id>urn:sha1:119ee9144534141822462e3e8a5ccc8dc537f712</id>
<content type='text'>
This patch adds FASTBOOT flag into checkpoint as follows.

 - CP_UMOUNT_FLAG is set when system is umounted.
 - CP_FASTBOOT_FLAG is set when intermediate checkpoint having node summaries
   was done.

So, if you get CP_UMOUNT_FLAG from checkpoint, the system was umounted cleanly.
Instead, if there was sudden-power-off, you can get CP_FASTBOOT_FLAG or nothing.

Reviewed-by: Chao Yu &lt;chao2.yu@samsung.com&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</content>
</entry>
<entry>
<title>f2fs: avoid write_checkpoint if f2fs is mounted readonly</title>
<updated>2015-02-12T01:04:40Z</updated>
<author>
<name>Jaegeuk Kim</name>
</author>
<published>2015-01-24T02:43:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=11504a8e7e20e2ff2e68176850e9b83b8bae760e'/>
<id>urn:sha1:11504a8e7e20e2ff2e68176850e9b83b8bae760e</id>
<content type='text'>
Do not change any partition when f2fs is changed to readonly mode.

Reviewed-by: Chao Yu &lt;chao2.yu@samsung.com&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</content>
</entry>
<entry>
<title>f2fs: merge flags in struct f2fs_sb_info</title>
<updated>2015-02-12T01:04:38Z</updated>
<author>
<name>Chao Yu</name>
</author>
<published>2015-01-28T09:48:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=caf0047e7e1e60a7ad1d655d3b81b32e2dfb6095'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>f2fs: fix to release count of meta page in -&gt;invalidatepage</title>
<updated>2015-02-12T01:04:33Z</updated>
<author>
<name>Chao Yu</name>
</author>
<published>2015-01-19T12:24:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1601839e9e5bd5726d744c9c5919f87dc808bbcc'/>
<id>urn:sha1:1601839e9e5bd5726d744c9c5919f87dc808bbcc</id>
<content type='text'>
We will encounter deadloop in below scenario:

1. increase page count for F2FS_DIRTY_META type in following path:
-&gt;recover_fsync_data
  -&gt;recover_data
    -&gt;do_recover_data
      -&gt;recover_data_page
        -&gt;change_curseg
          -&gt;write_sum_page
            -&gt;set_page_dirty
2. fail in recover_data()
3. invalidate meta pages in truncate_inode_pages_final without decreasing page
   count.
4. deadloop when sync_meta_pages as page count will always be non-zero.

message:
NMI watchdog: BUG: soft lockup - CPU#0 stuck for 22s!

 [&lt;c1129a37&gt;] pagevec_lookup_tag+0x27/0x30
 [&lt;f0e774c7&gt;] sync_meta_pages+0x87/0x160 [f2fs]
 [&lt;f0e86dd9&gt;] recover_fsync_data+0xeb9/0xf10 [f2fs]
 [&lt;f0e75398&gt;] f2fs_fill_super+0x888/0x980 [f2fs]
 [&lt;c11733ca&gt;] mount_bdev+0x16a/0x1a0
 [&lt;f0e7180f&gt;] f2fs_mount+0x1f/0x30 [f2fs]
 [&lt;c1173da6&gt;] mount_fs+0x36/0x170
 [&lt;c118b6f5&gt;] vfs_kern_mount+0x55/0xe0
 [&lt;c118d63f&gt;] do_mount+0x1df/0x9f0
 [&lt;c118e110&gt;] SyS_mount+0x70/0xb0
 [&lt;c15a0c48&gt;] sysenter_do_call+0x12/0x12

To avoid page count leak, let's add -&gt;invalidatepage and -&gt;releasepage in
f2fs_meta_aops as f2fs_node_aops to release meta page count correctly.

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: do checkpoint when umount flag is not set</title>
<updated>2015-02-12T01:04:33Z</updated>
<author>
<name>Jaegeuk Kim</name>
</author>
<published>2015-01-15T01:41:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=85dc2f2c6c84e99e9864ef660f79683aaad85f42'/>
<id>urn:sha1:85dc2f2c6c84e99e9864ef660f79683aaad85f42</id>
<content type='text'>
If the previous checkpoint was done without CP_UMOUNT flag, it needs to do
checkpoint with CP_UMOUNT for the next fast boot.

Reviewed-by: Chao Yu &lt;chao2.yu@samsung.com&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</content>
</entry>
<entry>
<title>f2fs: reuse inode_entry_slab in gc procedure for using slab more effectively</title>
<updated>2015-01-10T01:02:26Z</updated>
<author>
<name>Chao Yu</name>
</author>
<published>2014-12-29T07:56:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=062920734c0de9dd4f0a9bdc36fdcabc2751eb34'/>
<id>urn:sha1:062920734c0de9dd4f0a9bdc36fdcabc2751eb34</id>
<content type='text'>
There are two slab cache inode_entry_slab and winode_slab using the same
structure as below:

struct dir_inode_entry {
	struct list_head list;	/* list head */
	struct inode *inode;	/* vfs inode pointer */
};

struct inode_entry {
	struct list_head list;
	struct inode *inode;
};

It's a little waste that the two cache can not share their memory space for each
other.
So in this patch we remove one redundant winode_slab slab cache, then use more
universal name struct inode_entry as remaining data structure name of slab,
finally we reuse the inode_entry_slab to store dirty dir item and gc item for
more effective.

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