From: Goffredo Baroncelli <kreijack@inwind.it>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH v0 4/4] Btrfs sysfs support documentation.
Date: Thu, 23 Aug 2012 14:13:50 +0200 [thread overview]
Message-ID: <20120823121337.12203.33725.stgit@venice.bhome> (raw)
In-Reply-To: <20120823120505.12203.11658.stgit@venice.bhome>
Update of the Documentation/filesystes/btrfs.txt file.
---
0 files changed
diff --git a/Documentation/filesystems/btrfs.txt b/Documentation/filesystems/btrfs.txt
index 7671352..35840ab 100644
--- a/Documentation/filesystems/btrfs.txt
+++ b/Documentation/filesystems/btrfs.txt
@@ -89,3 +89,78 @@ btrfsck: do a limited check of the FS extent trees.
btrfs-debug-tree: print all of the FS metadata in text form. Example:
btrfs-debug-tree /dev/sda2 >& big_output_file
+
+
+
+ SYSFS SUPPORT
+ =============
+
+If the option CONFIG_BTRFS_FS_SYSFS is enabled, BTRFS exports some
+information via the sysfs filesystem.
+Todate these information are read-only.
+
+The information exported are related to both the devices and the filesystems.
+When a devices is registred (for example via the btrfs filesystem scan
+command), BTRFS creates the following entries under /sys/fs/btrfs:
+
+/sys/fs/btrfs:
+
+ - devices -> information per device basis
+ - filesystem -> information per filesystem basis
+
+/sys/fs/btrfs/devices/<device-UUID>:
+
+ - bytes_used
+ - devid
+ - disk_total_bytes
+ - fsid -> fielsystem UUID
+ - generation
+ - major [*]
+ - minor [*]
+ - missing
+ - name -> device name (eg: /dev/sda)
+ - total_bytes
+ - write_errors -> error info
+ - corruption_errors -> error info
+ - read_errors -> error info
+ - generation_errors -> error info
+ - flush_errors -> error info
+ - writeable
+
+[*] These information are available only after the mounting of the
+filesystem.
+
+/sys/fs/btrfs/filesystem/<filesystem-UUID>/fs_info:
+
+ - balance_cancel_req -> balance status information
+ - balance_pause_req -> balance status information
+ - balance_running -> balance status information
+ - fs_state
+ - generation
+ - label -> label of the filesystem
+ - last_trans_committed
+ - scrub_cancel_req -> scrub status information
+ - scrub_pause_req -> scrub status information
+ - scrubs_paused -> scrub status information
+ - scrubs_running -> scrub status information
+
+/sys/fs/btrfs/filesystem/<filesystem-UUID>/fs_devices:
+
+ - latest_devid
+ - latest_trans
+ - missing_devices
+ - num_can_discard
+ - open_devices
+ - opened
+ - rw_devices
+ - seeding
+ - total_rw_bytes
+
+The filesystems information are split in two section (fs_info and fs_devices)
+because the fs_devices entries are available after the scan of the device(s),
+but the fs_info entries are available only after the mount of the
+filesystem.
+
+The link between the filesystem and the device(s) is the fsid ==
+filesystem-UUID.
+
prev parent reply other threads:[~2012-08-23 12:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-23 12:12 [PATCH v0 0/4] BTRFS sysfs support Goffredo Baroncelli
2012-08-23 12:12 ` [PATCH v0 1/4] Add support for sysfs to btrfs Goffredo Baroncelli
2012-08-23 14:01 ` Stefan Behrens
2012-08-23 12:13 ` [PATCH v0 2/4] Add hook " Goffredo Baroncelli
2012-08-23 12:13 ` [PATCH v0 3/4] Add a new Kconfig section to enable or disable the sysfs Goffredo Baroncelli
2012-08-23 12:13 ` Goffredo Baroncelli [this message]
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=20120823121337.12203.33725.stgit@venice.bhome \
--to=kreijack@inwind.it \
--cc=linux-btrfs@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).