€• 4Œ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/admin-guide/device-mapper/persistent-data”Œ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/admin-guide/device-mapper/persistent-data”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ=/translations/it_IT/admin-guide/device-mapper/persistent-data”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ=/translations/ja_JP/admin-guide/device-mapper/persistent-data”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ=/translations/ko_KR/admin-guide/device-mapper/persistent-data”Œ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/admin-guide/device-mapper/persistent-data”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒPersistent data”h]”hŒPersistent data”…””}”(hh¨hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hh£hžhhŸŒW/var/lib/git/docbuild/linux/Documentation/admin-guide/device-mapper/persistent-data.rst”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”“”)”}”(hŒÑThe more-sophisticated device-mapper targets require complex metadata that is managed in kernel. In late 2010 we were seeing that various different targets were rolling their own data structures, for example:”h]”hŒÑThe more-sophisticated device-mapper targets require complex metadata that is managed in kernel. In late 2010 we were seeing that various different targets were rolling their own data structures, for example:”…””}”(hhÊhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h Khh·hžhubhŒ bullet_list”“”)”}”(hhh]”(hŒ list_item”“”)”}”(hŒ*Mikulas Patocka's multisnap implementation”h]”hÉ)”}”(hháh]”hŒ,Mikulas Patocka’s multisnap implementation”…””}”(hhãhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h K hhßubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝhhÚhžhhŸh¶h NubhÞ)”}”(hŒ,Heinz Mauelshagen's thin provisioning target”h]”hÉ)”}”(hhøh]”hŒ.Heinz Mauelshagen’s thin provisioning target”…””}”(hhúhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h K hhöubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝhhÚhžhhŸh¶h NubhÞ)”}”(hŒ5Another btree-based caching target posted to dm-devel”h]”hÉ)”}”(hjh]”hŒ5Another btree-based caching target posted to dm-devel”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h Khj ubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝhhÚhžhhŸh¶h NubhÞ)”}”(hŒCAnother multi-snapshot target based on a design of Daniel Phillips ”h]”hÉ)”}”(hŒBAnother multi-snapshot target based on a design of Daniel Phillips”h]”hŒBAnother multi-snapshot target based on a design of Daniel Phillips”…””}”(hj(hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h Khj$ubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝhhÚhžhhŸh¶h Nubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ-”uh1hØhŸh¶h K hh·hžhubhÉ)”}”(hŒeMaintaining these data structures takes a lot of work, so if possible we'd like to reduce the number.”h]”hŒgMaintaining these data structures takes a lot of work, so if possible we’d like to reduce the number.”…””}”(hjDhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h Khh·hžhubhÉ)”}”(hŒìThe persistent-data library is an attempt to provide a re-usable framework for people who want to store metadata in device-mapper targets. It's currently used by the thin-provisioning target and an upcoming hierarchical storage target.”h]”hŒîThe persistent-data library is an attempt to provide a re-usable framework for people who want to store metadata in device-mapper targets. It’s currently used by the thin-provisioning target and an upcoming hierarchical storage target.”…””}”(hjRhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h Khh·hžhubeh}”(h]”Œ introduction”ah ]”h"]”Œ introduction”ah$]”h&]”uh1h¡hh£hžhhŸh¶h Kubh¢)”}”(hhh]”(h§)”}”(hŒOverview”h]”hŒOverview”…””}”(hjkhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjhhžhhŸh¶h KubhÉ)”}”(hŒfThe main documentation is in the header files which can all be found under drivers/md/persistent-data.”h]”hŒfThe main documentation is in the header files which can all be found under drivers/md/persistent-data.”…””}”(hjyhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h Khjhhžhubh¢)”}”(hhh]”(h§)”}”(hŒThe block manager”h]”hŒThe block manager”…””}”(hjŠhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hj‡hžhhŸh¶h K ubhÉ)”}”(hŒdm-block-manager.[hc]”h]”hŒdm-block-manager.[hc]”…””}”(hj˜hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h K"hj‡hžhubhÉ)”}”(hŒ·This provides access to the data on disk in fixed sized-blocks. There is a read/write locking interface to prevent concurrent accesses, and keep data that is being used in the cache.”h]”hŒ·This provides access to the data on disk in fixed sized-blocks. There is a read/write locking interface to prevent concurrent accesses, and keep data that is being used in the cache.”…””}”(hj¦hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h K$hj‡hžhubhÉ)”}”(hŒ=Clients of persistent-data are unlikely to use this directly.”h]”hŒ=Clients of persistent-data are unlikely to use this directly.”…””}”(hj´hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h K(hj‡hžhubeh}”(h]”Œthe-block-manager”ah ]”h"]”Œthe block manager”ah$]”h&]”uh1h¡hjhhžhhŸh¶h K ubh¢)”}”(hhh]”(h§)”}”(hŒThe transaction manager”h]”hŒThe transaction manager”…””}”(hjÍhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjÊhžhhŸh¶h K+ubhÉ)”}”(hŒdm-transaction-manager.[hc]”h]”hŒdm-transaction-manager.[hc]”…””}”(hjÛhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h K-hjÊhžhubhÉ)”}”(hXØThis restricts access to blocks and enforces copy-on-write semantics. The only way you can get hold of a writable block through the transaction manager is by shadowing an existing block (ie. doing copy-on-write) or allocating a fresh one. Shadowing is elided within the same transaction so performance is reasonable. The commit method ensures that all data is flushed before it writes the superblock. On power failure your metadata will be as it was when last committed.”h]”hXØThis restricts access to blocks and enforces copy-on-write semantics. The only way you can get hold of a writable block through the transaction manager is by shadowing an existing block (ie. doing copy-on-write) or allocating a fresh one. Shadowing is elided within the same transaction so performance is reasonable. The commit method ensures that all data is flushed before it writes the superblock. On power failure your metadata will be as it was when last committed.”…””}”(hjéhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h K/hjÊhžhubeh}”(h]”Œthe-transaction-manager”ah ]”h"]”Œthe transaction manager”ah$]”h&]”uh1h¡hjhhžhhŸh¶h K+ubh¢)”}”(hhh]”(h§)”}”(hŒThe Space Maps”h]”hŒThe Space Maps”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjÿhžhhŸh¶h K8ubhÉ)”}”(hŒ@dm-space-map.h dm-space-map-metadata.[hc] dm-space-map-disk.[hc]”h]”hŒ@dm-space-map.h dm-space-map-metadata.[hc] dm-space-map-disk.[hc]”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h K:hjÿhžhubhÉ)”}”(hXtOn-disk data structures that keep track of reference counts of blocks. Also acts as the allocator of new blocks. Currently two implementations: a simpler one for managing blocks on a different device (eg. thinly-provisioned data blocks); and one for managing the metadata space. The latter is complicated by the need to store its own data within the space it's managing.”h]”hXvOn-disk data structures that keep track of reference counts of blocks. Also acts as the allocator of new blocks. Currently two implementations: a simpler one for managing blocks on a different device (eg. thinly-provisioned data blocks); and one for managing the metadata space. The latter is complicated by the need to store its own data within the space it’s managing.”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h K>hjÿhžhubeh}”(h]”Œthe-space-maps”ah ]”h"]”Œthe space maps”ah$]”h&]”uh1h¡hjhhžhhŸh¶h K8ubh¢)”}”(hhh]”(h§)”}”(hŒThe data structures”h]”hŒThe data structures”…””}”(hj7hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hj4hžhhŸh¶h KFubhÉ)”}”(hŒDdm-btree.[hc] dm-btree-remove.c dm-btree-spine.c dm-btree-internal.h”h]”hŒDdm-btree.[hc] dm-btree-remove.c dm-btree-spine.c dm-btree-internal.h”…””}”(hjEhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h KHhj4hžhubhÉ)”}”(hŒ«Currently there is only one data structure, a hierarchical btree. There are plans to add more. For example, something with an array-like interface would see a lot of use.”h]”hŒ«Currently there is only one data structure, a hierarchical btree. There are plans to add more. For example, something with an array-like interface would see a lot of use.”…””}”(hjShžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h KMhj4hžhubhÉ)”}”(hX+The btree is 'hierarchical' in that you can define it to be composed of nested btrees, and take multiple keys. For example, the thin-provisioning target uses a btree with two levels of nesting. The first maps a device id to a mapping tree, and that in turn maps a virtual block to a physical block.”h]”hX/The btree is ‘hierarchical’ in that you can define it to be composed of nested btrees, and take multiple keys. For example, the thin-provisioning target uses a btree with two levels of nesting. The first maps a device id to a mapping tree, and that in turn maps a virtual block to a physical block.”…””}”(hjahžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h KQhj4hžhubhÉ)”}”(hŒValues stored in the btrees can have arbitrary size. Keys are always 64bits, although nesting allows you to use multiple keys.”h]”hŒValues stored in the btrees can have arbitrary size. Keys are always 64bits, although nesting allows you to use multiple keys.”…””}”(hjohžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h KWhj4hžhubeh}”(h]”Œthe-data-structures”ah ]”h"]”Œthe data structures”ah$]”h&]”uh1h¡hjhhžhhŸh¶h KFubeh}”(h]”Œoverview”ah ]”h"]”Œoverview”ah$]”h&]”uh1h¡hh£hžhhŸh¶h Kubeh}”(h]”Œpersistent-data”ah ]”h"]”Œpersistent data”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’jjejbjŠj‡jÇjÄjüjùj1j.j‚juŒ nametypes”}”(j’‰je‰jЉjljjü‰j1‰j‚‰uh}”(jh£jbh·j‡jhjÄj‡jùjÊj.jÿjj4uŒ 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.