€•gsŒ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”Œ3/translations/zh_CN/admin-guide/blockdev/zoned_loop”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ3/translations/zh_TW/admin-guide/blockdev/zoned_loop”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ3/translations/it_IT/admin-guide/blockdev/zoned_loop”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ3/translations/ja_JP/admin-guide/blockdev/zoned_loop”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ3/translations/ko_KR/admin-guide/blockdev/zoned_loop”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ3/translations/pt_BR/admin-guide/blockdev/zoned_loop”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ3/translations/sp_SP/admin-guide/blockdev/zoned_loop”Œ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³ŒM/var/lib/git/docbuild/linux/Documentation/admin-guide/blockdev/zoned_loop.rst”h´KubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒZoned Loop Block Device”h]”hŒZoned Loop Block Device”…””}”(hhÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÊh²hh³hÇh´Kubh¶)”}”(hŒWContents: 1) Overview 2) Creating a Zoned Device 3) Deleting a Zoned Device 4) Example”h]”hŒWContents: 1) Overview 2) Creating a Zoned Device 3) Deleting a Zoned Device 4) Example”…””}”hhÝsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1hµhhÊh²hh³hÇh´KubhÉ)”}”(hhh]”(hÎ)”}”(hŒ 1) Overview”h]”hŒ 1) Overview”…””}”(hhîh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhëh²hh³hÇh´KubhŒ paragraph”“”)”}”(hX.The zoned loop block device driver (zloop) allows a user to create a zoned block device using one regular file per zone as backing storage. This driver does not directly control any hardware and uses read, write and truncate operations to regular files of a file system to emulate a zoned block device.”h]”hX.The zoned loop block device driver (zloop) allows a user to create a zoned block device using one regular file per zone as backing storage. This driver does not directly control any hardware and uses read, write and truncate operations to regular files of a file system to emulate a zoned block device.”…””}”(hhþh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Khhëh²hubhý)”}”(hXUsing zloop, zoned block devices with a configurable capacity, zone size and number of conventional zones can be created. The storage for each zone of the device is implemented using a regular file with a maximum size equal to the zone size. The size of a file backing a conventional zone is always equal to the zone size. The size of a file backing a sequential zone indicates the amount of data sequentially written to the file, that is, the size of the file directly indicates the position of the write pointer of the zone.”h]”hXUsing zloop, zoned block devices with a configurable capacity, zone size and number of conventional zones can be created. The storage for each zone of the device is implemented using a regular file with a maximum size equal to the zone size. The size of a file backing a conventional zone is always equal to the zone size. The size of a file backing a sequential zone indicates the amount of data sequentially written to the file, that is, the size of the file directly indicates the position of the write pointer of the zone.”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Khhëh²hubhý)”}”(hXÄWhen resetting a sequential zone, its backing file size is truncated to zero. Conversely, for a zone finish operation, the backing file is truncated to the zone capacity. With this, a zloop zoned block device can be configured with a larger capacity than the storage space available on the backing file system. Of course, for such configuration, writing more data than the storage space available on the backing file system will result in write errors.”h]”hXÄWhen resetting a sequential zone, its backing file size is truncated to zero. Conversely, for a zone finish operation, the backing file is truncated to the zone capacity. With this, a zloop zoned block device can be configured with a larger capacity than the storage space available on the backing file system. Of course, for such configuration, writing more data than the storage space available on the backing file system will result in write errors.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Khhëh²hubhý)”}”(hXThe zoned loop block device driver implements a complete zone transition state machine. That is, zones can be empty, implicitly opened, explicitly opened, closed or full. The current implementation does not support any limits on the maximum number of open and active zones.”h]”hXThe zoned loop block device driver implements a complete zone transition state machine. That is, zones can be empty, implicitly opened, explicitly opened, closed or full. The current implementation does not support any limits on the maximum number of open and active zones.”…””}”(hj(h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K&hhëh²hubhý)”}”(hŒ?No user tools are necessary to create and delete zloop devices.”h]”hŒ?No user tools are necessary to create and delete zloop devices.”…””}”(hj6h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K+hhëh²hubeh}”(h]”Œoverview”ah ]”h"]”Œ 1) overview”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KubhÉ)”}”(hhh]”(hÎ)”}”(hŒ2) Creating a Zoned Device”h]”hŒ2) Creating a Zoned Device”…””}”(hjOh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjLh²hh³hÇh´K.ubhý)”}”(hŒíOnce the zloop module is loaded (or if zloop is compiled in the kernel), the character device file /dev/zloop-control can be used to add a zloop device. This is done by writing an "add" command directly to the /dev/zloop-control device::”h]”hŒðOnce the zloop module is loaded (or if zloop is compiled in the kernel), the character device file /dev/zloop-control can be used to add a zloop device. This is done by writing an “add†command directly to the /dev/zloop-control device:”…””}”(hj]h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K0hjLh²hubhŒ literal_block”“”)”}”(hŒ¸$ modprobe zloop $ ls -l /dev/zloop* crw-------. 1 root root 10, 123 Jan 6 19:18 /dev/zloop-control $ mkdir -p $ echo "add [options]" > /dev/zloop-control”h]”hŒ¸$ modprobe zloop $ ls -l /dev/zloop* crw-------. 1 root root 10, 123 Jan 6 19:18 /dev/zloop-control $ mkdir -p $ echo "add [options]" > /dev/zloop-control”…””}”hjmsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jkh³hÇh´K5hjLh²hubhý)”}”(hŒbThe options available for the add command can be listed by reading the /dev/zloop-control device::”h]”hŒaThe options available for the add command can be listed by reading the /dev/zloop-control device:”…””}”(hj{h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K /dev/zloop-control”h]”hŒ)$ echo "remove id=X" > /dev/zloop-control”…””}”hjÓsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jkh³hÇh´K|hj´h²hubhý)”}”(hŒ,The remove command does not have any option.”h]”hŒ,The remove command does not have any option.”…””}”(hjáh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K~hj´h²hubhý)”}”(hX±A zoned device that was removed can be re-added again without any change to the state of the device zones: the device zones are restored to their last state before the device was removed. Adding again a zoned device after it was removed must always be done using the same configuration as when the device was first added. If a zone configuration change is detected, an error will be returned and the zoned device will not be created.”h]”hX±A zoned device that was removed can be re-added again without any change to the state of the device zones: the device zones are restored to their last state before the device was removed. Adding again a zoned device after it was removed must always be done using the same configuration as when the device was first added. If a zone configuration change is detected, an error will be returned and the zoned device will not be created.”…””}”(hjïh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K€hj´h²hubhý)”}”(hŒ¡To fully delete a zoned device, after executing the remove operation, the device base directory containing the backing files of the device zones must be deleted.”h]”hŒ¡To fully delete a zoned device, after executing the remove operation, the device base directory containing the backing files of the device zones must be deleted.”…””}”(hjýh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K‡hj´h²hubeh}”(h]”Œdeleting-a-zoned-device”ah ]”h"]”Œ3) deleting a zoned device”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KwubhÉ)”}”(hhh]”(hÎ)”}”(hŒ 4) Example”h]”hŒ 4) Example”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjh²hh³hÇh´K‹ubhý)”}”(hŒpThe following sequence of commands creates a 2GB zoned device with zones of 64 MB and a zone capacity of 63 MB::”h]”hŒoThe following sequence of commands creates a 2GB zoned device with zones of 64 MB and a zone capacity of 63 MB:”…””}”(hj$h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Khjh²hubjl)”}”(hŒ…$ modprobe zloop $ mkdir -p /var/local/zloop/0 $ echo "add capacity_mb=2048,zone_size_mb=64,zone_capacity_mb=63" > /dev/zloop-control”h]”hŒ…$ modprobe zloop $ mkdir -p /var/local/zloop/0 $ echo "add capacity_mb=2048,zone_size_mb=64,zone_capacity_mb=63" > /dev/zloop-control”…””}”hj2sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jkh³hÇh´Khjh²hubhý)”}”(hŒ‚For the device created (/dev/zloop0), the zone backing files are all created under the default base directory (/var/local/zloop)::”h]”hŒFor the device created (/dev/zloop0), the zone backing files are all created under the default base directory (/var/local/zloop):”…””}”(hj@h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K”hjh²hubjl)”}”(hX`$ ls -l /var/local/zloop/0 total 0 -rw-------. 1 root root 67108864 Jan 6 22:23 cnv-000000 -rw-------. 1 root root 67108864 Jan 6 22:23 cnv-000001 -rw-------. 1 root root 67108864 Jan 6 22:23 cnv-000002 -rw-------. 1 root root 67108864 Jan 6 22:23 cnv-000003 -rw-------. 1 root root 67108864 Jan 6 22:23 cnv-000004 -rw-------. 1 root root 67108864 Jan 6 22:23 cnv-000005 -rw-------. 1 root root 67108864 Jan 6 22:23 cnv-000006 -rw-------. 1 root root 67108864 Jan 6 22:23 cnv-000007 -rw-------. 1 root root 0 Jan 6 22:23 seq-000008 -rw-------. 1 root root 0 Jan 6 22:23 seq-000009 ...”h]”hX`$ ls -l /var/local/zloop/0 total 0 -rw-------. 1 root root 67108864 Jan 6 22:23 cnv-000000 -rw-------. 1 root root 67108864 Jan 6 22:23 cnv-000001 -rw-------. 1 root root 67108864 Jan 6 22:23 cnv-000002 -rw-------. 1 root root 67108864 Jan 6 22:23 cnv-000003 -rw-------. 1 root root 67108864 Jan 6 22:23 cnv-000004 -rw-------. 1 root root 67108864 Jan 6 22:23 cnv-000005 -rw-------. 1 root root 67108864 Jan 6 22:23 cnv-000006 -rw-------. 1 root root 67108864 Jan 6 22:23 cnv-000007 -rw-------. 1 root root 0 Jan 6 22:23 seq-000008 -rw-------. 1 root root 0 Jan 6 22:23 seq-000009 ...”…””}”hjNsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jkh³hÇh´K—hjh²hubhý)”}”(hŒBThe zoned device created (/dev/zloop0) can then be used normally::”h]”hŒAThe zoned device created (/dev/zloop0) can then be used normally:”…””}”(hj\h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K¥hjh²hubjl)”}”(hX$ lsblk -z NAME ZONED ZONE-SZ ZONE-NR ZONE-AMAX ZONE-OMAX ZONE-APP ZONE-WGRAN zloop0 host-managed 64M 32 0 0 1M 4K $ blkzone report /dev/zloop0 start: 0x000000000, len 0x020000, cap 0x020000, wptr 0x000000 reset:0 non-seq:0, zcond: 0(nw) [type: 1(CONVENTIONAL)] start: 0x000020000, len 0x020000, cap 0x020000, wptr 0x000000 reset:0 non-seq:0, zcond: 0(nw) [type: 1(CONVENTIONAL)] start: 0x000040000, len 0x020000, cap 0x020000, wptr 0x000000 reset:0 non-seq:0, zcond: 0(nw) [type: 1(CONVENTIONAL)] start: 0x000060000, len 0x020000, cap 0x020000, wptr 0x000000 reset:0 non-seq:0, zcond: 0(nw) [type: 1(CONVENTIONAL)] start: 0x000080000, len 0x020000, cap 0x020000, wptr 0x000000 reset:0 non-seq:0, zcond: 0(nw) [type: 1(CONVENTIONAL)] start: 0x0000a0000, len 0x020000, cap 0x020000, wptr 0x000000 reset:0 non-seq:0, zcond: 0(nw) [type: 1(CONVENTIONAL)] start: 0x0000c0000, len 0x020000, cap 0x020000, wptr 0x000000 reset:0 non-seq:0, zcond: 0(nw) [type: 1(CONVENTIONAL)] start: 0x0000e0000, len 0x020000, cap 0x020000, wptr 0x000000 reset:0 non-seq:0, zcond: 0(nw) [type: 1(CONVENTIONAL)] start: 0x000100000, len 0x020000, cap 0x01f800, wptr 0x000000 reset:0 non-seq:0, zcond: 1(em) [type: 2(SEQ_WRITE_REQUIRED)] start: 0x000120000, len 0x020000, cap 0x01f800, wptr 0x000000 reset:0 non-seq:0, zcond: 1(em) [type: 2(SEQ_WRITE_REQUIRED)] ...”h]”hX$ lsblk -z NAME ZONED ZONE-SZ ZONE-NR ZONE-AMAX ZONE-OMAX ZONE-APP ZONE-WGRAN zloop0 host-managed 64M 32 0 0 1M 4K $ blkzone report /dev/zloop0 start: 0x000000000, len 0x020000, cap 0x020000, wptr 0x000000 reset:0 non-seq:0, zcond: 0(nw) [type: 1(CONVENTIONAL)] start: 0x000020000, len 0x020000, cap 0x020000, wptr 0x000000 reset:0 non-seq:0, zcond: 0(nw) [type: 1(CONVENTIONAL)] start: 0x000040000, len 0x020000, cap 0x020000, wptr 0x000000 reset:0 non-seq:0, zcond: 0(nw) [type: 1(CONVENTIONAL)] start: 0x000060000, len 0x020000, cap 0x020000, wptr 0x000000 reset:0 non-seq:0, zcond: 0(nw) [type: 1(CONVENTIONAL)] start: 0x000080000, len 0x020000, cap 0x020000, wptr 0x000000 reset:0 non-seq:0, zcond: 0(nw) [type: 1(CONVENTIONAL)] start: 0x0000a0000, len 0x020000, cap 0x020000, wptr 0x000000 reset:0 non-seq:0, zcond: 0(nw) [type: 1(CONVENTIONAL)] start: 0x0000c0000, len 0x020000, cap 0x020000, wptr 0x000000 reset:0 non-seq:0, zcond: 0(nw) [type: 1(CONVENTIONAL)] start: 0x0000e0000, len 0x020000, cap 0x020000, wptr 0x000000 reset:0 non-seq:0, zcond: 0(nw) [type: 1(CONVENTIONAL)] start: 0x000100000, len 0x020000, cap 0x01f800, wptr 0x000000 reset:0 non-seq:0, zcond: 1(em) [type: 2(SEQ_WRITE_REQUIRED)] start: 0x000120000, len 0x020000, cap 0x01f800, wptr 0x000000 reset:0 non-seq:0, zcond: 1(em) [type: 2(SEQ_WRITE_REQUIRED)] ...”…””}”hjjsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jkh³hÇh´K§hjh²hubhý)”}”(hŒ0Deleting this device is done using the command::”h]”hŒ/Deleting this device is done using the command:”…””}”(hjxh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K·hjh²hubjl)”}”(hŒ)$ echo "remove id=0" > /dev/zloop-control”h]”hŒ)$ echo "remove id=0" > /dev/zloop-control”…””}”hj†sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jkh³hÇh´K¹hjh²hubhý)”}”(hŒÙThe removed device can be re-added again using the same "add" command as when the device was first created. To fully delete a zoned device, its backing files should also be deleted after executing the remove command::”h]”hŒÜThe removed device can be re-added again using the same “add†command as when the device was first created. To fully delete a zoned device, its backing files should also be deleted after executing the remove command:”…””}”(hj”h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K»hjh²hubjl)”}”(hŒ$ rm -r /var/local/zloop/0”h]”hŒ$ rm -r /var/local/zloop/0”…””}”hj¢sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jkh³hÇh´K¿hjh²hubeh}”(h]”Œexample”ah ]”h"]”Œ 4) example”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K‹ubeh}”(h]”Œzoned-loop-block-device”ah ]”h"]”Œzoned loop block device”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”jÏŒ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ºjIjFj±j®jj jµj²uŒ nametypes”}”(j½‰jI‰j±‰j‰jµ‰uh}”(jºhÊjFhëj®jLj j´j²juŒ 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.