]> git.baikalelectronics.ru Git - kernel.git/commit
zonefs: Export open zone resource information through sysfs
authorDamien Le Moal <damien.lemoal@opensource.wdc.com>
Tue, 12 Apr 2022 07:25:34 +0000 (16:25 +0900)
committerDamien Le Moal <damien.lemoal@opensource.wdc.com>
Wed, 20 Apr 2022 23:37:51 +0000 (08:37 +0900)
commit9cee73cf45b71697b44d60710da43c063d16c9d9
tree8cc9063a2d760878e18b7077b1f86f3a08933dcb
parent20058347ec44d202cfe68e0f5449a22073c16b14
zonefs: Export open zone resource information through sysfs

To allow applications to easily check the current usage status of the
open zone resources of the mounted device, export through sysfs the
counter of write open sequential files s_wro_seq_files field of
struct zonefs_sb_info. The attribute is named nr_wro_seq_files and is
read only.

The maximum number of write open sequential files (zones) indicated by
the s_max_wro_seq_files field of struct zonefs_sb_info is also exported
as the read only attribute max_wro_seq_files.

Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Hans Holmberg <hans.holmberg@wdc.com>
fs/zonefs/Makefile
fs/zonefs/super.c
fs/zonefs/sysfs.c [new file with mode: 0644]
fs/zonefs/zonefs.h