File: 3.0-api-changes.xml

package info (click to toggle)
libblockdev 3.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,140 kB
  • sloc: ansic: 25,226; python: 11,877; makefile: 684; sh: 503; xml: 146
file content (192 lines) | stat: -rw-r--r-- 9,198 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<chapter id="30-api-changes">
  <title>API changes in libblockdev 3.0</title>

  <para>
  This is a list of API changes in libblockdev 3.0 with suggested replacements.
  </para>

  <simplesect><title>Library</title>
  <para>
    <literal>bd_switch_init_checks()</literal> has been removed. Checks for runtime dependencies during libblockdev initialization are now disabled and plugins will be loaded even if a runtime dependency is missing.
  </para>
  <para>
    <literal>bd_"plugin"_check_deps</literal> functions have been removed from all plugins. Use <literal>bd_"plugin"_is_tech_avail</literal> to check for plugin dependencies.
  </para>

  </simplesect>

  <simplesect><title>LVM plugin</title>

  <para>
    <literal>bd_lvm_data_lv_name()</literal> has been removed, use <literal>data_lv</literal> from <link linkend="BDLVMLVdata">BDLVMLVdata</link> instead.
  </para>

  <para>
    <literal>bd_lvm_metadadata_lv_name()</literal> has been removed, use <literal>metadata_lv</literal> from <link linkend="BDLVMLVdata">BDLVMLVdata</link> instead.
  </para>

  <para>
    <literal>BD_LVM_MAX_LV_SIZE</literal> constant has been removed, use <literal>bd_lvm_get_max_lv_size()</literal> instead.
  </para>

  <para>
    Multiple thinpool and cache metadata size related constants have been removed without replacement. We recommend using functions like <literal>bd_lvm_get_thpool_meta_size</literal> instead.
    Removed constants: <literal>BD_LVM_MIN_THPOOL_MD_SIZE</literal>, <literal>BD_LVM_MAX_THPOOL_MD_SIZE</literal>, <literal>BD_LVM_MIN_THPOOL_CHUNK_SIZE</literal>,
    <literal>BD_LVM_MIN_CACHE_MD_SIZE</literal>, <literal>BD_LVM_DEFAULT_CHUNK_SIZE</literal>, <literal>BD_LVM_MAX_PE_SIZE</literal>, <literal>BD_LVM_MIN_PE_SIZE</literal>,
    <literal>BD_LVM_DEFAULT_PE_START</literal> and <literal>BD_LVM_DEFAULT_PE_SIZE</literal>.
  </para>

  <para>
    <literal>bd_lvm_lvactivate()</literal> has a new parameter <literal>shared</literal>, use <literal>FALSE</literal> to preserve the original behaviour.
  </para>

  </simplesect>

  <simplesect><title>VDO plugin</title>
  <para>
    VDO plugin has been removed.
  </para>

  </simplesect>

  <simplesect><title>Crypto plugin</title>

  <para>
    <literal>bd_crypto_luks_uuid()</literal> has been removed, use <literal>uuid</literal> from <link linkend="BDCryptoLUKSInfo">BDCryptoLUKSInfo</link> instead.
  </para>

  <para>
    <literal>bd_crypto_luks_get_metadata_size()</literal> has been removed, use <literal>metadata_size</literal> from
    <link linkend="BDCryptoLUKSInfo">BDCryptoLUKSInfo</link> instead.
  </para>

  <para>
    LUKS2-specific functions were removed. The "generic" LUKS functions which now support both LUKSv1 and LUKSv2 should be used instead.
    Affected functions: <literal>bd_crypto_luks_format_luks2</literal> and <literal>bd_crypto_luks_resize_luks2</literal>.
  </para>

  <para>
    <literal>bd_crypto_luks_open_keyring</literal> has been removed, <literal>bd_crypto_luks_open</literal> with the keyring context (see below)
    can be used instead.
  </para>

  <para>
   <literal>bd_crypto_tc_open_full</literal> has been removed, <literal>bd_crypto_tc_open</literal> can be used instead.
   <literal>bd_crypto_tc_open</literal> arguments have been changed to match the "full" function.
  </para>

  <para>
    Functions that allowed using arbitrary binary data for passphrases were removed. The "generic" functions should be used instead,
    see the key slot context information below.

    Affected functions: <literal>bd_crypto_luks_format_blob</literal>, <literal>bd_crypto_luks_format_luks2_blob</literal>,
    <literal>bd_crypto_luks_open_blob</literal>, <literal>bd_crypto_luks_add_key_blob</literal>, <literal>bd_crypto_luks_remove_key_blob</literal>,
    <literal>bd_crypto_luks_change_key_blob</literal>, <literal></literal> and <literal>bd_crypto_luks_resume_blob</literal>.
  </para>

  <para>
    All functions that require some type of passphrase or key as an input now expect <literal>BDCryptoKeyslotContext</literal> instead.
    This is a private opaque context that needs to be set by one of the <literal>bd_crypto_keyslot_context_new_*</literal> functions
    based on the type of the context required.
  </para>
  </simplesect>

  <simplesect><title>NVDIMM plugin</title>
  <para>
    <literal>bd_nvdimm_namepace_get_supported_sector_sizes</literal> has been removed, use <literal>bd_nvdimm_namespace_get_supported_sector_sizes</literal> instead.
  </para>

  </simplesect>

  <simplesect><title>FS plugin</title>
  <para>
    <literal>bd_fs_clean</literal> and <literal>bd_fs_wipe</literal> have new parameter <literal>force</literal>
    that allows controlling whether the signatures will be removed from a mounted device or not. Use
    <literal>TRUE</literal> to preserve the original behaviour.
  </para>

  <para>
    Following functions have a new parameter <literal>fstype</literal> that allows to skip scanning the device
    for signature. Use <literal>NULL</literal> to preserve the original behaviour.
    Affected functions: <literal>bd_fs_resize</literal>, <literal>bd_fs_repair</literal>, <literal>bd_fs_check</literal>, <literal>bd_fs_set_label</literal>, <literal>bd_fs_set_uuid</literal>, <literal>bd_fs_get_size</literal> and <literal>bd_fs_get_free_space</literal>
  </para>

  <para>
    Type-specific <literal>bd_fs_..._wipe</literal> functions have been removed. Use <literal>bd_fs_wipe</literal> or <literal>bd_fs_clean</literal> instead.
    Affected functions: <literal>bd_fs_btrfs_wipe</literal>, <literal>bd_fs_ext2_wipe</literal>, <literal>bd_fs_ext3_wipe</literal>, <literal>bd_fs_ext4_wipe</literal>, <literal>bd_fs_exfat_wipe</literal>, <literal>bd_fs_f2fs_wipe</literal>, <literal>bd_fs_nilfs2_wipe</literal>, <literal>bd_fs_ntfs_wipe</literal>, <literal>bd_fs_vfat_wipe</literal>, <literal>bd_fs_udf_wipe</literal>, <literal>bd_fs_xfs_wipe</literal>
  </para>

  <para>
   <literal>bd_fs_ntfs_check</literal>, <literal>bd_fs_ntfs_repair</literal> and <literal>bd_fs_xfs_check</literal> have a new parameter <literal>extra</literal>
   that allows specifying extra options for the fsck tools. This makes the functionality consistent with the other filesystems.
  </para>

  <para>
   <literal>BDFsResizeFlags</literal> enum was renamed to <literal>BDFSResizeFlags</literal>.
  </para>

  <para>
   <literal>BDFsError</literal> enum was renamed to <literal>BDFSError</literal>.
  </para>

  </simplesect>

  <simplesect><title>Part plugin</title>

  <para>
    The part plugin has been rewritten to use libfdisk library instead of libparted. The following functions, enums and definitions related to partition and disk flags have been removed.
    <literal>bd_part_set_part_flag</literal>, <literal>bd_part_get_flag_str</literal>, <literal>bd_part_set_disk_flag</literal>, <literal>bd_part_set_part_flags</literal>, <literal>BDPartFlag</literal> and <literal>BDPartDiskFlag</literal>.
  </para>
    We recommend using the <literal>bd_part_set_part_type</literal> and <literal> bd_part_set_part_id</literal> functions to set partition GUID (GPT) or ID (MSDOS) to set the required type/id instead.
  <para>
    New functions <literal>bd_part_set_part_bootable</literal> and <literal>bd_part_set_part_attributes</literal> have been added to allow controlling the bootable flag (MSDOS) and partition attributes (GPT).
  </para>

  <para>
    The <literal>bd_part_get_part_id</literal> function has been removed. The partition id parameter is now available in <literal>BDPartSpec</literal>.
  </para>

  </simplesect>

    <simplesect><title>KBD plugin</title>
  <para>
    KBD plugin (providing support for bcache and zRAM devices) has been removed.
  </para>

  </simplesect>

  <simplesect><title>Loop plugin</title>
  <para>
    <literal>bd_loop_setup</literal> and <literal>bd_loop_setup_from_fd</literal> has a new parameter <literal>sector_size</literal>.
    Use <literal>0</literal> to preserve the original behaviour.
  </para>

  <para>
    <literal>bd_loop_get_backing_file</literal> and <literal>bd_loop_get_autoclear</literal> have been removed. Use <literal>bd_loop_info</literal> instead.
  </para>

  </simplesect>

  <simplesect><title>DM plugin</title>
  <para>
    Support for DM RAID (<literal>BD_DM_TECH_RAID</literal> technology) was removed from the plugin. Following functions were removed without replacement: <literal>bd_dm_get_member_raid_sets</literal>, <literal>bd_dm_activate_raid_set</literal>, <literal>bd_dm_deactivate_raid_set</literal> and <literal>bd_dm_get_raid_set_type</literal>.
  </para>

  </simplesect>

  <simplesect><title>MDRAID plugin</title>
  <para>
    The <literal>bitmap</literal> argument of the <literal>bd_md_create</literal> function now accepts arbitrary string instead of a boolean value.
    Previous value of <literal>FALSE</literal> is now represented by <literal>NULL</literal>, i.e. letting <literal>mdadm</literal> decide itself whether to create an internal bitmap or not.
  </para>

  </simplesect>

  <simplesect><title>Swap plugin</title>
  <para>
    <literal>bd_swap_mkswap</literal> has a new optional parameter <literal>uuid</literal>.
  </para>

  </simplesect>

</chapter>