linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Damien Le Moal <damien.lemoal@opensource.wdc.com>
To: linux-fsdevel@vger.kernel.org
Cc: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Subject: [PATCH v2 8/8] documentation: zonefs: Document sysfs attributes
Date: Wed, 20 Apr 2022 11:35:45 +0900	[thread overview]
Message-ID: <20220420023545.3814998-9-damien.lemoal@opensource.wdc.com> (raw)
In-Reply-To: <20220420023545.3814998-1-damien.lemoal@opensource.wdc.com>

Document the max_wro_seq_files, nr_wro_seq_files, max_active_seq_files
and nr_active_seq_files sysfs attributes.

Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
---
 Documentation/filesystems/zonefs.rst | 38 ++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/Documentation/filesystems/zonefs.rst b/Documentation/filesystems/zonefs.rst
index 72d4baba0b6a..394b9f15dce0 100644
--- a/Documentation/filesystems/zonefs.rst
+++ b/Documentation/filesystems/zonefs.rst
@@ -351,6 +351,44 @@ guaranteed that write requests can be processed. Conversely, the
 to the device on the last close() of a zone file if the zone is not full nor
 empty.
 
+Runtime sysfs attributes
+------------------------
+
+zonefs defines several sysfs attributes for mounted devices.  All attributes
+are user readable and can be found in the directory /sys/fs/zonefs/<dev>/,
+where <dev> is the name of the mounted zoned block device.
+
+The attributes defined are as follows.
+
+* **max_wro_seq_files**:  This attribute reports the maximum number of
+  sequential zone files that can be open for writing.  This number corresponds
+  to the maximum number of explicitly or implicitly open zones that the device
+  supports.  A value of 0 means that the device has no limit and that any zone
+  (any file) can be open for writing and written at any time, regardless of the
+  state of other zones.  When the *explicit-open* mount option is used, zonefs
+  will fail any open() system call requesting to open a sequential zone file for
+  writing when the number of sequential zone files already open for writing has
+  reached the *max_wro_seq_files* limit.
+* **nr_wro_seq_files**:  This attribute reports the current number of sequential
+  zone files open for writing.  When the "explicit-open" mount option is used,
+  this number can never exceed *max_wro_seq_files*.  If the *explicit-open*
+  mount option is not used, the reported number can be greater than
+  *max_wro_seq_files*.  In such case, it is the responsibility of the
+  application to not write simultaneously more than *max_wro_seq_files*
+  sequential zone files.  Failure to do so can result in write errors.
+* **max_active_seq_files**:  This attribute reports the maximum number of
+  sequential zone files that are in an active state, that is, sequential zone
+  files that are partially writen (not empty nor full) or that have a zone that
+  is explicitly open (which happens only if the *explicit-open* mount option is
+  used).  This number is always equal to the maximum number of active zones that
+  the device supports.  A value of 0 means that the mounted device has no limit
+  on the number of sequential zone files that can be active.
+* **nr_active_seq_files**:  This attributes reports the current number of
+  sequential zone files that are active. If *max_active_seq_files* is not 0,
+  then the value of *nr_active_seq_files* can never exceed the value of
+  *nr_active_seq_files*, regardless of the use of the *explicit-open* mount
+  option.
+
 Zonefs User Space Tools
 =======================
 
-- 
2.35.1


  parent reply	other threads:[~2022-04-20  2:36 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-20  2:35 [PATCH v2 0/8] zonefs improvements Damien Le Moal
2022-04-20  2:35 ` [PATCH v2 1/8] zonefs: Clear inode information flags on inode creation Damien Le Moal
2022-04-20  3:58   ` Chaitanya Kulkarni
2022-04-20  8:40   ` Hans Holmberg
2022-04-20  2:35 ` [PATCH v2 2/8] zonefs: Fix management of open zones Damien Le Moal
2022-04-20  8:44   ` Hans Holmberg
2022-04-20  2:35 ` [PATCH v2 3/8] zonefs: Rename super block information fields Damien Le Moal
2022-04-20 10:48   ` Hans Holmberg
2022-04-20  2:35 ` [PATCH v2 4/8] zonefs: Always do seq file write open accounting Damien Le Moal
2022-04-20 10:49   ` Hans Holmberg
2022-04-20  2:35 ` [PATCH v2 5/8] zonefs: Export open zone resource information through sysfs Damien Le Moal
2022-04-20 10:52   ` Hans Holmberg
2022-04-20  2:35 ` [PATCH v2 6/8] zonefs: Add active seq file accounting Damien Le Moal
2022-04-20  7:50   ` Johannes Thumshirn
2022-04-20 10:54   ` Hans Holmberg
2022-04-20  2:35 ` [PATCH v2 7/8] documentation: zonefs: Cleanup the mount options section Damien Le Moal
2022-04-20 10:57   ` Hans Holmberg
2022-04-20  2:35 ` Damien Le Moal [this message]
2022-04-20 10:57   ` [PATCH v2 8/8] documentation: zonefs: Document sysfs attributes Hans Holmberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220420023545.3814998-9-damien.lemoal@opensource.wdc.com \
    --to=damien.lemoal@opensource.wdc.com \
    --cc=johannes.thumshirn@wdc.com \
    --cc=linux-fsdevel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).