<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/fs/f2fs/segment.c, branch v5.10.257</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.10.257</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.10.257'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-12-14T18:48:02+00:00</updated>
<entry>
<title>f2fs: check curseg-&gt;inited before write_sum_page in change_curseg</title>
<updated>2024-12-14T18:48:02+00:00</updated>
<author>
<name>Yongpeng Yang</name>
<email>yangyongpeng1@oppo.com</email>
</author>
<published>2024-10-21T04:48:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=af87c2069952f061a1d45cbfb6b725a94d0613e4'/>
<id>urn:sha1:af87c2069952f061a1d45cbfb6b725a94d0613e4</id>
<content type='text'>
[ Upstream commit 43563069e1c1df417d2eed6eca8a22fc6b04691d ]

In the __f2fs_init_atgc_curseg-&gt;get_atssr_segment calling,
curseg-&gt;segno is NULL_SEGNO, indicating that there is no summary
block that needs to be written.

Fixes: 093749e296e2 ("f2fs: support age threshold based garbage collection")
Signed-off-by: Yongpeng Yang &lt;yangyongpeng1@oppo.com&gt;
Reviewed-by: Chao Yu &lt;chao@kernel.org&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: remove the unused flush argument to change_curseg</title>
<updated>2024-12-14T18:48:01+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2022-11-28T09:43:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c6d54485cf8167365d8b1612b382f4be5a73408a'/>
<id>urn:sha1:c6d54485cf8167365d8b1612b382f4be5a73408a</id>
<content type='text'>
[ Upstream commit 5bcd655fffaec24e849bda1207446f5cc821713e ]

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Chao Yu &lt;chao@kernel.org&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
Stable-dep-of: 43563069e1c1 ("f2fs: check curseg-&gt;inited before write_sum_page in change_curseg")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>f2fs: open code allocate_segment_by_default</title>
<updated>2024-12-14T18:48:01+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2022-11-28T09:43:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5bb54d3b377efec161327f42ace2e5a3a8911794'/>
<id>urn:sha1:5bb54d3b377efec161327f42ace2e5a3a8911794</id>
<content type='text'>
[ Upstream commit 8442d94b8ac8d5d8300725a9ffa9def526b71170 ]

allocate_segment_by_default has just two callers, which use very
different code pathes inside it based on the force paramter.  Just
open code the logic in the two callers using a new helper to decided
if a new segment should be allocated.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Chao Yu &lt;chao@kernel.org&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
Stable-dep-of: 43563069e1c1 ("f2fs: check curseg-&gt;inited before write_sum_page in change_curseg")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>f2fs: remove struct segment_allocation default_salloc_ops</title>
<updated>2024-12-14T18:48:01+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2022-11-28T09:43:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c6ad7333e530dc17bd9207193a99007162bb93a9'/>
<id>urn:sha1:c6ad7333e530dc17bd9207193a99007162bb93a9</id>
<content type='text'>
[ Upstream commit 1c8a8ec0a0e9a1176022a35c4daf04fe1594d270 ]

There is only  single instance of these ops, so remove the indirection
and call allocate_segment_by_default directly.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Chao Yu &lt;chao@kernel.org&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
Stable-dep-of: 43563069e1c1 ("f2fs: check curseg-&gt;inited before write_sum_page in change_curseg")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>f2fs: avoid using native allocate_segment_by_default()</title>
<updated>2024-12-14T18:48:01+00:00</updated>
<author>
<name>Chao Yu</name>
<email>yuchao0@huawei.com</email>
</author>
<published>2021-04-21T01:54:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a7e306f7c32de93ad69ac3f249c9f27c77d729ce'/>
<id>urn:sha1:a7e306f7c32de93ad69ac3f249c9f27c77d729ce</id>
<content type='text'>
[ Upstream commit 509f1010e4fc55e2dbfc036317afd573ccd0931c ]

As we did for other cases, in fix_curseg_write_pointer(), let's
use wrapped f2fs_allocate_new_section() instead of native
allocate_segment_by_default(), by this way, it fixes to cover
segment allocation with curseg_lock and sentry_lock.

Signed-off-by: Chao Yu &lt;yuchao0@huawei.com&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
Stable-dep-of: 43563069e1c1 ("f2fs: check curseg-&gt;inited before write_sum_page in change_curseg")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>f2fs: fix the wrong f2fs_bug_on condition in f2fs_do_replace_block</title>
<updated>2024-12-14T18:48:01+00:00</updated>
<author>
<name>LongPing Wei</name>
<email>weilongping@oppo.com</email>
</author>
<published>2024-10-21T02:31:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6e5de38f605c3a9889d7764955fbd9da23371408'/>
<id>urn:sha1:6e5de38f605c3a9889d7764955fbd9da23371408</id>
<content type='text'>
[ Upstream commit c3af1f13476ec23fd99c98d060a89be28c1e8871 ]

This f2fs_bug_on was introduced by commit 2c1905042c8c ("f2fs: check
segment type in __f2fs_replace_block") when there were only 6 curseg types.
After commit d0b9e42ab615 ("f2fs: introduce inmem curseg") was introduced,
the condition should be changed to checking curseg-&gt;seg_type.

Fixes: d0b9e42ab615 ("f2fs: introduce inmem curseg")
Signed-off-by: LongPing Wei &lt;weilongping@oppo.com&gt;
Reviewed-by: Chao Yu &lt;chao@kernel.org&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: fix to do sanity check in update_sit_entry</title>
<updated>2024-09-04T11:17:37+00:00</updated>
<author>
<name>Zhiguo Niu</name>
<email>zhiguo.niu@unisoc.com</email>
</author>
<published>2024-02-28T11:59:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bf0c603ab4ed6ded916d563747817f60425fba4c'/>
<id>urn:sha1:bf0c603ab4ed6ded916d563747817f60425fba4c</id>
<content type='text'>
[ Upstream commit 36959d18c3cf09b3c12157c6950e18652067de77 ]

If GET_SEGNO return NULL_SEGNO for some unecpected case,
update_sit_entry will access invalid memory address,
cause system crash. It is better to do sanity check about
GET_SEGNO just like update_segment_mtime &amp; locate_dirty_segment.

Also remove some redundant judgment code.

Signed-off-by: Zhiguo Niu &lt;zhiguo.niu@unisoc.com&gt;
Reviewed-by: Chao Yu &lt;chao@kernel.org&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: fix typos in comments</title>
<updated>2024-06-16T11:32:18+00:00</updated>
<author>
<name>Jinyoung CHOI</name>
<email>j-young.choi@samsung.com</email>
</author>
<published>2023-02-06T11:56:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f1169d2b2aa2ece587db5398494a83e881f664b2'/>
<id>urn:sha1:f1169d2b2aa2ece587db5398494a83e881f664b2</id>
<content type='text'>
[ Upstream commit 146949defda868378992171b9e42318b06fcd482 ]

This patch is to fix typos in f2fs files.

Signed-off-by: Jinyoung Choi &lt;j-young.choi@samsung.com&gt;
Reviewed-by: Chao Yu &lt;chao@kernel.org&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
Stable-dep-of: 278a6253a673 ("f2fs: fix to relocate check condition in f2fs_fallocate()")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>f2fs: add compress_mode mount option</title>
<updated>2024-06-16T11:32:17+00:00</updated>
<author>
<name>Daeho Jeong</name>
<email>daehojeong@google.com</email>
</author>
<published>2020-12-01T04:08:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5b09d2e7906639b29959bba3d516a71b3280a764'/>
<id>urn:sha1:5b09d2e7906639b29959bba3d516a71b3280a764</id>
<content type='text'>
[ Upstream commit 602a16d58e9aab3c423bcf051033ea6c9e8a6d37 ]

We will add a new "compress_mode" mount option to control file
compression mode. This supports "fs" and "user". In "fs" mode (default),
f2fs does automatic compression on the compression enabled files.
In "user" mode, f2fs disables the automaic compression and gives the
user discretion of choosing the target file and the timing. It means
the user can do manual compression/decompression on the compression
enabled files using ioctls.

Signed-off-by: Daeho Jeong &lt;daehojeong@google.com&gt;
Reviewed-by: Chao Yu &lt;yuchao0@huawei.com&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
Stable-dep-of: 7c5dffb3d90c ("f2fs: compress: fix to relocate check condition in f2fs_{release,reserve}_compress_blocks()")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>f2fs: apply zone capacity to all zone type</title>
<updated>2023-05-17T09:47:49+00:00</updated>
<author>
<name>Jaegeuk Kim</name>
<email>jaegeuk@kernel.org</email>
</author>
<published>2023-03-21T22:58:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d11a74577c21cf6dc1db65b6178ef3d03953ccf0'/>
<id>urn:sha1:d11a74577c21cf6dc1db65b6178ef3d03953ccf0</id>
<content type='text'>
[ Upstream commit 0b37ed21e3367539b79284e0b0af2246ffcf0dca ]

If we manage the zone capacity per zone type, it'll break the GC assumption.
And, the current logic complains valid block count mismatch.
Let's apply zone capacity to all zone type, if specified.

Fixes: de881df97768 ("f2fs: support zone capacity less than zone size")
Reviewed-by: Chao Yu &lt;chao@kernel.org&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
</feed>
