<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/fs/f2fs/sysfs.c, branch v6.5</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>f2fs: refactor struct f2fs_attr macro</title>
<updated>2023-06-26T13:21:41+00:00</updated>
<author>
<name>Yangtao Li</name>
<email>frank.li@vivo.com</email>
</author>
<published>2023-05-06T15:16:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6201c478dedcf7c50361b23b5c4d4f41a68921ac'/>
<id>6201c478dedcf7c50361b23b5c4d4f41a68921ac</id>
<content type='text'>
This patch provides a large number of variants of F2FS_RW_ATTR
and F2FS_RO_ATTR macros, reducing the number of parameters required
to initialize the f2fs_attr structure.

Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Link: https://lore.kernel.org/oe-kbuild-all/202304152234.wjaY3IYm-lkp@intel.com/
Signed-off-by: Yangtao Li &lt;frank.li@vivo.com&gt;
Reviewed-by: Chao Yu &lt;chao@kernel.org&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 provides a large number of variants of F2FS_RW_ATTR
and F2FS_RO_ATTR macros, reducing the number of parameters required
to initialize the f2fs_attr structure.

Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Link: https://lore.kernel.org/oe-kbuild-all/202304152234.wjaY3IYm-lkp@intel.com/
Signed-off-by: Yangtao Li &lt;frank.li@vivo.com&gt;
Reviewed-by: Chao Yu &lt;chao@kernel.org&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>f2fs: add sanity check for proc_mkdir</title>
<updated>2023-05-08T18:18:04+00:00</updated>
<author>
<name>Yangtao Li</name>
<email>frank.li@vivo.com</email>
</author>
<published>2023-04-25T16:06:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=888ca6edac81e919fa7accb3b4f1d363e3c1e5f8'/>
<id>888ca6edac81e919fa7accb3b4f1d363e3c1e5f8</id>
<content type='text'>
Return -ENOMEM when proc_mkdir failed.

Signed-off-by: Yangtao Li &lt;frank.li@vivo.com&gt;
Reviewed-by: Chao Yu &lt;chao@kernel.org&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Return -ENOMEM when proc_mkdir failed.

Signed-off-by: Yangtao Li &lt;frank.li@vivo.com&gt;
Reviewed-by: Chao Yu &lt;chao@kernel.org&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>f2fs: remove bulk remove_proc_entry() and unnecessary kobject_del()</title>
<updated>2023-04-17T21:49:30+00:00</updated>
<author>
<name>Yangtao Li</name>
<email>frank.li@vivo.com</email>
</author>
<published>2023-04-06T19:16:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=33560f8020c2bf12bb5b598a03fa0a708cab3283'/>
<id>33560f8020c2bf12bb5b598a03fa0a708cab3283</id>
<content type='text'>
Convert to use remove_proc_subtree() and kill kobject_del() directly.
kobject_put() actually covers kobject removal automatically, which is
single stage removal.

Signed-off-by: Yangtao Li &lt;frank.li@vivo.com&gt;
Reviewed-by: Chao Yu &lt;chao@kernel.org&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Convert to use remove_proc_subtree() and kill kobject_del() directly.
kobject_put() actually covers kobject removal automatically, which is
single stage removal.

Signed-off-by: Yangtao Li &lt;frank.li@vivo.com&gt;
Reviewed-by: Chao Yu &lt;chao@kernel.org&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>f2fs: convert to use sysfs_emit</title>
<updated>2023-04-10T17:58:45+00:00</updated>
<author>
<name>Yangtao Li</name>
<email>frank.li@vivo.com</email>
</author>
<published>2023-03-31T11:33:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=084e15ea14bbb1ad40163438cfa74a76a1521c16'/>
<id>084e15ea14bbb1ad40163438cfa74a76a1521c16</id>
<content type='text'>
Let's use sysfs_emit.

Signed-off-by: Yangtao Li &lt;frank.li@vivo.com&gt;
Reviewed-by: Chao Yu &lt;chao@kernel.org&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Let's use sysfs_emit.

Signed-off-by: Yangtao Li &lt;frank.li@vivo.com&gt;
Reviewed-by: Chao Yu &lt;chao@kernel.org&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>f2fs: fix iostat lock protection</title>
<updated>2023-04-04T20:57:30+00:00</updated>
<author>
<name>Qilin Tan</name>
<email>qilin.tan@mediatek.com</email>
</author>
<published>2023-03-31T09:26:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=144f1cd40bf91fb3ac1d41806470756ce774f389'/>
<id>144f1cd40bf91fb3ac1d41806470756ce774f389</id>
<content type='text'>
Made iostat lock irq safe to avoid potentinal deadlock.

Deadlock scenario:
f2fs_attr_store
  -&gt; f2fs_sbi_store
  -&gt; _sbi_store
  -&gt; spin_lock(sbi-&gt;iostat_lock)
    &lt;interrupt request&gt;
    -&gt; scsi_end_request
    -&gt; bio_endio
    -&gt; f2fs_dio_read_end_io
    -&gt; f2fs_update_iostat
    -&gt; spin_lock_irqsave(sbi-&gt;iostat_lock)  ===&gt; Dead lock here

Fixes: 61803e984307 ("f2fs: fix iostat related lock protection")
Fixes: a1e09b03e6f5 ("f2fs: use iomap for direct I/O")
Signed-off-by: Qilin Tan &lt;qilin.tan@mediatek.com&gt;
Reviewed-by: Chao Yu &lt;chao@kernel.org&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Made iostat lock irq safe to avoid potentinal deadlock.

Deadlock scenario:
f2fs_attr_store
  -&gt; f2fs_sbi_store
  -&gt; _sbi_store
  -&gt; spin_lock(sbi-&gt;iostat_lock)
    &lt;interrupt request&gt;
    -&gt; scsi_end_request
    -&gt; bio_endio
    -&gt; f2fs_dio_read_end_io
    -&gt; f2fs_update_iostat
    -&gt; spin_lock_irqsave(sbi-&gt;iostat_lock)  ===&gt; Dead lock here

Fixes: 61803e984307 ("f2fs: fix iostat related lock protection")
Fixes: a1e09b03e6f5 ("f2fs: use iomap for direct I/O")
Signed-off-by: Qilin Tan &lt;qilin.tan@mediatek.com&gt;
Reviewed-by: Chao Yu &lt;chao@kernel.org&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>f2fs: convert to use bitmap API</title>
<updated>2023-03-29T22:17:37+00:00</updated>
<author>
<name>Yangtao Li</name>
<email>frank.li@vivo.com</email>
</author>
<published>2023-02-16T13:53:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=447286ebadaafa551550704ff0b42eb08b1d1cb2'/>
<id>447286ebadaafa551550704ff0b42eb08b1d1cb2</id>
<content type='text'>
Let's use BIT() and GENMASK() instead of open it.

Signed-off-by: Yangtao Li &lt;frank.li@vivo.com&gt;
Reviewed-by: Chao Yu &lt;chao@kernel.org&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Let's use BIT() and GENMASK() instead of open it.

Signed-off-by: Yangtao Li &lt;frank.li@vivo.com&gt;
Reviewed-by: Chao Yu &lt;chao@kernel.org&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>f2fs: export compress_percent and compress_watermark entries</title>
<updated>2023-03-29T22:17:37+00:00</updated>
<author>
<name>Yangtao Li</name>
<email>frank.li@vivo.com</email>
</author>
<published>2023-02-16T14:09:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=960fa2c828a0af7a3b03b295e6aa17b2afeb5e07'/>
<id>960fa2c828a0af7a3b03b295e6aa17b2afeb5e07</id>
<content type='text'>
This patch export below sysfs entries for better control cached
compress page count.

/sys/fs/f2fs/&lt;disk&gt;/compress_watermark
/sys/fs/f2fs/&lt;disk&gt;/compress_percent

Signed-off-by: Yangtao Li &lt;frank.li@vivo.com&gt;
Reviewed-by: Chao Yu &lt;chao@kernel.org&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 export below sysfs entries for better control cached
compress page count.

/sys/fs/f2fs/&lt;disk&gt;/compress_watermark
/sys/fs/f2fs/&lt;disk&gt;/compress_percent

Signed-off-by: Yangtao Li &lt;frank.li@vivo.com&gt;
Reviewed-by: Chao Yu &lt;chao@kernel.org&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>f2fs: make kobj_type structures constant</title>
<updated>2023-02-13T17:52:47+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2023-02-09T03:20:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=273a51e5521213a13e5852e762cc9c03c66b9baa'/>
<id>273a51e5521213a13e5852e762cc9c03c66b9baa</id>
<content type='text'>
Since commit ee6d3dd4ed48 ("driver core: make kobj_type constant.")
the driver core allows the usage of const struct kobj_type.

Take advantage of this to constify the structure definitions to prevent
modification at runtime.

Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Reviewed-by: Chao Yu &lt;chao@kernel.org&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since commit ee6d3dd4ed48 ("driver core: make kobj_type constant.")
the driver core allows the usage of const struct kobj_type.

Take advantage of this to constify the structure definitions to prevent
modification at runtime.

Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Reviewed-by: Chao Yu &lt;chao@kernel.org&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>f2fs: fix to set ipu policy</title>
<updated>2023-02-07T18:45:00+00:00</updated>
<author>
<name>Yangtao Li</name>
<email>frank.li@vivo.com</email>
</author>
<published>2023-02-06T14:43:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=c5bf83483382600988d7db5ffe9fcd1936b491fd'/>
<id>c5bf83483382600988d7db5ffe9fcd1936b491fd</id>
<content type='text'>
For LFS mode, it should update outplace and no need inplace update.
When using LFS mode for small-volume devices, IPU will not be used,
and the OPU writing method is actually used, but F2FS_IPU_FORCE can
be read from the ipu_policy node, which is different from the actual
situation. And remount to lfs mode should be disallowed when
f2fs ipu is enabled, let's fix it.

Fixes: 84b89e5d943d ("f2fs: add auto tuning for small devices")
Signed-off-by: Yangtao Li &lt;frank.li@vivo.com&gt;
Reviewed-by: Chao Yu &lt;chao@kernel.org&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For LFS mode, it should update outplace and no need inplace update.
When using LFS mode for small-volume devices, IPU will not be used,
and the OPU writing method is actually used, but F2FS_IPU_FORCE can
be read from the ipu_policy node, which is different from the actual
situation. And remount to lfs mode should be disallowed when
f2fs ipu is enabled, let's fix it.

Fixes: 84b89e5d943d ("f2fs: add auto tuning for small devices")
Signed-off-by: Yangtao Li &lt;frank.li@vivo.com&gt;
Reviewed-by: Chao Yu &lt;chao@kernel.org&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>f2fs: add sysfs nodes to set last_age_weight</title>
<updated>2023-02-07T18:39:19+00:00</updated>
<author>
<name>qixiaoyu1</name>
<email>qxy65535@gmail.com</email>
</author>
<published>2023-02-04T09:43:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d23be468eada21c828058e0e8d60409eaec373ab'/>
<id>d23be468eada21c828058e0e8d60409eaec373ab</id>
<content type='text'>
Signed-off-by: qixiaoyu1 &lt;qixiaoyu1@xiaomi.com&gt;
Signed-off-by: xiongping1 &lt;xiongping1@xiaomi.com&gt;
Reviewed-by: Chao Yu &lt;chao@kernel.org&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: qixiaoyu1 &lt;qixiaoyu1@xiaomi.com&gt;
Signed-off-by: xiongping1 &lt;xiongping1@xiaomi.com&gt;
Reviewed-by: Chao Yu &lt;chao@kernel.org&gt;
Signed-off-by: Jaegeuk Kim &lt;jaegeuk@kernel.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
