~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/admin-guide/device-mapper/persistent-data.rst

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /Documentation/admin-guide/device-mapper/persistent-data.rst (Architecture mips) and /Documentation/admin-guide/device-mapper/persistent-data.rst (Architecture ppc)


  1 ===============                                     1 ===============
  2 Persistent data                                     2 Persistent data
  3 ===============                                     3 ===============
  4                                                     4 
  5 Introduction                                        5 Introduction
  6 ============                                        6 ============
  7                                                     7 
  8 The more-sophisticated device-mapper targets r      8 The more-sophisticated device-mapper targets require complex metadata
  9 that is managed in kernel.  In late 2010 we we      9 that is managed in kernel.  In late 2010 we were seeing that various
 10 different targets were rolling their own data      10 different targets were rolling their own data structures, for example:
 11                                                    11 
 12 - Mikulas Patocka's multisnap implementation       12 - Mikulas Patocka's multisnap implementation
 13 - Heinz Mauelshagen's thin provisioning target     13 - Heinz Mauelshagen's thin provisioning target
 14 - Another btree-based caching target posted to     14 - Another btree-based caching target posted to dm-devel
 15 - Another multi-snapshot target based on a des     15 - Another multi-snapshot target based on a design of Daniel Phillips
 16                                                    16 
 17 Maintaining these data structures takes a lot      17 Maintaining these data structures takes a lot of work, so if possible
 18 we'd like to reduce the number.                    18 we'd like to reduce the number.
 19                                                    19 
 20 The persistent-data library is an attempt to p     20 The persistent-data library is an attempt to provide a re-usable
 21 framework for people who want to store metadat     21 framework for people who want to store metadata in device-mapper
 22 targets.  It's currently used by the thin-prov     22 targets.  It's currently used by the thin-provisioning target and an
 23 upcoming hierarchical storage target.              23 upcoming hierarchical storage target.
 24                                                    24 
 25 Overview                                           25 Overview
 26 ========                                           26 ========
 27                                                    27 
 28 The main documentation is in the header files      28 The main documentation is in the header files which can all be found
 29 under drivers/md/persistent-data.                  29 under drivers/md/persistent-data.
 30                                                    30 
 31 The block manager                                  31 The block manager
 32 -----------------                                  32 -----------------
 33                                                    33 
 34 dm-block-manager.[hc]                              34 dm-block-manager.[hc]
 35                                                    35 
 36 This provides access to the data on disk in fi     36 This provides access to the data on disk in fixed sized-blocks.  There
 37 is a read/write locking interface to prevent c     37 is a read/write locking interface to prevent concurrent accesses, and
 38 keep data that is being used in the cache.         38 keep data that is being used in the cache.
 39                                                    39 
 40 Clients of persistent-data are unlikely to use     40 Clients of persistent-data are unlikely to use this directly.
 41                                                    41 
 42 The transaction manager                            42 The transaction manager
 43 -----------------------                            43 -----------------------
 44                                                    44 
 45 dm-transaction-manager.[hc]                        45 dm-transaction-manager.[hc]
 46                                                    46 
 47 This restricts access to blocks and enforces c     47 This restricts access to blocks and enforces copy-on-write semantics.
 48 The only way you can get hold of a writable bl     48 The only way you can get hold of a writable block through the
 49 transaction manager is by shadowing an existin     49 transaction manager is by shadowing an existing block (ie. doing
 50 copy-on-write) or allocating a fresh one.  Sha     50 copy-on-write) or allocating a fresh one.  Shadowing is elided within
 51 the same transaction so performance is reasona     51 the same transaction so performance is reasonable.  The commit method
 52 ensures that all data is flushed before it wri     52 ensures that all data is flushed before it writes the superblock.
 53 On power failure your metadata will be as it w     53 On power failure your metadata will be as it was when last committed.
 54                                                    54 
 55 The Space Maps                                     55 The Space Maps
 56 --------------                                     56 --------------
 57                                                    57 
 58 dm-space-map.h                                     58 dm-space-map.h
 59 dm-space-map-metadata.[hc]                         59 dm-space-map-metadata.[hc]
 60 dm-space-map-disk.[hc]                             60 dm-space-map-disk.[hc]
 61                                                    61 
 62 On-disk data structures that keep track of ref     62 On-disk data structures that keep track of reference counts of blocks.
 63 Also acts as the allocator of new blocks.  Cur     63 Also acts as the allocator of new blocks.  Currently two
 64 implementations: a simpler one for managing bl     64 implementations: a simpler one for managing blocks on a different
 65 device (eg. thinly-provisioned data blocks); a     65 device (eg. thinly-provisioned data blocks); and one for managing
 66 the metadata space.  The latter is complicated     66 the metadata space.  The latter is complicated by the need to store
 67 its own data within the space it's managing.       67 its own data within the space it's managing.
 68                                                    68 
 69 The data structures                                69 The data structures
 70 -------------------                                70 -------------------
 71                                                    71 
 72 dm-btree.[hc]                                      72 dm-btree.[hc]
 73 dm-btree-remove.c                                  73 dm-btree-remove.c
 74 dm-btree-spine.c                                   74 dm-btree-spine.c
 75 dm-btree-internal.h                                75 dm-btree-internal.h
 76                                                    76 
 77 Currently there is only one data structure, a      77 Currently there is only one data structure, a hierarchical btree.
 78 There are plans to add more.  For example, som     78 There are plans to add more.  For example, something with an
 79 array-like interface would see a lot of use.       79 array-like interface would see a lot of use.
 80                                                    80 
 81 The btree is 'hierarchical' in that you can de     81 The btree is 'hierarchical' in that you can define it to be composed
 82 of nested btrees, and take multiple keys.  For     82 of nested btrees, and take multiple keys.  For example, the
 83 thin-provisioning target uses a btree with two     83 thin-provisioning target uses a btree with two levels of nesting.
 84 The first maps a device id to a mapping tree,      84 The first maps a device id to a mapping tree, and that in turn maps a
 85 virtual block to a physical block.                 85 virtual block to a physical block.
 86                                                    86 
 87 Values stored in the btrees can have arbitrary     87 Values stored in the btrees can have arbitrary size.  Keys are always
 88 64bits, although nesting allows you to use mul     88 64bits, although nesting allows you to use multiple keys.
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php