<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/f2fs/file.c, branch linux-3.18.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.18.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.18.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2019-02-20T09:08:57Z</updated>
<entry>
<title>f2fs: move dir data flush to write checkpoint process</title>
<updated>2019-02-20T09:08:57Z</updated>
<author>
<name>Yunlei He</name>
</author>
<published>2018-11-06T02:25:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=88331aa2d322acfff1148974de67de057e793d8c'/>
<id>urn:sha1:88331aa2d322acfff1148974de67de057e793d8c</id>
<content type='text'>
[ Upstream commit b61ac5b720146c619c7cdf17eff2551b934399e5 ]

This patch move dir data flush to write checkpoint process, by
doing this, it may reduce some time for dir fsync.

pre:
	-f2fs_do_sync_file enter
		-file_write_and_wait_range  &lt;- flush &amp; wait
		-write_checkpoint
			-do_checkpoint	    &lt;- wait all
	-f2fs_do_sync_file exit

now:
	-f2fs_do_sync_file enter
		-write_checkpoint
			-block_operations   &lt;- flush dir &amp; no wait
			-do_checkpoint	    &lt;- wait all
	-f2fs_do_sync_file exit

Signed-off-by: Yunlei He &lt;heyunlei@huawei.com&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>f2fs: support volatile operations for transient data</title>
<updated>2014-10-07T18:54:41Z</updated>
<author>
<name>Jaegeuk Kim</name>
</author>
<published>2014-10-06T23:11:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=02a1335f25a386db9afc68f8315162f862aac93f'/>
<id>urn:sha1:02a1335f25a386db9afc68f8315162f862aac93f</id>
<content type='text'>
This patch adds support for volatile writes which keep data pages in memory
until f2fs_evict_inode is called by iput.

For instance, we can use this feature for the sqlite database as follows.
While supporting atomic writes for main database file, we can keep its journal
data temporarily in the page cache by the following sequence.

1. open
 -&gt; ioctl(F2FS_IOC_START_VOLATILE_WRITE);
2. writes
 : keep all the data in the page cache.
3. flush to the database file with atomic writes
  a. ioctl(F2FS_IOC_START_ATOMIC_WRITE);
  b. writes
  c. ioctl(F2FS_IOC_COMMIT_ATOMIC_WRITE);
4. close
 -&gt; drop the cached data

Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</content>
</entry>
<entry>
<title>f2fs: support atomic writes</title>
<updated>2014-10-07T00:39:50Z</updated>
<author>
<name>Jaegeuk Kim</name>
</author>
<published>2014-10-07T00:39:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=88b88a66797159949cec32eaab12b4968f6fae2d'/>
<id>urn:sha1:88b88a66797159949cec32eaab12b4968f6fae2d</id>
<content type='text'>
This patch introduces a very limited functionality for atomic write support.
In order to support atomic write, this patch adds two ioctls:
 o F2FS_IOC_START_ATOMIC_WRITE
 o F2FS_IOC_COMMIT_ATOMIC_WRITE

The database engine should be aware of the following sequence.
1. open
 -&gt; ioctl(F2FS_IOC_START_ATOMIC_WRITE);
2. writes
  : all the written data will be treated as atomic pages.
3. commit
 -&gt; ioctl(F2FS_IOC_COMMIT_ATOMIC_WRITE);
  : this flushes all the data blocks to the disk, which will be shown all or
  nothing by f2fs recovery procedure.
4. repeat to #2.

The IO pattens should be:

  ,- START_ATOMIC_WRITE                  ,- COMMIT_ATOMIC_WRITE
 CP | D D D D D D | FSYNC | D D D D | FSYNC ...
                      `- COMMIT_ATOMIC_WRITE

Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</content>
</entry>
<entry>
<title>f2fs: clean up f2fs_ioctl functions</title>
<updated>2014-09-30T22:34:56Z</updated>
<author>
<name>Jaegeuk Kim</name>
</author>
<published>2014-09-24T22:37:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=52656e6cf7be6955e3ea01dbb835b43119278a12'/>
<id>urn:sha1:52656e6cf7be6955e3ea01dbb835b43119278a12</id>
<content type='text'>
This patch cleans up f2fs_ioctl functions for better readability.

Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</content>
</entry>
<entry>
<title>f2fs: introduce FITRIM in f2fs_ioctl</title>
<updated>2014-09-30T22:06:09Z</updated>
<author>
<name>Jaegeuk Kim</name>
</author>
<published>2014-09-21T05:06:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4b2fecc84655055a6a1fe9151786992ac04b56ce'/>
<id>urn:sha1:4b2fecc84655055a6a1fe9151786992ac04b56ce</id>
<content type='text'>
This patch introduces FITRIM in f2fs_ioctl.
In this case, f2fs will issue small discards and prefree discards as many as
possible for the given area.

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: skip punching hole in special condition</title>
<updated>2014-09-23T18:10:21Z</updated>
<author>
<name>Chao Yu</name>
</author>
<published>2014-09-15T10:03:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=14cecc5cd6ed33ef3cb7328de904cc636dd390a4'/>
<id>urn:sha1:14cecc5cd6ed33ef3cb7328de904cc636dd390a4</id>
<content type='text'>
Now punching hole in directory is not supported in f2fs, so let's limit file
type in punch_hole().

In addition, in punch_hole if offset is exceed file size, we should skip
punching hole.

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 truncate blocks past EOF in -&gt;setattr</title>
<updated>2014-09-23T18:10:20Z</updated>
<author>
<name>Chao Yu</name>
</author>
<published>2014-09-15T10:02:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=09db6a2ef8d9ca6da71b5de56097e8b769bef299'/>
<id>urn:sha1:09db6a2ef8d9ca6da71b5de56097e8b769bef299</id>
<content type='text'>
By using FALLOC_FL_KEEP_SIZE in -&gt;fallocate of f2fs, we can fallocate block past
EOF without changing i_size of inode. These blocks past EOF will not be
truncated in -&gt;setattr as we truncate them only when change the file size.

We should give a chance to truncate blocks out of filesize in setattr().

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 not skip latest inode information</title>
<updated>2014-09-23T18:10:16Z</updated>
<author>
<name>Jaegeuk Kim</name>
</author>
<published>2014-09-10T22:04:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=19c9c466e5c79402cbf8929f922011b02fbb59bd'/>
<id>urn:sha1:19c9c466e5c79402cbf8929f922011b02fbb59bd</id>
<content type='text'>
In f2fs_sync_file, if there is no written appended writes, it skips
to write its node blocks.
But, if there is up-to-date inode page, we should write it to update
its metadata during the roll-forward recovery.

Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</content>
</entry>
<entry>
<title>f2fs: fix conditions to remain recovery information in f2fs_sync_file</title>
<updated>2014-09-23T18:10:15Z</updated>
<author>
<name>Jaegeuk Kim</name>
</author>
<published>2014-09-15T21:50:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=88bd02c9472a166b706284a34a84f1243322d782'/>
<id>urn:sha1:88bd02c9472a166b706284a34a84f1243322d782</id>
<content type='text'>
This patch revisited whole the recovery information during the f2fs_sync_file.

In this patch, there are three information to make a decision.

a) IS_CHECKPOINTED,	/* is it checkpointed before? */
b) HAS_FSYNCED_INODE,	/* is the inode fsynced before? */
c) HAS_LAST_FSYNC,	/* has the latest node fsync mark? */

And, the scenarios for our rule are based on:

[Term] F: fsync_mark, D: dentry_mark

1. inode(x) | CP | inode(x) | dnode(F)
2. inode(x) | CP | inode(F) | dnode(F)
3. inode(x) | CP | dnode(F) | inode(x) | inode(F)
4. inode(x) | CP | dnode(F) | inode(F)
5. CP | inode(x) | dnode(F) | inode(DF)
6. CP | inode(DF) | dnode(F)
7. CP | dnode(F) | inode(DF)
8. CP | dnode(F) | inode(x) | inode(DF)

For example, #3, the three conditions should be changed as follows.

   inode(x) | CP | dnode(F) | inode(x) | inode(F)
a)    x       o      o          o          o
b)    x       x      x          x          o
c)    x       o      o          x          o

If f2fs_sync_file stops   ------^,
 it should write inode(F)    --------------^

So, the need_inode_block_update should return true, since
 c) get_nat_flag(e, HAS_LAST_FSYNC), is false.

For example, #8,
      CP | alloc | dnode(F) | inode(x) | inode(DF)
a)    o      x        x          x          x
b)    x               x          x          o
c)    o               o          x          o

If f2fs_sync_file stops   -------^,
 it should write inode(DF)    --------------^

Note that, the roll-forward policy should follow this rule, which means,
if there are any missing blocks, we doesn't need to recover that inode.

Signed-off-by: Huang Ying &lt;ying.huang@intel.com&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</content>
</entry>
<entry>
<title>f2fs: give an option to enable in-place-updates during fsync to users</title>
<updated>2014-09-16T11:10:44Z</updated>
<author>
<name>Jaegeuk Kim</name>
</author>
<published>2014-09-10T23:53:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c1ce1b02bb25640567dc484dc94d3a195d21e705'/>
<id>urn:sha1:c1ce1b02bb25640567dc484dc94d3a195d21e705</id>
<content type='text'>
If user wrote F2FS_IPU_FSYNC:4 in /sys/fs/f2fs/ipu_policy, f2fs_sync_file
only starts to try in-place-updates.
And, if the number of dirty pages is over /sys/fs/f2fs/min_fsync_blocks, it
keeps out-of-order manner. Otherwise, it triggers in-place-updates.

This may be used by storage showing very high random write performance.

For example, it can be used when,

Seq. writes (Data) + wait + Seq. writes (Node)

is pretty much slower than,

Rand. writes (Data)

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