€•{Œsphinx.addnodes”Œdocument”“”)�”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)�”}”(hhh]”(hŒ pending_xref”“”)�”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…”�”}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ&/translations/zh_CN/filesystems/zonefs”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)�”}”(hhh]”hŒChinese (Traditional)”…”�”}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ&/translations/zh_TW/filesystems/zonefs”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒItalian”…”�”}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ&/translations/it_IT/filesystems/zonefs”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒJapanese”…”�”}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ&/translations/ja_JP/filesystems/zonefs”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒKorean”…”�”}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ&/translations/ko_KR/filesystems/zonefs”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒPortuguese (Brazilian)”…”�”}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ&/translations/pt_BR/filesystems/zonefs”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒSpanish”…”�”}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ&/translations/sp_SP/filesystems/zonefs”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)�”}”(hŒ SPDX-License-Identifier: GPL-2.0”h]”hŒ SPDX-License-Identifier: GPL-2.0”…”�”}”hh·sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1hµhhh²hh³Œ@/var/lib/git/docbuild/linux/Documentation/filesystems/zonefs.rst”h´KubhŒsection”“”)�”}”(hhh]”(hŒtitle”“”)�”}”(hŒ0ZoneFS - Zone filesystem for Zoned block devices”h]”hŒ0ZoneFS - Zone filesystem for Zoned block devices”…”�”}”(hhÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÊh²hh³hÇh´KubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ Introduction”h]”hŒ Introduction”…”�”}”(hhàh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÝh²hh³hÇh´KubhŒ paragraph”“”)�”}”(hX zonefs is a very simple file system exposing each zone of a zoned block device as a file. Unlike a regular POSIX-compliant file system with native zoned block device support (e.g. f2fs), zonefs does not hide the sequential write constraint of zoned block devices to the user. Files representing sequential write zones of the device must be written sequentially starting from the end of the file (append only writes).”h]”hX zonefs is a very simple file system exposing each zone of a zoned block device as a file. Unlike a regular POSIX-compliant file system with native zoned block device support (e.g. f2fs), zonefs does not hide the sequential write constraint of zoned block devices to the user. Files representing sequential write zones of the device must be written sequentially starting from the end of the file (append only writes).”…”�”}”(hhðh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K hhÝh²hubhï)�”}”(hXzAs such, zonefs is in essence closer to a raw block device access interface than to a full-featured POSIX file system. The goal of zonefs is to simplify the implementation of zoned block device support in applications by replacing raw block device file accesses with a richer file API, avoiding relying on direct block device file ioctls which may be more obscure to developers. One example of this approach is the implementation of LSM (log-structured merge) tree structures (such as used in RocksDB and LevelDB) on zoned block devices by allowing SSTables to be stored in a zone file similarly to a regular file system rather than as a range of sectors of the entire disk. The introduction of the higher level construct "one file is one zone" can help reducing the amount of changes needed in the application as well as introducing support for different application programming languages.”h]”hX~As such, zonefs is in essence closer to a raw block device access interface than to a full-featured POSIX file system. The goal of zonefs is to simplify the implementation of zoned block device support in applications by replacing raw block device file accesses with a richer file API, avoiding relying on direct block device file ioctls which may be more obscure to developers. One example of this approach is the implementation of LSM (log-structured merge) tree structures (such as used in RocksDB and LevelDB) on zoned block devices by allowing SSTables to be stored in a zone file similarly to a regular file system rather than as a range of sectors of the entire disk. The introduction of the higher level construct “one file is one zoneâ€� can help reducing the amount of changes needed in the application as well as introducing support for different application programming languages.”…”�”}”(hhþh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KhhÝh²hubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒZoned block devices”h]”hŒZoned block devices”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj h²hh³hÇh´Kubhï)�”}”(hŒèZoned storage devices belong to a class of storage devices with an address space that is divided into zones. A zone is a group of consecutive LBAs and all zones are contiguous (there are no LBA gaps). Zones may have different types.”h]”hŒèZoned storage devices belong to a class of storage devices with an address space that is divided into zones. A zone is a group of consecutive LBAs and all zones are contiguous (there are no LBA gaps). Zones may have different types.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K!hj h²hubhŒ bullet_list”“”)�”}”(hhh]”(hŒ list_item”“”)�”}”(hŒ«Conventional zones: there are no access constraints to LBAs belonging to conventional zones. Any read or write access can be executed, similarly to a regular block device.”h]”hï)�”}”(hŒ«Conventional zones: there are no access constraints to LBAs belonging to conventional zones. Any read or write access can be executed, similarly to a regular block device.”h]”hŒ«Conventional zones: there are no access constraints to LBAs belonging to conventional zones. Any read or write access can be executed, similarly to a regular block device.”…”�”}”(hj6h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K%hj2ubah}”(h]”h ]”h"]”h$]”h&]”uh1j0hj-h²hh³hÇh´Nubj1)�”}”(hX Sequential zones: these zones accept random reads but must be written sequentially. Each sequential zone has a write pointer maintained by the device that keeps track of the mandatory start LBA position of the next write to the device. As a result of this write constraint, LBAs in a sequential zone cannot be overwritten. Sequential zones must first be erased using a special command (zone reset) before rewriting. ”h]”hï)�”}”(hXŸSequential zones: these zones accept random reads but must be written sequentially. Each sequential zone has a write pointer maintained by the device that keeps track of the mandatory start LBA position of the next write to the device. As a result of this write constraint, LBAs in a sequential zone cannot be overwritten. Sequential zones must first be erased using a special command (zone reset) before rewriting.”h]”hXŸSequential zones: these zones accept random reads but must be written sequentially. Each sequential zone has a write pointer maintained by the device that keeps track of the mandatory start LBA position of the next write to the device. As a result of this write constraint, LBAs in a sequential zone cannot be overwritten. Sequential zones must first be erased using a special command (zone reset) before rewriting.”…”�”}”(hjNh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K(hjJubah}”(h]”h ]”h"]”h$]”h&]”uh1j0hj-h²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ*”uh1j+h³hÇh´K%hj h²hubhï)�”}”(hXZoned storage devices can be implemented using various recording and media technologies. The most common form of zoned storage today uses the SCSI Zoned Block Commands (ZBC) and Zoned ATA Commands (ZAC) interfaces on Shingled Magnetic Recording (SMR) HDDs.”h]”hXZoned storage devices can be implemented using various recording and media technologies. The most common form of zoned storage today uses the SCSI Zoned Block Commands (ZBC) and Zoned ATA Commands (ZAC) interfaces on Shingled Magnetic Recording (SMR) HDDs.”…”�”}”(hjjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K/hj h²hubhï)�”}”(hX4Solid State Disks (SSD) storage devices can also implement a zoned interface to, for instance, reduce internal write amplification due to garbage collection. The NVMe Zoned NameSpace (ZNS) is a technical proposal of the NVMe standard committee aiming at adding a zoned storage interface to the NVMe protocol.”h]”hX4Solid State Disks (SSD) storage devices can also implement a zoned interface to, for instance, reduce internal write amplification due to garbage collection. The NVMe Zoned NameSpace (ZNS) is a technical proposal of the NVMe standard committee aiming at adding a zoned storage interface to the NVMe protocol.”…”�”}”(hjxh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K4hj h²hubeh}”(h]”Œzoned-block-devices”ah ]”h"]”Œzoned block devices”ah$]”h&]”uh1hÈhhÝh²hh³hÇh´Kubeh}”(h]”Œ introduction”ah ]”h"]”Œ introduction”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒZonefs Overview”h]”hŒZonefs Overview”…”�”}”(hj™h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj–h²hh³hÇh´K:ubhï)�”}”(hX:Zonefs exposes the zones of a zoned block device as files. The files representing zones are grouped by zone type, which are themselves represented by sub-directories. This file structure is built entirely using zone information provided by the device and so does not require any complex on-disk metadata structure.”h]”hX:Zonefs exposes the zones of a zoned block device as files. The files representing zones are grouped by zone type, which are themselves represented by sub-directories. This file structure is built entirely using zone information provided by the device and so does not require any complex on-disk metadata structure.”…”�”}”(hj§h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K * explicit-open”h]”hŒIzonefs defines several mount options: * errors= * explicit-open”…”�”}”(hj²h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´M5hj¡h²hubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ"errors=" option”h]”hŒ“errors=â€� option”…”�”}”(hjÃh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjÀh²hh³hÇh´M:ubhï)�”}”(hŒÌThe "errors=" option mount option allows the user to specify zonefs behavior in response to I/O errors, inode size inconsistencies or zone condition changes. The defined behaviors are as follow:”h]”hŒÐThe “errors=â€� option mount option allows the user to specify zonefs behavior in response to I/O errors, inode size inconsistencies or zone condition changes. The defined behaviors are as follow:”…”�”}”(hjÑh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´M<hjÀh²hubj,)�”}”(hhh]”(j1)�”}”(hŒremount-ro (default)”h]”hï)�”}”(hjäh]”hŒremount-ro (default)”…”�”}”(hjæh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´M@hjâubah}”(h]”h ]”h"]”h$]”h&]”uh1j0hjßh²hh³hÇh´Nubj1)�”}”(hŒzone-ro”h]”hï)�”}”(hjûh]”hŒzone-ro”…”�”}”(hjýh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´MAhjùubah}”(h]”h ]”h"]”h$]”h&]”uh1j0hjßh²hh³hÇh´Nubj1)�”}”(hŒ zone-offline”h]”hï)�”}”(hjh]”hŒ zone-offline”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´MBhjubah}”(h]”h ]”h"]”h$]”h&]”uh1j0hjßh²hh³hÇh´Nubj1)�”}”(hŒrepair ”h]”hï)�”}”(hŒrepair”h]”hŒrepair”…”�”}”(hj+h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´MChj'ubah}”(h]”h ]”h"]”h$]”h&]”uh1j0hjßh²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jhjiuh1j+h³hÇh´M@hjÀh²hubhï)�”}”(hXThe run-time I/O error actions defined for each behavior are detailed in the previous section. Mount time I/O errors will cause the mount operation to fail. The handling of read-only zones also differs between mount-time and run-time. If a read-only zone is found at mount time, the zone is always treated in the same manner as offline zones, that is, all accesses are disabled and the zone file size set to 0. This is necessary as the write pointer of read-only zones is defined as invalib by the ZBC and ZAC standards, making it impossible to discover the amount of data that has been written to the zone. In the case of a read-only zone discovered at run-time, as indicated in the previous section. The size of the zone file is left unchanged from its last updated value.”h]”hXThe run-time I/O error actions defined for each behavior are detailed in the previous section. Mount time I/O errors will cause the mount operation to fail. The handling of read-only zones also differs between mount-time and run-time. If a read-only zone is found at mount time, the zone is always treated in the same manner as offline zones, that is, all accesses are disabled and the zone file size set to 0. This is necessary as the write pointer of read-only zones is defined as invalib by the ZBC and ZAC standards, making it impossible to discover the amount of data that has been written to the zone. In the case of a read-only zone discovered at run-time, as indicated in the previous section. The size of the zone file is left unchanged from its last updated value.”…”�”}”(hjEh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´MEhjÀh²hubeh}”(h]”Œerrors-behavior-option”ah ]”h"]”Œ"errors=" option”ah$]”h&]”uh1hÈhj¡h²hh³hÇh´M:ubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ"explicit-open" option”h]”hŒ“explicit-openâ€� option”…”�”}”(hj^h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj[h²hh³hÇh´MQubhï)�”}”(hXšA zoned block device (e.g. an NVMe Zoned Namespace device) may have limits on the number of zones that can be active, that is, zones that are in the implicit open, explicit open or closed conditions. This potential limitation translates into a risk for applications to see write IO errors due to this limit being exceeded if the zone of a file is not already active when a write request is issued by the user.”h]”hXšA zoned block device (e.g. an NVMe Zoned Namespace device) may have limits on the number of zones that can be active, that is, zones that are in the implicit open, explicit open or closed conditions. This potential limitation translates into a risk for applications to see write IO errors due to this limit being exceeded if the zone of a file is not already active when a write request is issued by the user.”…”�”}”(hjlh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´MShj[h²hubhï)�”}”(hXÏTo avoid these potential errors, the "explicit-open" mount option forces zones to be made active using an open zone command when a file is opened for writing for the first time. If the zone open command succeeds, the application is then guaranteed that write requests can be processed. Conversely, the "explicit-open" mount option will result in a zone close command being issued to the device on the last close() of a zone file if the zone is not full nor empty.”h]”hX×To avoid these potential errors, the “explicit-openâ€� mount option forces zones to be made active using an open zone command when a file is opened for writing for the first time. If the zone open command succeeds, the application is then guaranteed that write requests can be processed. Conversely, the “explicit-openâ€� mount option will result in a zone close command being issued to the device on the last close() of a zone file if the zone is not full nor empty.”…”�”}”(hjzh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´MZhj[h²hubeh}”(h]”Œexplicit-open-option”ah ]”h"]”Œ"explicit-open" option”ah$]”h&]”uh1hÈhj¡h²hh³hÇh´MQubeh}”(h]”Œ mount-options”ah ]”h"]”Œ mount options”ah$]”h&]”uh1hÈhj–h²hh³hÇh´M3ubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒRuntime sysfs attributes”h]”hŒRuntime sysfs attributes”…”�”}”(hj›h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj˜h²hh³hÇh´Mcubhï)�”}”(hŒÒzonefs defines several sysfs attributes for mounted devices. All attributes are user readable and can be found in the directory /sys/fs/zonefs//, where is the name of the mounted zoned block device.”h]”hŒÒzonefs defines several sysfs attributes for mounted devices. All attributes are user readable and can be found in the directory /sys/fs/zonefs//, where is the name of the mounted zoned block device.”…”�”}”(hj©h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Mehj˜h²hubhï)�”}”(hŒ&The attributes defined are as follows.”h]”hŒ&The attributes defined are as follows.”…”�”}”(hj·h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Mihj˜h²hubj,)�”}”(hhh]”(j1)�”}”(hXŠ**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.”h]”hï)�”}”(hXŠ**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.”h]”(hŒstrong”“”)�”}”(hŒ**max_wro_seq_files**”h]”hŒmax_wro_seq_files”…”�”}”(hjÒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÐhjÌubhX…: 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 ”…”�”}”(hjÌh²hh³Nh´NubhŒemphasis”“”)�”}”(hŒ*explicit-open*”h]”hŒ explicit-open”…”�”}”(hjæh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jähjÌubhŒÇ 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 ”…”�”}”(hjÌh²hh³Nh´Nubjå)�”}”(hŒ*max_wro_seq_files*”h]”hŒmax_wro_seq_files”…”�”}”(hjøh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jähjÌubhŒ limit.”…”�”}”(hjÌh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´MkhjÈubah}”(h]”h ]”h"]”h$]”h&]”uh1j0hjÅh²hh³hÇh´Nubj1)�”}”(hXö**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.”h]”hï)�”}”(hXö**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.”h]”(jÑ)�”}”(hŒ**nr_wro_seq_files**”h]”hŒnr_wro_seq_files”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÐhjubhŒ©: 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 ”…”�”}”(hjh²hh³Nh´Nubjå)�”}”(hŒ*max_wro_seq_files*”h]”hŒmax_wro_seq_files”…”�”}”(hj0h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jähjubhŒ . If the ”…”�”}”(hjh²hh³Nh´Nubjå)�”}”(hŒ*explicit-open*”h]”hŒ explicit-open”…”�”}”(hjBh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jähjubhŒC mount option is not used, the reported number can be greater than ”…”�”}”(hjh²hh³Nh´Nubjå)�”}”(hŒ*max_wro_seq_files*”h]”hŒmax_wro_seq_files”…”�”}”(hjTh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jähjubhŒc. In such case, it is the responsibility of the application to not write simultaneously more than ”…”�”}”(hjh²hh³Nh´Nubjå)�”}”(hŒ*max_wro_seq_files*”h]”hŒmax_wro_seq_files”…”�”}”(hjfh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jähjubhŒE sequential zone files. Failure to do so can result in write errors.”…”�”}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Mthjubah}”(h]”h ]”h"]”h$]”h&]”uh1j0hjÅh²hh³hÇh´Nubj1)�”}”(hX**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 written (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.”h]”hï)�”}”(hX**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 written (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.”h]”(jÑ)�”}”(hŒ**max_active_seq_files**”h]”hŒmax_active_seq_files”…”�”}”(hjŒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÐhjˆubhŒù: This attribute reports the maximum number of sequential zone files that are in an active state, that is, sequential zone files that are partially written (not empty nor full) or that have a zone that is explicitly open (which happens only if the ”…”�”}”(hjˆh²hh³Nh´Nubjå)�”}”(hŒ*explicit-open*”h]”hŒ explicit-open”…”�”}”(hjžh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jähjˆubhŒè 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.”…”�”}”(hjˆh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´M{hj„ubah}”(h]”h ]”h"]”h$]”h&]”uh1j0hjÅh²hh³hÇh´Nubj1)�”}”(hX+**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. ”h]”hï)�”}”(hX***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.”h]”(jÑ)�”}”(hŒ**nr_active_seq_files**”h]”hŒnr_active_seq_files”…”�”}”(hjÄh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÐhjÀubhŒ[: This attributes reports the current number of sequential zone files that are active. If ”…”�”}”(hjÀh²hh³Nh´Nubjå)�”}”(hŒ*max_active_seq_files*”h]”hŒmax_active_seq_files”…”�”}”(hjÖh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jähjÀubhŒ is not 0, then the value of ”…”�”}”(hjÀh²hh³Nh´Nubjå)�”}”(hŒ*nr_active_seq_files*”h]”hŒnr_active_seq_files”…”�”}”(hjèh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jähjÀubhŒ can never exceed the value of ”…”�”}”(hjÀh²hh³Nh´Nubjå)�”}”(hŒ*nr_active_seq_files*”h]”hŒnr_active_seq_files”…”�”}”(hjúh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jähjÀubhŒ, regardless of the use of the ”…”�”}”(hjÀh²hh³Nh´Nubjå)�”}”(hŒ*explicit-open*”h]”hŒ explicit-open”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jähjÀubhŒ mount option.”…”�”}”(hjÀh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´M‚hj¼ubah}”(h]”h ]”h"]”h$]”h&]”uh1j0hjÅh²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jhjiuh1j+h³hÇh´Mkhj˜h²hubeh}”(h]”Œruntime-sysfs-attributes”ah ]”h"]”Œruntime sysfs attributes”ah$]”h&]”uh1hÈhj–h²hh³hÇh´Mcubeh}”(h]”Œzonefs-overview”ah ]”h"]”Œzonefs overview”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K:ubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒZonefs User Space Tools”h]”hŒZonefs User Space Tools”…”�”}”(hjCh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj@h²hh³hÇh´M‰ubhï)�”}”(hŒqThe mkzonefs tool is used to format zoned block devices for use with zonefs. This tool is available on Github at:”h]”hŒqThe mkzonefs tool is used to format zoned block devices for use with zonefs. This tool is available on Github at:”…”�”}”(hjQh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´M‹hj@h²hubhï)�”}”(hŒ-https://github.com/damien-lemoal/zonefs-tools”h]”hŒ reference”“”)�”}”(hjah]”hŒ-https://github.com/damien-lemoal/zonefs-tools”…”�”}”(hjeh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”jauh1jchj_ubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´MŽhj@h²hubhï)�”}”(hŒ‘zonefs-tools also includes a test suite which can be run against any zoned block device, including null_blk block device created with zoned mode.”h]”hŒ‘zonefs-tools also includes a test suite which can be run against any zoned block device, including null_blk block device created with zoned mode.”…”�”}”(hjyh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´M�hj@h²hubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒExamples”h]”hŒExamples”…”�”}”(hjŠh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj‡h²hh³hÇh´M”ubhï)�”}”(hŒ}The following formats a 15TB host-managed SMR HDD with 256 MB zones with the conventional zones aggregation feature enabled::”•ô%h]”hŒ|The following formats a 15TB host-managed SMR HDD with 256 MB zones with the conventional zones aggregation feature enabled:”…”�”}”(hj˜h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´M–hj‡h²hubjã)�”}”(hŒ±# mkzonefs -o aggr_cnv /dev/sdX # mount -t zonefs /dev/sdX /mnt # ls -l /mnt/ total 0 dr-xr-xr-x 2 root root 1 Nov 25 13:23 cnv dr-xr-xr-x 2 root root 55356 Nov 25 13:23 seq”h]”hŒ±# mkzonefs -o aggr_cnv /dev/sdX # mount -t zonefs /dev/sdX /mnt # ls -l /mnt/ total 0 dr-xr-xr-x 2 root root 1 Nov 25 13:23 cnv dr-xr-xr-x 2 root root 55356 Nov 25 13:23 seq”…”�”}”hj¦sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jâh³hÇh´M™hj‡h²hubhï)�”}”(hŒàThe size of the zone files sub-directories indicate the number of files existing for each type of zones. In this example, there is only one conventional zone file (all conventional zones are aggregated under a single file)::”h]”hŒßThe size of the zone files sub-directories indicate the number of files existing for each type of zones. In this example, there is only one conventional zone file (all conventional zones are aggregated under a single file):”…”�”}”(hj´h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´M hj‡h²hubjã)�”}”(hŒS# ls -l /mnt/cnv total 137101312 -rw-r----- 1 root root 140391743488 Nov 25 13:23 0”h]”hŒS# ls -l /mnt/cnv total 137101312 -rw-r----- 1 root root 140391743488 Nov 25 13:23 0”…”�”}”hjÂsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jâh³hÇh´M¥hj‡h²hubhï)�”}”(hŒFThis aggregated conventional zone file can be used as a regular file::”h]”hŒEThis aggregated conventional zone file can be used as a regular file:”…”�”}”(hjÐh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´M©hj‡h²hubjã)�”}”(hŒ7# mkfs.ext4 /mnt/cnv/0 # mount -o loop /mnt/cnv/0 /data”h]”hŒ7# mkfs.ext4 /mnt/cnv/0 # mount -o loop /mnt/cnv/0 /data”…”�”}”hjÞsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jâh³hÇh´M«hj‡h²hubhï)�”}”(hŒcThe "seq" sub-directory grouping files for sequential write zones has in this example 55356 zones::”h]”hŒfThe “seqâ€� sub-directory grouping files for sequential write zones has in this example 55356 zones:”…”�”}”(hjìh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´M®hj‡h²hubjã)�”}”(hŒ÷# ls -lv /mnt/seq total 14511243264 -rw-r----- 1 root root 0 Nov 25 13:23 0 -rw-r----- 1 root root 0 Nov 25 13:23 1 -rw-r----- 1 root root 0 Nov 25 13:23 2 ... -rw-r----- 1 root root 0 Nov 25 13:23 55354 -rw-r----- 1 root root 0 Nov 25 13:23 55355”h]”hŒ÷# ls -lv /mnt/seq total 14511243264 -rw-r----- 1 root root 0 Nov 25 13:23 0 -rw-r----- 1 root root 0 Nov 25 13:23 1 -rw-r----- 1 root root 0 Nov 25 13:23 2 ... -rw-r----- 1 root root 0 Nov 25 13:23 55354 -rw-r----- 1 root root 0 Nov 25 13:23 55355”…”�”}”hjúsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jâh³hÇh´M±hj‡h²hubhï)�”}”(hŒ‰For sequential write zone files, the file size changes as data is appended at the end of the file, similarly to any regular file system::”h]”hŒˆFor sequential write zone files, the file size changes as data is appended at the end of the file, similarly to any regular file system:”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Mºhj‡h²hubjã)�”}”(hŒì# dd if=/dev/zero of=/mnt/seq/0 bs=4096 count=1 conv=notrunc oflag=direct 1+0 records in 1+0 records out 4096 bytes (4.1 kB, 4.0 KiB) copied, 0.00044121 s, 9.3 MB/s # ls -l /mnt/seq/0 -rw-r----- 1 root root 4096 Nov 25 13:23 /mnt/seq/0”h]”hŒì# dd if=/dev/zero of=/mnt/seq/0 bs=4096 count=1 conv=notrunc oflag=direct 1+0 records in 1+0 records out 4096 bytes (4.1 kB, 4.0 KiB) copied, 0.00044121 s, 9.3 MB/s # ls -l /mnt/seq/0 -rw-r----- 1 root root 4096 Nov 25 13:23 /mnt/seq/0”…”�”}”hj sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jâh³hÇh´M½hj‡h²hubhï)�”}”(hŒ\The written file can be truncated to the zone size, preventing any further write operation::”h]”hŒ[The written file can be truncated to the zone size, preventing any further write operation:”…”�”}”(hj$ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´MÅhj‡h²hubjã)�”}”(hŒn# truncate -s 268435456 /mnt/seq/0 # ls -l /mnt/seq/0 -rw-r----- 1 root root 268435456 Nov 25 13:49 /mnt/seq/0”h]”hŒn# truncate -s 268435456 /mnt/seq/0 # ls -l /mnt/seq/0 -rw-r----- 1 root root 268435456 Nov 25 13:49 /mnt/seq/0”…”�”}”hj2 sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jâh³hÇh´MÈhj‡h²hubhï)�”}”(hŒgTruncation to 0 size allows freeing the file zone storage space and restart append-writes to the file::”h]”hŒfTruncation to 0 size allows freeing the file zone storage space and restart append-writes to the file:”…”�”}”(hj@ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´MÌhj‡h²hubjã)�”}”(hŒ^# truncate -s 0 /mnt/seq/0 # ls -l /mnt/seq/0 -rw-r----- 1 root root 0 Nov 25 13:49 /mnt/seq/0”h]”hŒ^# truncate -s 0 /mnt/seq/0 # ls -l /mnt/seq/0 -rw-r----- 1 root root 0 Nov 25 13:49 /mnt/seq/0”…”�”}”hjN sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jâh³hÇh´MÏhj‡h²hubhï)�”}”(hŒ¢Since files are statically mapped to zones on the disk, the number of blocks of a file as reported by stat() and fstat() indicates the capacity of the file zone::”h]”hŒ¡Since files are statically mapped to zones on the disk, the number of blocks of a file as reported by stat() and fstat() indicates the capacity of the file zone:”…”�”}”(hj\ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´MÓhj‡h²hubjã)�”}”(hXs# stat /mnt/seq/0 File: /mnt/seq/0 Size: 0 Blocks: 524288 IO Block: 4096 regular empty file Device: 870h/2160d Inode: 50431 Links: 1 Access: (0640/-rw-r-----) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2019-11-25 13:23:57.048971997 +0900 Modify: 2019-11-25 13:52:25.553805765 +0900 Change: 2019-11-25 13:52:25.553805765 +0900 Birth: -”h]”hXs# stat /mnt/seq/0 File: /mnt/seq/0 Size: 0 Blocks: 524288 IO Block: 4096 regular empty file Device: 870h/2160d Inode: 50431 Links: 1 Access: (0640/-rw-r-----) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2019-11-25 13:23:57.048971997 +0900 Modify: 2019-11-25 13:52:25.553805765 +0900 Change: 2019-11-25 13:52:25.553805765 +0900 Birth: -”…”�”}”hjj sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jâh³hÇh´M×hj‡h²hubhï)�”}”(hX@The number of blocks of the file ("Blocks") in units of 512B blocks gives the maximum file size of 524288 * 512 B = 256 MB, corresponding to the device zone capacity in this example. Of note is that the "IO block" field always indicates the minimum I/O size for writes and corresponds to the device physical sector size.”h]”hXHThe number of blocks of the file (“Blocksâ€�) in units of 512B blocks gives the maximum file size of 524288 * 512 B = 256 MB, corresponding to the device zone capacity in this example. Of note is that the “IO blockâ€� field always indicates the minimum I/O size for writes and corresponds to the device physical sector size.”…”�”}”(hjx h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Máhj‡h²hubeh}”(h]”Œexamples”ah ]”h"]”Œexamples”ah$]”h&]”uh1hÈhj@h²hh³hÇh´M”ubeh}”(h]”Œzonefs-user-space-tools”ah ]”h"]”Œzonefs user space tools”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´M‰ubeh}”(h]”Œ.zonefs-zone-filesystem-for-zoned-block-devices”ah ]”h"]”Œ0zonefs - zone filesystem for zoned block devices”ah$]”h&]”uh1hÈhhh²hh³hÇh´Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÇuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)�”}”(hÍNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”jÁ Œerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÇŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(j› j˜ j“j�j‹jˆj=j:jçjäjFjCj—j”jÌjÉj+j(j£j jžj›j•j’jXjUj�jŠj5j2j“ j� j‹ jˆ uŒ nametypes”}”(j› ‰j“‰j‹‰j=‰jç‰jF‰j—‰j̉j+‰j£‰jž‰j•‰jX‰j�‰j5‰j“ ‰j‹ ‰uh}”(j˜ hÊj�hÝjˆj j:j–jäjµjCjêj”jIjÉjšj(jÏj j.j›j¦j’j¡jUjÀjŠj[j2j˜j� j@jˆ j‡uŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.