<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/fs/f2fs, branch v3.8</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.8</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.8'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2013-01-22T01:49:00Z</updated>
<entry>
<title>f2fs: use _safe() version of list_for_each</title>
<updated>2013-01-22T01:49:00Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2013-01-20T15:02:58Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d8b79b2f94600262fcfbffbe3df7fd3c83c6c51b'/>
<id>urn:sha1:d8b79b2f94600262fcfbffbe3df7fd3c83c6c51b</id>
<content type='text'>
This is calling list_del() inside a loop which is a problem when we try
move to the next item on the list.  I've converted it to use the _safe
version.  And also, as a cleanup, I've converted it to use
list_for_each_entry instead of list_for_each.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Reviewed-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk.kim@samsung.com&gt;
</content>
</entry>
<entry>
<title>f2fs: add comments of start_bidx_of_node</title>
<updated>2013-01-22T01:48:59Z</updated>
<author>
<name>Jaegeuk Kim</name>
<email>jaegeuk.kim@samsung.com</email>
</author>
<published>2013-01-21T08:34:21Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9af45ef5ab8ce4a13c553200dc15509441fbd68f'/>
<id>urn:sha1:9af45ef5ab8ce4a13c553200dc15509441fbd68f</id>
<content type='text'>
The caller of start_bidx_of_node() should give proper node offsets which
point only direct node blocks. Otherwise, it is a caller's bug.
This patch adds comments to make it clear.

Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk.kim@samsung.com&gt;
</content>
</entry>
<entry>
<title>f2fs: avoid issuing small bios due to several dirty node pages</title>
<updated>2013-01-22T01:48:59Z</updated>
<author>
<name>Jaegeuk Kim</name>
<email>jaegeuk.kim@samsung.com</email>
</author>
<published>2013-01-18T05:54:13Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a7fdffbd3ea4b3cc2993af006bde38a423b38b72'/>
<id>urn:sha1:a7fdffbd3ea4b3cc2993af006bde38a423b38b72</id>
<content type='text'>
If some small bios of dirty node pages are supposed to be issued during the
sequential data writes, there-in well-produced consecutive data bios are able
to be split by the small node bios, resulting in performance degradation.
So, let's collect a number of dirty node pages until reaching a threshold.
And, by default, I set the threshold as 2MB, a segment size.

This improves sequential write performance on i5, 512GB SSD (830 w/ SATA2) as
follows.
Before: 231 MB/s -&gt; After: 255 MB/s

Signed-off-by: Jaegeuk Kim &lt;jaegeuk.kim@samsung.com&gt;
Reviewed-by: Namjae Jeon &lt;namjae.jeon@samsung.com&gt;
</content>
</entry>
<entry>
<title>f2fs: support swapfile</title>
<updated>2013-01-22T01:48:58Z</updated>
<author>
<name>Jaegeuk Kim</name>
<email>jaegeuk.kim@samsung.com</email>
</author>
<published>2013-01-17T11:30:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c01e54b770e69c65525295eb2668be3dc0822406'/>
<id>urn:sha1:c01e54b770e69c65525295eb2668be3dc0822406</id>
<content type='text'>
This patch adds f2fs_bmap operation to the data address space.
This enables f2fs to support swapfile.

Signed-off-by: Jaegeuk Kim &lt;jaegeuk.kim@samsung.com&gt;
</content>
</entry>
<entry>
<title>f2fs: add remap_pages as generic_file_remap_pages</title>
<updated>2013-01-22T01:48:58Z</updated>
<author>
<name>Jaegeuk Kim</name>
<email>jaegeuk.kim@samsung.com</email>
</author>
<published>2013-01-17T09:37:41Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=692bb55d1ab5b278181ff2e65f09eb0be6d50669'/>
<id>urn:sha1:692bb55d1ab5b278181ff2e65f09eb0be6d50669</id>
<content type='text'>
This was added for all the file systems before.

See the following commit.

commit id: 0b173bc4daa8f8ec03a85abf5e47b23502ff80af

[PATCH] mm: kill vma flag VM_CAN_NONLINEAR

This patch moves actual ptes filling for non-linear file mappings
into special vma operation: -&gt;remap_pages().

File system must implement this method to get non-linear mappings support,
if it uses filemap_fault() then generic_file_remap_pages() can be used.

Now device drivers can implement this method and obtain nonlinear vma support."

Signed-off-by: Jaegeuk Kim &lt;jaegeuk.kim@samsung.com&gt;
</content>
</entry>
<entry>
<title>f2fs: add __init to functions in init_f2fs_fs</title>
<updated>2013-01-22T01:48:38Z</updated>
<author>
<name>Namjae Jeon</name>
<email>namjae.jeon@samsung.com</email>
</author>
<published>2013-01-16T15:08:30Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6e6093a8f144414d904575da5fdea40cf14fb63e'/>
<id>urn:sha1:6e6093a8f144414d904575da5fdea40cf14fb63e</id>
<content type='text'>
Add __init to functions in init_f2fs_fs for code consistency.

Signed-off-by: Namjae Jeon &lt;namjae.jeon@samsung.com&gt;
Signed-off-by: Amit Sahrawat &lt;a.sahrawat@samsung.com&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk.kim@samsung.com&gt;
</content>
</entry>
<entry>
<title>f2fs: fix the debugfs entry creation path</title>
<updated>2013-01-15T11:19:15Z</updated>
<author>
<name>Namjae Jeon</name>
<email>linkinjeon@gmail.com</email>
</author>
<published>2013-01-15T10:58:47Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4589d25d015c2d02bb5f7075d0cbf6dcf23a33c0'/>
<id>urn:sha1:4589d25d015c2d02bb5f7075d0cbf6dcf23a33c0</id>
<content type='text'>
As the "status" debugfs entry will be maintained for entire F2FS filesystem
irrespective of the number of partitions.
So, we can move the initialization to the init part of the f2fs and destroy will
be done from exit part. After making changes, for individual partition mount -
entry creation code will not be executed.

Signed-off-by: Jianpeng Ma &lt;majianpeng@gmail.com&gt;
Signed-off-by: Namjae Jeon &lt;namjae.jeon@samsung.com&gt;
Signed-off-by: Amit Sahrawat &lt;a.sahrawat@samsung.com&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk.kim@samsung.com&gt;
</content>
</entry>
<entry>
<title>f2fs: add global mutex_lock to protect f2fs_stat_list</title>
<updated>2013-01-15T11:18:29Z</updated>
<author>
<name>majianpeng</name>
<email>majianpeng@gmail.com</email>
</author>
<published>2013-01-14T12:08:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=66af62ce7588736ae65edfdb1c0df597775c4d21'/>
<id>urn:sha1:66af62ce7588736ae65edfdb1c0df597775c4d21</id>
<content type='text'>
There is an race condition between umounting f2fs and reading f2fs/status, which
results in oops.

Fox example:
Thread A			Thread B
umount f2fs 			cat f2fs/status

f2fs_destroy_stats() {		stat_show() {
				 list_for_each_entry_safe(&amp;f2fs_stat_list)
 list_del(&amp;si-&gt;stat_list);
 mutex_lock(&amp;si-&gt;stat_lock);
 si-&gt;sbi = NULL;
 mutex_unlock(&amp;si-&gt;stat_lock);
 kfree(sbi-&gt;stat_info);
} 				 mutex_lock(&amp;si-&gt;stat_lock) &lt;- si is gone.
				 ...
				}

Solution with a global lock: f2fs_stat_mutex:
Thread A			Thread B
umount f2fs 			cat f2fs/status

f2fs_destroy_stats() {		stat_show() {
 mutex_lock(&amp;f2fs_stat_mutex);
 list_del(&amp;si-&gt;stat_list);
 mutex_unlock(&amp;f2fs_stat_mutex);
 kfree(sbi-&gt;stat_info);		 mutex_lock(&amp;f2fs_stat_mutex);
}				 list_for_each_entry_safe(&amp;f2fs_stat_list)
				 ...
				 mutex_unlock(&amp;f2fs_stat_mutex);
				}

Signed-off-by: Jianpeng Ma &lt;majianpeng@gmail.com&gt;
[jaegeuk.kim@samsung.com: fix typos, description, and remove the existing lock]
Signed-off-by: Jaegeuk Kim &lt;jaegeuk.kim@samsung.com&gt;
</content>
</entry>
<entry>
<title>f2fs: remove the blk_plug usage in f2fs_write_data_pages</title>
<updated>2013-01-15T11:18:16Z</updated>
<author>
<name>Namjae Jeon</name>
<email>namjae.jeon@samsung.com</email>
</author>
<published>2013-01-15T07:45:24Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=fa9150a84ca333f68127097c4fa1eda4b3913a22'/>
<id>urn:sha1:fa9150a84ca333f68127097c4fa1eda4b3913a22</id>
<content type='text'>
Let's consider the usage of blk_plug in f2fs_write_data_pages().
We can come up with the two issues: lock contention and task awareness.

1. Merging bios prior to grabing "queue lock"
 The f2fs merges consecutive IOs in the file system level before
 submitting any bios, which is similar with the back merge by the
 plugging mechanism in attempt_plug_merge(). Both of them need to acquire
 no queue lock.

2. Merging policy with respect to tasks
 The f2fs merges IOs as much as possible regardless of tasks, while
 blk-plugging is conducted on a basis of tasks. As we can understand
 there are trade-offs, f2fs tries to maximize the write performance with
 well-merged bios.

As a result, if f2fs produces many consecutive but separated bios in
writepages(), it would be good to use blk-plugging since f2fs would be
able to avoid queue lock contention in the block layer by merging them.
But, f2fs merges IOs and submit one bio, which means that there are not
much chances to merge bios by attempt_plug_merge().

However, f2fs has already been used blk_plug by triggering generic_writepages()
in f2fs_write_data_pages().
So to make the overall code consistency, I'd like to remove blk_plug there.

Signed-off-by: Namjae Jeon &lt;namjae.jeon@samsung.com&gt;
Signed-off-by: Amit Sahrawat &lt;a.sahrawat@samsung.com&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk.kim@samsung.com&gt;
</content>
</entry>
<entry>
<title>f2fs: avoid redundant time update for parent directory in f2fs_delete_entry</title>
<updated>2013-01-14T00:43:27Z</updated>
<author>
<name>Namjae Jeon</name>
<email>namjae.jeon@samsung.com</email>
</author>
<published>2013-01-12T05:41:33Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=163799872b65b0cbf0091d82971233cc3d2425d3'/>
<id>urn:sha1:163799872b65b0cbf0091d82971233cc3d2425d3</id>
<content type='text'>
In call to f2fs_delete_entry, 'dir' time modification code is put
at two places.
So, remove the redundant code for timing update.

Signed-off-by: Namjae Jeon &lt;namjae.jeon@samsung.com&gt;
Signed-off-by: Amit Sahrawat &lt;a.sahrawat@samsung.com&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk.kim@samsung.com&gt;
</content>
</entry>
</feed>
