<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/fs/nilfs2/sysfs.h, branch v7.1</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v7.1</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v7.1'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-09-13T20:05:38+00:00</updated>
<entry>
<title>nilfs2: fix CFI failure when accessing /sys/fs/nilfs2/features/*</title>
<updated>2025-09-13T20:05:38+00:00</updated>
<author>
<name>Nathan Chancellor</name>
<email>nathan@kernel.org</email>
</author>
<published>2025-09-06T14:43:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=025e87f8ea2ae3a28bf1fe2b052bfa412c27ed4a'/>
<id>urn:sha1:025e87f8ea2ae3a28bf1fe2b052bfa412c27ed4a</id>
<content type='text'>
When accessing one of the files under /sys/fs/nilfs2/features when
CONFIG_CFI_CLANG is enabled, there is a CFI violation:

  CFI failure at kobj_attr_show+0x59/0x80 (target: nilfs_feature_revision_show+0x0/0x30; expected type: 0xfc392c4d)
  ...
  Call Trace:
   &lt;TASK&gt;
   sysfs_kf_seq_show+0x2a6/0x390
   ? __cfi_kobj_attr_show+0x10/0x10
   kernfs_seq_show+0x104/0x15b
   seq_read_iter+0x580/0xe2b
  ...

When the kobject of the kset for /sys/fs/nilfs2 is initialized, its ktype
is set to kset_ktype, which has a -&gt;sysfs_ops of kobj_sysfs_ops.  When
nilfs_feature_attr_group is added to that kobject via
sysfs_create_group(), the kernfs_ops of each files is sysfs_file_kfops_rw,
which will call sysfs_kf_seq_show() when -&gt;seq_show() is called. 
sysfs_kf_seq_show() in turn calls kobj_attr_show() through
-&gt;sysfs_ops-&gt;show().  kobj_attr_show() casts the provided attribute out to
a 'struct kobj_attribute' via container_of() and calls -&gt;show(), resulting
in the CFI violation since neither nilfs_feature_revision_show() nor
nilfs_feature_README_show() match the prototype of -&gt;show() in 'struct
kobj_attribute'.

Resolve the CFI violation by adjusting the second parameter in
nilfs_feature_{revision,README}_show() from 'struct attribute' to 'struct
kobj_attribute' to match the expected prototype.

Link: https://lkml.kernel.org/r/20250906144410.22511-1-konishi.ryusuke@gmail.com
Fixes: aebe17f68444 ("nilfs2: add /sys/fs/nilfs2/features group")
Signed-off-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
Signed-off-by: Ryusuke Konishi &lt;konishi.ryusuke@gmail.com&gt;
Reported-by: kernel test robot &lt;oliver.sang@intel.com&gt;
Closes: https://lore.kernel.org/oe-lkp/202509021646.bc78d9ef-lkp@intel.com/
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>nilfs2: remove filenames from file comments</title>
<updated>2021-11-09T18:02:52+00:00</updated>
<author>
<name>Ryusuke Konishi</name>
<email>konishi.ryusuke@gmail.com</email>
</author>
<published>2021-11-09T02:35:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=94ee1d91514a1e02db87fb09b903b51d86903771'/>
<id>urn:sha1:94ee1d91514a1e02db87fb09b903b51d86903771</id>
<content type='text'>
Remove filenames that are not particularly useful in file comments, and
suppress checkpatch warnings

  WARNING: It's generally not useful to have the filename in the file

Link: https://lkml.kernel.org/r/1635151862-11547-3-git-send-email-konishi.ryusuke@gmail.com
Signed-off-by: Ryusuke Konishi &lt;konishi.ryusuke@gmail.com&gt;
Cc: Qing Wang &lt;wangqing@vivo.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>nilfs2: convert to SPDX license tags</title>
<updated>2018-09-04T23:45:02+00:00</updated>
<author>
<name>Ryusuke Konishi</name>
<email>konishi.ryusuke@lab.ntt.co.jp</email>
</author>
<published>2018-09-04T22:46:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ae98043f5f7fa45b65084f70e3ada3209873ebb4'/>
<id>urn:sha1:ae98043f5f7fa45b65084f70e3ada3209873ebb4</id>
<content type='text'>
Remove the verbose license text from NILFS2 files and replace them with
SPDX tags.  This does not change the license of any of the code.

Link: http://lkml.kernel.org/r/1535624528-5982-1-git-send-email-konishi.ryusuke@lab.ntt.co.jp
Signed-off-by: Ryusuke Konishi &lt;konishi.ryusuke@lab.ntt.co.jp&gt;
Reviewed-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>nilfs2: clean trailing semicolons in macros</title>
<updated>2016-05-24T00:04:14+00:00</updated>
<author>
<name>Ryusuke Konishi</name>
<email>konishi.ryusuke@lab.ntt.co.jp</email>
</author>
<published>2016-05-23T23:23:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=facb9ec5e6e376c25a00bb7a64332287c7a1403c'/>
<id>urn:sha1:facb9ec5e6e376c25a00bb7a64332287c7a1403c</id>
<content type='text'>
Remove trailing semicolons from macros, as suggested by checkpatch.pl.

Link: http://lkml.kernel.org/r/1461935747-10380-12-git-send-email-konishi.ryusuke@lab.ntt.co.jp
[konishi.ryusuke@lab.ntt.co.jp: fix style issues]
  Link: http://lkml.kernel.org/r/20160509.231703.1481729973362188932.konishi.ryusuke@lab.ntt.co.jp
Signed-off-by: Ryusuke Konishi &lt;konishi.ryusuke@lab.ntt.co.jp&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>nilfs2: add /sys/fs/nilfs2/&lt;device&gt;/mounted_snapshots/&lt;snapshot&gt; group</title>
<updated>2014-08-08T22:57:21+00:00</updated>
<author>
<name>Vyacheslav Dubeyko</name>
<email>Vyacheslav.Dubeyko@hgst.com</email>
</author>
<published>2014-08-08T21:20:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a5a7332a291b55beb0863b119816d12ffc04dfb0'/>
<id>urn:sha1:a5a7332a291b55beb0863b119816d12ffc04dfb0</id>
<content type='text'>
This patch adds creation of &lt;snapshot&gt; group for every mounted
snapshot in /sys/fs/nilfs2/&lt;device&gt;/mounted_snapshots group.

The group contains details about mounted snapshot:
(1) inodes_count - show number of inodes for snapshot.
(2) blocks_count - show number of blocks for snapshot.

Signed-off-by: Vyacheslav Dubeyko &lt;Vyacheslav.Dubeyko@hgst.com&gt;
Cc: Vyacheslav Dubeyko &lt;slava@dubeyko.com&gt;
Cc: Ryusuke Konishi &lt;konishi.ryusuke@lab.ntt.co.jp&gt;
Cc: Michael L. Semon &lt;mlsemon35@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>nilfs2: add /sys/fs/nilfs2/&lt;device&gt;/mounted_snapshots group</title>
<updated>2014-08-08T22:57:21+00:00</updated>
<author>
<name>Vyacheslav Dubeyko</name>
<email>Vyacheslav.Dubeyko@hgst.com</email>
</author>
<published>2014-08-08T21:20:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a2ecb791a9d6e71a2d37d66034475a92ebc7e02c'/>
<id>urn:sha1:a2ecb791a9d6e71a2d37d66034475a92ebc7e02c</id>
<content type='text'>
This patch adds creation of /sys/fs/nilfs2/&lt;device&gt;/mounted_snapshots
group.

The mounted_snapshots group contains group for every
mounted snapshot.

Signed-off-by: Vyacheslav Dubeyko &lt;Vyacheslav.Dubeyko@hgst.com&gt;
Cc: Vyacheslav Dubeyko &lt;slava@dubeyko.com&gt;
Cc: Ryusuke Konishi &lt;konishi.ryusuke@lab.ntt.co.jp&gt;
Cc: Michael L. Semon &lt;mlsemon35@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>nilfs2: add /sys/fs/nilfs2/&lt;device&gt;/checkpoints group</title>
<updated>2014-08-08T22:57:21+00:00</updated>
<author>
<name>Vyacheslav Dubeyko</name>
<email>Vyacheslav.Dubeyko@hgst.com</email>
</author>
<published>2014-08-08T21:20:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=02a0ba1c60c2ad532322089a60256c8b0f46678c'/>
<id>urn:sha1:02a0ba1c60c2ad532322089a60256c8b0f46678c</id>
<content type='text'>
This patch adds creation of /sys/fs/nilfs2/&lt;device&gt;/checkpoints
group.

The checkpoints group contains attributes that describe
details about volume's checkpoints:
(1) checkpoints_number - show number of checkpoints on volume.
(2) snapshots_number - show number of snapshots on volume.
(3) last_seg_checkpoint - show checkpoint number of the latest segment.
(4) next_checkpoint - show next checkpoint number.

Signed-off-by: Vyacheslav Dubeyko &lt;Vyacheslav.Dubeyko@hgst.com&gt;
Cc: Vyacheslav Dubeyko &lt;slava@dubeyko.com&gt;
Cc: Ryusuke Konishi &lt;konishi.ryusuke@lab.ntt.co.jp&gt;
Cc: Michael L. Semon &lt;mlsemon35@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>nilfs2: add /sys/fs/nilfs2/&lt;device&gt;/segments group</title>
<updated>2014-08-08T22:57:20+00:00</updated>
<author>
<name>Vyacheslav Dubeyko</name>
<email>Vyacheslav.Dubeyko@hgst.com</email>
</author>
<published>2014-08-08T21:20:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ef43d5cd84b7d2ea09846de34e14be7d74be3e6f'/>
<id>urn:sha1:ef43d5cd84b7d2ea09846de34e14be7d74be3e6f</id>
<content type='text'>
This patch adds creation of /sys/fs/nilfs2/&lt;device&gt;/segments
group.

The segments group contains attributes that describe
details about volume's segments:
(1) segments_number - show number of segments on volume.
(2) blocks_per_segment - show number of blocks in segment.
(3) clean_segments - show count of clean segments.
(4) dirty_segments - show count of dirty segments.

Signed-off-by: Vyacheslav Dubeyko &lt;Vyacheslav.Dubeyko@hgst.com&gt;
Cc: Vyacheslav Dubeyko &lt;slava@dubeyko.com&gt;
Cc: Ryusuke Konishi &lt;konishi.ryusuke@lab.ntt.co.jp&gt;
Cc: Michael L. Semon &lt;mlsemon35@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>nilfs2: add /sys/fs/nilfs2/&lt;device&gt;/segctor group</title>
<updated>2014-08-08T22:57:20+00:00</updated>
<author>
<name>Vyacheslav Dubeyko</name>
<email>Vyacheslav.Dubeyko@hgst.com</email>
</author>
<published>2014-08-08T21:20:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=abc968dbf291955ac750ecf59e3baf2b529a8257'/>
<id>urn:sha1:abc968dbf291955ac750ecf59e3baf2b529a8257</id>
<content type='text'>
This patch adds creation of /sys/fs/nilfs2/&lt;device&gt;/segctor
group.

The segctor group contains attributes that describe
segctor thread activity details:
(1) last_pseg_block - show start block number of the latest segment.
(2) last_seg_sequence - show sequence value of the latest segment.
(3) last_seg_checkpoint - show checkpoint number of the latest segment.
(4) current_seg_sequence - show segment sequence counter.
(5) current_last_full_seg - show index number of the latest full segment.
(6) next_full_seg - show index number of the full segment index
to be used next.
(7) next_pseg_offset - show offset of next partial segment in
the current full segment.
(8) next_checkpoint - show next checkpoint number.
(9) last_seg_write_time - show write time of the last segment
in human-readable format.
(10) last_seg_write_time_secs - show write time of the last segment
in seconds.
(11) last_nongc_write_time - show write time of the last segment
not for cleaner operation in human-readable format.
(12) last_nongc_write_time_secs - show write time of the last segment
not for cleaner operation in seconds.
(13) dirty_data_blocks_count - show number of dirty data blocks.

Signed-off-by: Vyacheslav Dubeyko &lt;Vyacheslav.Dubeyko@hgst.com&gt;
Cc: Vyacheslav Dubeyko &lt;slava@dubeyko.com&gt;
Cc: Ryusuke Konishi &lt;konishi.ryusuke@lab.ntt.co.jp&gt;
Cc: Michael L. Semon &lt;mlsemon35@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>nilfs2: add /sys/fs/nilfs2/&lt;device&gt;/superblock group</title>
<updated>2014-08-08T22:57:20+00:00</updated>
<author>
<name>Vyacheslav Dubeyko</name>
<email>Vyacheslav.Dubeyko@hgst.com</email>
</author>
<published>2014-08-08T21:20:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=caa05d49dfd7fe04820ba8b7e424343d5426a7f3'/>
<id>urn:sha1:caa05d49dfd7fe04820ba8b7e424343d5426a7f3</id>
<content type='text'>
This patch adds creation of /sys/fs/nilfs2/&lt;device&gt;/superblock
group.

The superblock group contains attributes that describe
superblock's details:
(1) sb_write_time - show previous write time of super block in
human-readable format.
(2) sb_write_time_secs - show previous write time of super block
in seconds.
(3) sb_write_count - show write count of super block.
(4) sb_update_frequency - show/set interval of periodical update
of superblock (in seconds). You can set preferable frequency of
superblock update by command:

echo &lt;value&gt; &gt; /sys/fs/nilfs2/&lt;device&gt;/superblock/sb_update_frequency

Signed-off-by: Vyacheslav Dubeyko &lt;Vyacheslav.Dubeyko@hgst.com&gt;
Cc: Vyacheslav Dubeyko &lt;slava@dubeyko.com&gt;
Cc: Ryusuke Konishi &lt;konishi.ryusuke@lab.ntt.co.jp&gt;
Cc: Michael L. Semon &lt;mlsemon35@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
