Print this page
NEX-3562 filename normalization doesn't work for removes (sync with upstream)
NEX-6088 ZFS scrub/resilver take excessively long due to issuing lots of random IO
Reviewed by: Roman Strashkin <roman.strashkin@nexenta.com>
Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
NEX-3329 libnsl: set_up_connection() over TCP does not adhere the specified timeout
Reviewed by: Dan Fields <dan.fields@nexenta.com>
NEX-3521 CLONE - Port NEX-3209 normalization=formD and casesensitivity=mixed behaves improperly, squashing case
Reviewed by: Jean McCormack <jean.mccormack@nexenta.com>
Reviewed by: Saso Kiselkov <saso.kiselkov@nexenta.com>
Reviewed by: Dan Fields <dan.fields@nexenta.com>
NEX-3591 SMB3 signing (hdrchk)
NEX-3719 CLONE - Port NEX-3517 Eliminate the unused MT_BEST code to simplify normalization & case.
Reviewed by: Jean McCormack <jean.mccormack@nexenta.com>
Reviewed by: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/uts/common/fs/zfs/sys/zap.h
+++ new/usr/src/uts/common/fs/zfs/sys/zap.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21
22 22 /*
23 23 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
24 24 * Copyright (c) 2012, 2016 by Delphix. All rights reserved.
25 25 * Copyright 2017 Nexenta Systems, Inc.
26 26 */
27 27
28 28 #ifndef _SYS_ZAP_H
29 29 #define _SYS_ZAP_H
30 30
31 31 /*
32 32 * ZAP - ZFS Attribute Processor
33 33 *
34 34 * The ZAP is a module which sits on top of the DMU (Data Management
35 35 * Unit) and implements a higher-level storage primitive using DMU
36 36 * objects. Its primary consumer is the ZPL (ZFS Posix Layer).
37 37 *
38 38 * A "zapobj" is a DMU object which the ZAP uses to stores attributes.
39 39 * Users should use only zap routines to access a zapobj - they should
40 40 * not access the DMU object directly using DMU routines.
41 41 *
42 42 * The attributes stored in a zapobj are name-value pairs. The name is
43 43 * a zero-terminated string of up to ZAP_MAXNAMELEN bytes (including
44 44 * terminating NULL). The value is an array of integers, which may be
45 45 * 1, 2, 4, or 8 bytes long. The total space used by the array (number
46 46 * of integers * integer length) can be up to ZAP_MAXVALUELEN bytes.
47 47 * Note that an 8-byte integer value can be used to store the location
48 48 * (object number) of another dmu object (which may be itself a zapobj).
49 49 * Note that you can use a zero-length attribute to store a single bit
50 50 * of information - the attribute is present or not.
51 51 *
52 52 * The ZAP routines are thread-safe. However, you must observe the
53 53 * DMU's restriction that a transaction may not be operated on
54 54 * concurrently.
55 55 *
56 56 * Any of the routines that return an int may return an I/O error (EIO
57 57 * or ECHECKSUM).
58 58 *
59 59 *
60 60 * Implementation / Performance Notes:
61 61 *
62 62 * The ZAP is intended to operate most efficiently on attributes with
63 63 * short (49 bytes or less) names and single 8-byte values, for which
64 64 * the microzap will be used. The ZAP should be efficient enough so
65 65 * that the user does not need to cache these attributes.
66 66 *
67 67 * The ZAP's locking scheme makes its routines thread-safe. Operations
68 68 * on different zapobjs will be processed concurrently. Operations on
69 69 * the same zapobj which only read data will be processed concurrently.
70 70 * Operations on the same zapobj which modify data will be processed
71 71 * concurrently when there are many attributes in the zapobj (because
72 72 * the ZAP uses per-block locking - more than 128 * (number of cpus)
73 73 * small attributes will suffice).
74 74 */
75 75
76 76 /*
77 77 * We're using zero-terminated byte strings (ie. ASCII or UTF-8 C
78 78 * strings) for the names of attributes, rather than a byte string
79 79 * bounded by an explicit length. If some day we want to support names
80 80 * in character sets which have embedded zeros (eg. UTF-16, UTF-32),
81 81 * we'll have to add routines for using length-bounded strings.
82 82 */
83 83
84 84 #include <sys/dmu.h>
85 85 #include <sys/refcount.h>
86 86
87 87 #ifdef __cplusplus
88 88 extern "C" {
89 89 #endif
90 90
91 91 /*
92 92 * Specifies matching criteria for ZAP lookups.
93 93 * MT_NORMALIZE Use ZAP normalization flags, which can include both
94 94 * unicode normalization and case-insensitivity.
95 95 * MT_MATCH_CASE Do case-sensitive lookups even if MT_NORMALIZE is
96 96 * specified and ZAP normalization flags include
97 97 * U8_TEXTPREP_TOUPPER.
98 98 */
99 99 typedef enum matchtype {
100 100 MT_NORMALIZE = 1 << 0,
101 101 MT_MATCH_CASE = 1 << 1,
102 102 } matchtype_t;
103 103
104 104 typedef enum zap_flags {
105 105 /* Use 64-bit hash value (serialized cursors will always use 64-bits) */
106 106 ZAP_FLAG_HASH64 = 1 << 0,
107 107 /* Key is binary, not string (zap_add_uint64() can be used) */
108 108 ZAP_FLAG_UINT64_KEY = 1 << 1,
109 109 /*
110 110 * First word of key (which must be an array of uint64) is
111 111 * already randomly distributed.
112 112 */
113 113 ZAP_FLAG_PRE_HASHED_KEY = 1 << 2,
114 114 } zap_flags_t;
115 115
116 116 /*
117 117 * Create a new zapobj with no attributes and return its object number.
118 118 */
119 119 uint64_t zap_create(objset_t *ds, dmu_object_type_t ot,
120 120 dmu_object_type_t bonustype, int bonuslen, dmu_tx_t *tx);
121 121 uint64_t zap_create_norm(objset_t *ds, int normflags, dmu_object_type_t ot,
122 122 dmu_object_type_t bonustype, int bonuslen, dmu_tx_t *tx);
123 123 uint64_t zap_create_flags(objset_t *os, int normflags, zap_flags_t flags,
124 124 dmu_object_type_t ot, int leaf_blockshift, int indirect_blockshift,
125 125 dmu_object_type_t bonustype, int bonuslen, dmu_tx_t *tx);
126 126 uint64_t zap_create_link(objset_t *os, dmu_object_type_t ot,
127 127 uint64_t parent_obj, const char *name, dmu_tx_t *tx);
128 128
129 129 /*
130 130 * Initialize an already-allocated object.
131 131 */
132 132 void mzap_create_impl(objset_t *os, uint64_t obj, int normflags,
133 133 zap_flags_t flags, dmu_tx_t *tx);
134 134
135 135 /*
136 136 * Create a new zapobj with no attributes from the given (unallocated)
137 137 * object number.
138 138 */
139 139 int zap_create_claim(objset_t *ds, uint64_t obj, dmu_object_type_t ot,
140 140 dmu_object_type_t bonustype, int bonuslen, dmu_tx_t *tx);
141 141 int zap_create_claim_norm(objset_t *ds, uint64_t obj,
142 142 int normflags, dmu_object_type_t ot,
143 143 dmu_object_type_t bonustype, int bonuslen, dmu_tx_t *tx);
144 144
145 145 /*
146 146 * The zapobj passed in must be a valid ZAP object for all of the
147 147 * following routines.
148 148 */
149 149
150 150 /*
151 151 * Destroy this zapobj and all its attributes.
152 152 *
153 153 * Frees the object number using dmu_object_free.
154 154 */
155 155 int zap_destroy(objset_t *ds, uint64_t zapobj, dmu_tx_t *tx);
156 156
157 157 /*
158 158 * Manipulate attributes.
159 159 *
160 160 * 'integer_size' is in bytes, and must be 1, 2, 4, or 8.
161 161 */
162 162
163 163 /*
164 164 * Retrieve the contents of the attribute with the given name.
165 165 *
166 166 * If the requested attribute does not exist, the call will fail and
167 167 * return ENOENT.
168 168 *
169 169 * If 'integer_size' is smaller than the attribute's integer size, the
170 170 * call will fail and return EINVAL.
171 171 *
172 172 * If 'integer_size' is equal to or larger than the attribute's integer
173 173 * size, the call will succeed and return 0.
174 174 *
175 175 * When converting to a larger integer size, the integers will be treated as
176 176 * unsigned (ie. no sign-extension will be performed).
177 177 *
178 178 * 'num_integers' is the length (in integers) of 'buf'.
179 179 *
180 180 * If the attribute is longer than the buffer, as many integers as will
181 181 * fit will be transferred to 'buf'. If the entire attribute was not
182 182 * transferred, the call will return EOVERFLOW.
183 183 */
184 184 int zap_lookup(objset_t *ds, uint64_t zapobj, const char *name,
185 185 uint64_t integer_size, uint64_t num_integers, void *buf);
186 186
187 187 /*
188 188 * If rn_len is nonzero, realname will be set to the name of the found
189 189 * entry (which may be different from the requested name if matchtype is
190 190 * not MT_EXACT).
191 191 *
192 192 * If normalization_conflictp is not NULL, it will be set if there is
193 193 * another name with the same case/unicode normalized form.
194 194 */
195 195 int zap_lookup_norm(objset_t *ds, uint64_t zapobj, const char *name,
196 196 uint64_t integer_size, uint64_t num_integers, void *buf,
197 197 matchtype_t mt, char *realname, int rn_len,
198 198 boolean_t *normalization_conflictp);
199 199 int zap_lookup_uint64(objset_t *os, uint64_t zapobj, const uint64_t *key,
200 200 int key_numints, uint64_t integer_size, uint64_t num_integers, void *buf);
|
↓ open down ↓ |
200 lines elided |
↑ open up ↑ |
201 201 int zap_contains(objset_t *ds, uint64_t zapobj, const char *name);
202 202 int zap_prefetch_uint64(objset_t *os, uint64_t zapobj, const uint64_t *key,
203 203 int key_numints);
204 204 int zap_lookup_by_dnode(dnode_t *dn, const char *name,
205 205 uint64_t integer_size, uint64_t num_integers, void *buf);
206 206 int zap_lookup_norm_by_dnode(dnode_t *dn, const char *name,
207 207 uint64_t integer_size, uint64_t num_integers, void *buf,
208 208 matchtype_t mt, char *realname, int rn_len,
209 209 boolean_t *ncp);
210 210
211 -int zap_count_write_by_dnode(dnode_t *dn, const char *name,
212 - int add, refcount_t *towrite, refcount_t *tooverwrite);
213 -
214 211 /*
215 212 * Create an attribute with the given name and value.
216 213 *
217 214 * If an attribute with the given name already exists, the call will
218 215 * fail and return EEXIST.
219 216 */
220 217 int zap_add(objset_t *ds, uint64_t zapobj, const char *key,
221 218 int integer_size, uint64_t num_integers,
222 219 const void *val, dmu_tx_t *tx);
223 220 int zap_add_by_dnode(dnode_t *dn, const char *key,
224 221 int integer_size, uint64_t num_integers,
225 222 const void *val, dmu_tx_t *tx);
226 223 int zap_add_uint64(objset_t *ds, uint64_t zapobj, const uint64_t *key,
227 224 int key_numints, int integer_size, uint64_t num_integers,
228 225 const void *val, dmu_tx_t *tx);
229 226
230 227 /*
231 228 * Set the attribute with the given name to the given value. If an
232 229 * attribute with the given name does not exist, it will be created. If
233 230 * an attribute with the given name already exists, the previous value
234 231 * will be overwritten. The integer_size may be different from the
235 232 * existing attribute's integer size, in which case the attribute's
236 233 * integer size will be updated to the new value.
237 234 */
238 235 int zap_update(objset_t *ds, uint64_t zapobj, const char *name,
239 236 int integer_size, uint64_t num_integers, const void *val, dmu_tx_t *tx);
240 237 int zap_update_uint64(objset_t *os, uint64_t zapobj, const uint64_t *key,
241 238 int key_numints,
242 239 int integer_size, uint64_t num_integers, const void *val, dmu_tx_t *tx);
243 240
244 241 /*
245 242 * Get the length (in integers) and the integer size of the specified
246 243 * attribute.
247 244 *
248 245 * If the requested attribute does not exist, the call will fail and
249 246 * return ENOENT.
250 247 */
251 248 int zap_length(objset_t *ds, uint64_t zapobj, const char *name,
252 249 uint64_t *integer_size, uint64_t *num_integers);
253 250 int zap_length_uint64(objset_t *os, uint64_t zapobj, const uint64_t *key,
254 251 int key_numints, uint64_t *integer_size, uint64_t *num_integers);
255 252
256 253 /*
257 254 * Remove the specified attribute.
258 255 *
259 256 * If the specified attribute does not exist, the call will fail and
260 257 * return ENOENT.
261 258 */
262 259 int zap_remove(objset_t *ds, uint64_t zapobj, const char *name, dmu_tx_t *tx);
263 260 int zap_remove_norm(objset_t *ds, uint64_t zapobj, const char *name,
264 261 matchtype_t mt, dmu_tx_t *tx);
265 262 int zap_remove_by_dnode(dnode_t *dn, const char *name, dmu_tx_t *tx);
266 263 int zap_remove_uint64(objset_t *os, uint64_t zapobj, const uint64_t *key,
267 264 int key_numints, dmu_tx_t *tx);
268 265
269 266 /*
270 267 * Returns (in *count) the number of attributes in the specified zap
271 268 * object.
272 269 */
273 270 int zap_count(objset_t *ds, uint64_t zapobj, uint64_t *count);
274 271
275 272 /*
276 273 * Returns (in name) the name of the entry whose (value & mask)
277 274 * (za_first_integer) is value, or ENOENT if not found. The string
278 275 * pointed to by name must be at least 256 bytes long. If mask==0, the
279 276 * match must be exact (ie, same as mask=-1ULL).
280 277 */
281 278 int zap_value_search(objset_t *os, uint64_t zapobj,
282 279 uint64_t value, uint64_t mask, char *name);
|
↓ open down ↓ |
59 lines elided |
↑ open up ↑ |
283 280
284 281 /*
285 282 * Transfer all the entries from fromobj into intoobj. Only works on
286 283 * int_size=8 num_integers=1 values. Fails if there are any duplicated
287 284 * entries.
288 285 */
289 286 int zap_join(objset_t *os, uint64_t fromobj, uint64_t intoobj, dmu_tx_t *tx);
290 287
291 288 /* Same as zap_join, but set the values to 'value'. */
292 289 int zap_join_key(objset_t *os, uint64_t fromobj, uint64_t intoobj,
293 - uint64_t value, dmu_tx_t *tx);
290 + uint64_t value, dmu_tx_t *tx, boolean_t exists_ok);
294 291
295 292 /* Same as zap_join, but add together any duplicated entries. */
296 293 int zap_join_increment(objset_t *os, uint64_t fromobj, uint64_t intoobj,
297 294 dmu_tx_t *tx);
298 295
299 296 /*
300 297 * Manipulate entries where the name + value are the "same" (the name is
301 298 * a stringified version of the value).
302 299 */
303 300 int zap_add_int(objset_t *os, uint64_t obj, uint64_t value, dmu_tx_t *tx);
304 301 int zap_remove_int(objset_t *os, uint64_t obj, uint64_t value, dmu_tx_t *tx);
305 302 int zap_lookup_int(objset_t *os, uint64_t obj, uint64_t value);
306 303 int zap_increment_int(objset_t *os, uint64_t obj, uint64_t key, int64_t delta,
307 304 dmu_tx_t *tx);
308 305
309 306 /* Here the key is an int and the value is a different int. */
310 307 int zap_add_int_key(objset_t *os, uint64_t obj,
311 308 uint64_t key, uint64_t value, dmu_tx_t *tx);
312 309 int zap_update_int_key(objset_t *os, uint64_t obj,
313 310 uint64_t key, uint64_t value, dmu_tx_t *tx);
314 311 int zap_lookup_int_key(objset_t *os, uint64_t obj,
315 312 uint64_t key, uint64_t *valuep);
316 313
317 314 int zap_increment(objset_t *os, uint64_t obj, const char *name, int64_t delta,
318 315 dmu_tx_t *tx);
319 316
320 317 struct zap;
321 318 struct zap_leaf;
322 319 typedef struct zap_cursor {
323 320 /* This structure is opaque! */
324 321 objset_t *zc_objset;
325 322 struct zap *zc_zap;
326 323 struct zap_leaf *zc_leaf;
327 324 uint64_t zc_zapobj;
328 325 uint64_t zc_serialized;
329 326 uint64_t zc_hash;
330 327 uint32_t zc_cd;
331 328 } zap_cursor_t;
332 329
333 330 typedef struct {
334 331 int za_integer_length;
335 332 /*
336 333 * za_normalization_conflict will be set if there are additional
337 334 * entries with this normalized form (eg, "foo" and "Foo").
338 335 */
339 336 boolean_t za_normalization_conflict;
340 337 uint64_t za_num_integers;
341 338 uint64_t za_first_integer; /* no sign extension for <8byte ints */
342 339 char za_name[ZAP_MAXNAMELEN];
343 340 } zap_attribute_t;
344 341
345 342 /*
346 343 * The interface for listing all the attributes of a zapobj can be
347 344 * thought of as cursor moving down a list of the attributes one by
348 345 * one. The cookie returned by the zap_cursor_serialize routine is
349 346 * persistent across system calls (and across reboot, even).
350 347 */
351 348
352 349 /*
353 350 * Initialize a zap cursor, pointing to the "first" attribute of the
354 351 * zapobj. You must _fini the cursor when you are done with it.
355 352 */
356 353 void zap_cursor_init(zap_cursor_t *zc, objset_t *ds, uint64_t zapobj);
357 354 void zap_cursor_fini(zap_cursor_t *zc);
358 355
359 356 /*
360 357 * Get the attribute currently pointed to by the cursor. Returns
361 358 * ENOENT if at the end of the attributes.
362 359 */
363 360 int zap_cursor_retrieve(zap_cursor_t *zc, zap_attribute_t *za);
364 361
365 362 /*
366 363 * Advance the cursor to the next attribute.
367 364 */
368 365 void zap_cursor_advance(zap_cursor_t *zc);
369 366
370 367 /*
371 368 * Get a persistent cookie pointing to the current position of the zap
372 369 * cursor. The low 4 bits in the cookie are always zero, and thus can
373 370 * be used as to differentiate a serialized cookie from a different type
374 371 * of value. The cookie will be less than 2^32 as long as there are
375 372 * fewer than 2^22 (4.2 million) entries in the zap object.
376 373 */
377 374 uint64_t zap_cursor_serialize(zap_cursor_t *zc);
378 375
379 376 /*
380 377 * Initialize a zap cursor pointing to the position recorded by
381 378 * zap_cursor_serialize (in the "serialized" argument). You can also
382 379 * use a "serialized" argument of 0 to start at the beginning of the
383 380 * zapobj (ie. zap_cursor_init_serialized(..., 0) is equivalent to
384 381 * zap_cursor_init(...).)
385 382 */
386 383 void zap_cursor_init_serialized(zap_cursor_t *zc, objset_t *ds,
387 384 uint64_t zapobj, uint64_t serialized);
388 385
389 386
390 387 #define ZAP_HISTOGRAM_SIZE 10
391 388
392 389 typedef struct zap_stats {
393 390 /*
394 391 * Size of the pointer table (in number of entries).
395 392 * This is always a power of 2, or zero if it's a microzap.
396 393 * In general, it should be considerably greater than zs_num_leafs.
397 394 */
398 395 uint64_t zs_ptrtbl_len;
399 396
400 397 uint64_t zs_blocksize; /* size of zap blocks */
401 398
402 399 /*
403 400 * The number of blocks used. Note that some blocks may be
404 401 * wasted because old ptrtbl's and large name/value blocks are
405 402 * not reused. (Although their space is reclaimed, we don't
406 403 * reuse those offsets in the object.)
407 404 */
408 405 uint64_t zs_num_blocks;
409 406
410 407 /*
411 408 * Pointer table values from zap_ptrtbl in the zap_phys_t
412 409 */
413 410 uint64_t zs_ptrtbl_nextblk; /* next (larger) copy start block */
414 411 uint64_t zs_ptrtbl_blks_copied; /* number source blocks copied */
415 412 uint64_t zs_ptrtbl_zt_blk; /* starting block number */
416 413 uint64_t zs_ptrtbl_zt_numblks; /* number of blocks */
417 414 uint64_t zs_ptrtbl_zt_shift; /* bits to index it */
418 415
419 416 /*
420 417 * Values of the other members of the zap_phys_t
421 418 */
422 419 uint64_t zs_block_type; /* ZBT_HEADER */
423 420 uint64_t zs_magic; /* ZAP_MAGIC */
424 421 uint64_t zs_num_leafs; /* The number of leaf blocks */
425 422 uint64_t zs_num_entries; /* The number of zap entries */
426 423 uint64_t zs_salt; /* salt to stir into hash function */
427 424
428 425 /*
429 426 * Histograms. For all histograms, the last index
430 427 * (ZAP_HISTOGRAM_SIZE-1) includes any values which are greater
431 428 * than what can be represented. For example
432 429 * zs_leafs_with_n5_entries[ZAP_HISTOGRAM_SIZE-1] is the number
433 430 * of leafs with more than 45 entries.
434 431 */
435 432
436 433 /*
437 434 * zs_leafs_with_n_pointers[n] is the number of leafs with
438 435 * 2^n pointers to it.
439 436 */
440 437 uint64_t zs_leafs_with_2n_pointers[ZAP_HISTOGRAM_SIZE];
441 438
442 439 /*
443 440 * zs_leafs_with_n_entries[n] is the number of leafs with
444 441 * [n*5, (n+1)*5) entries. In the current implementation, there
445 442 * can be at most 55 entries in any block, but there may be
446 443 * fewer if the name or value is large, or the block is not
447 444 * completely full.
448 445 */
449 446 uint64_t zs_blocks_with_n5_entries[ZAP_HISTOGRAM_SIZE];
450 447
451 448 /*
452 449 * zs_leafs_n_tenths_full[n] is the number of leafs whose
453 450 * fullness is in the range [n/10, (n+1)/10).
454 451 */
455 452 uint64_t zs_blocks_n_tenths_full[ZAP_HISTOGRAM_SIZE];
456 453
457 454 /*
458 455 * zs_entries_using_n_chunks[n] is the number of entries which
459 456 * consume n 24-byte chunks. (Note, large names/values only use
460 457 * one chunk, but contribute to zs_num_blocks_large.)
461 458 */
462 459 uint64_t zs_entries_using_n_chunks[ZAP_HISTOGRAM_SIZE];
463 460
464 461 /*
465 462 * zs_buckets_with_n_entries[n] is the number of buckets (each
466 463 * leaf has 64 buckets) with n entries.
467 464 * zs_buckets_with_n_entries[1] should be very close to
468 465 * zs_num_entries.
469 466 */
470 467 uint64_t zs_buckets_with_n_entries[ZAP_HISTOGRAM_SIZE];
471 468 } zap_stats_t;
472 469
473 470 /*
474 471 * Get statistics about a ZAP object. Note: you need to be aware of the
475 472 * internal implementation of the ZAP to correctly interpret some of the
476 473 * statistics. This interface shouldn't be relied on unless you really
477 474 * know what you're doing.
478 475 */
479 476 int zap_get_stats(objset_t *ds, uint64_t zapobj, zap_stats_t *zs);
480 477
481 478 #ifdef __cplusplus
482 479 }
483 480 #endif
484 481
485 482 #endif /* _SYS_ZAP_H */
|
↓ open down ↓ |
182 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX