glusterfs

Форк
0
/
glusterd-volume-set.c 
3095 строк · 99.0 Кб
1
/*
2
Copyright (c) 2013 Red Hat, Inc. <http://www.redhat.com>
3
This file is part of GlusterFS.
4

5
This file is licensed to you under your choice of the GNU Lesser
6
General Public License, version 3 or any later version (LGPLv3 or
7
later), or the GNU General Public License, version 2 (GPLv2), in all
8
cases as published by the Free Software Foundation.
9
*/
10

11
#include <glusterfs/syscall.h>
12
#include "glusterd.h"
13
#include "glusterd-volgen.h"
14
#include "glusterd-utils.h"
15

16
static int
17
validate_cache_max_min_size(glusterd_volinfo_t *volinfo, dict_t *dict,
18
                            char *key, char *value, char **op_errstr)
19
{
20
    char *current_max_value = NULL;
21
    char *current_min_value = NULL;
22
    char errstr[2048] = "";
23
    glusterd_conf_t *priv = NULL;
24
    int ret = 0;
25
    uint64_t max_value = 0;
26
    uint64_t min_value = 0;
27
    xlator_t *this = THIS;
28

29
    priv = this->private;
30
    GF_ASSERT(priv);
31

32
    if ((!strcmp(key, "performance.cache-min-file-size")) ||
33
        (!strcmp(key, "cache-min-file-size"))) {
34
        glusterd_volinfo_get(volinfo, "performance.cache-max-file-size",
35
                             &current_max_value);
36
        if (current_max_value) {
37
            gf_string2bytesize_uint64(current_max_value, &max_value);
38
            gf_string2bytesize_uint64(value, &min_value);
39
            current_min_value = value;
40
        }
41
    } else if ((!strcmp(key, "performance.cache-max-file-size")) ||
42
               (!strcmp(key, "cache-max-file-size"))) {
43
        glusterd_volinfo_get(volinfo, "performance.cache-min-file-size",
44
                             &current_min_value);
45
        if (current_min_value) {
46
            gf_string2bytesize_uint64(current_min_value, &min_value);
47
            gf_string2bytesize_uint64(value, &max_value);
48
            current_max_value = value;
49
        }
50
    }
51

52
    if (min_value > max_value) {
53
        snprintf(errstr, sizeof(errstr),
54
                 "cache-min-file-size (%s) is greater than "
55
                 "cache-max-file-size (%s)",
56
                 current_min_value, current_max_value);
57
        gf_msg(this->name, GF_LOG_ERROR, 0, GD_MSG_CACHE_MINMAX_SIZE_INVALID,
58
               "%s", errstr);
59
        *op_errstr = gf_strdup(errstr);
60
        ret = -1;
61
        goto out;
62
    }
63

64
out:
65
    gf_msg_debug(this->name, 0, "Returning %d", ret);
66

67
    return ret;
68
}
69

70
static int
71
validate_defrag_throttle_option(glusterd_volinfo_t *volinfo, dict_t *dict,
72
                                char *key, char *value, char **op_errstr)
73
{
74
    int ret = 0;
75

76
    if (gf_rebalance_thread_count(value, op_errstr) < 1) {
77
        gf_msg(THIS->name, GF_LOG_ERROR, EINVAL, GD_MSG_INVALID_ENTRY, "%s",
78
               *op_errstr ? *op_errstr : "<out of memory>");
79
        ret = -1;
80
    }
81
    return ret;
82
}
83

84
static int
85
validate_quota(glusterd_volinfo_t *volinfo, dict_t *dict, char *key,
86
               char *value, char **op_errstr)
87
{
88
    char errstr[2048] = "";
89
    glusterd_conf_t *priv = NULL;
90
    int ret = 0;
91
    xlator_t *this = THIS;
92

93
    priv = this->private;
94
    GF_ASSERT(priv);
95

96
    ret = glusterd_volinfo_get_boolean(volinfo, VKEY_FEATURES_QUOTA);
97
    if (ret == -1) {
98
        gf_msg(this->name, GF_LOG_ERROR, 0, GD_MSG_QUOTA_GET_STAT_FAIL,
99
               "failed to get the quota status");
100
        goto out;
101
    }
102

103
    if (ret == _gf_false) {
104
        snprintf(errstr, sizeof(errstr), "Cannot set %s. Enable quota first.",
105
                 key);
106
        gf_msg(this->name, GF_LOG_ERROR, 0, GD_MSG_QUOTA_DISABLED, "%s",
107
               errstr);
108
        *op_errstr = gf_strdup(errstr);
109
        ret = -1;
110
        goto out;
111
    }
112

113
    ret = 0;
114
out:
115
    gf_msg_debug(this->name, 0, "Returning %d", ret);
116

117
    return ret;
118
}
119

120
static int
121
validate_uss(glusterd_volinfo_t *volinfo, dict_t *dict, char *key, char *value,
122
             char **op_errstr)
123
{
124
    char errstr[2048] = "";
125
    int ret = 0;
126
    xlator_t *this = THIS;
127
    gf_boolean_t b = _gf_false;
128

129
    ret = gf_string2boolean(value, &b);
130
    if (ret) {
131
        snprintf(errstr, sizeof(errstr),
132
                 "%s is not a valid boolean "
133
                 "value. %s expects a valid boolean value.",
134
                 value, key);
135
        gf_msg(this->name, GF_LOG_ERROR, 0, GD_MSG_INVALID_ENTRY, "%s", errstr);
136
        *op_errstr = gf_strdup(errstr);
137
        goto out;
138
    }
139
out:
140
    gf_msg_debug(this->name, 0, "Returning %d", ret);
141

142
    return ret;
143
}
144

145
static int
146
validate_uss_dir(glusterd_volinfo_t *volinfo, dict_t *dict, char *key,
147
                 char *value, char **op_errstr)
148
{
149
    char errstr[2048] = "";
150
    int ret = -1;
151
    int i = 0;
152
    xlator_t *this = THIS;
153

154
    i = strlen(value);
155
    if (i > NAME_MAX) {
156
        snprintf(errstr, sizeof(errstr),
157
                 "value of %s exceedes %d "
158
                 "characters",
159
                 key, NAME_MAX);
160
        goto out;
161
    } else if (i < 2) {
162
        snprintf(errstr, sizeof(errstr),
163
                 "value of %s too short, "
164
                 "expects at least two characters",
165
                 key);
166
        goto out;
167
    }
168

169
    if (value[0] != '.') {
170
        snprintf(errstr, sizeof(errstr),
171
                 "%s expects value starting "
172
                 "with '.' ",
173
                 key);
174
        goto out;
175
    }
176

177
    for (i = 1; value[i]; i++) {
178
        if (isalnum(value[i]) || value[i] == '_' || value[i] == '-')
179
            continue;
180

181
        snprintf(errstr, sizeof(errstr),
182
                 "%s expects value to"
183
                 " contain only '0-9a-z-_'",
184
                 key);
185
        goto out;
186
    }
187

188
    ret = 0;
189
out:
190
    if (ret) {
191
        gf_msg(this->name, GF_LOG_ERROR, EINVAL, GD_MSG_INVALID_ENTRY, "%s",
192
               errstr);
193
        *op_errstr = gf_strdup(errstr);
194
    }
195

196
    gf_msg_debug(this->name, 0, "Returning %d", ret);
197

198
    return ret;
199
}
200

201
static int
202
validate_server_options(glusterd_volinfo_t *volinfo, dict_t *dict, char *key,
203
                        char *value, char **op_errstr)
204
{
205
    char errstr[2048] = "";
206
    xlator_t *this = THIS;
207
    int ret = -1;
208
    int origin_val = 0;
209

210
    if (volinfo->status == GLUSTERD_STATUS_STARTED) {
211
        gf_msg(this->name, GF_LOG_INFO, 0, GD_MSG_VOL_SET_VALIDATION_INFO,
212
               "Please note that "
213
               "volume %s is started. This option will only get "
214
               "effected after a brick restart.",
215
               volinfo->volname);
216
    }
217

218
    ret = gf_string2int(value, &origin_val);
219
    if (ret) {
220
        snprintf(errstr, sizeof(errstr),
221
                 "%s is not a compatible "
222
                 "value. %s expects an integer value.",
223
                 value, key);
224
        ret = -1;
225
        goto out;
226
    }
227

228
    if (origin_val < 0) {
229
        snprintf(errstr, sizeof(errstr),
230
                 "%s is not a "
231
                 "compatible value. %s expects a positive"
232
                 "integer value.",
233
                 value, key);
234
        ret = -1;
235
        goto out;
236
    }
237

238
    ret = 0;
239
out:
240
    if (ret) {
241
        gf_msg(this->name, GF_LOG_ERROR, EINVAL, GD_MSG_INCOMPATIBLE_VALUE,
242
               "%s", errstr);
243
        *op_errstr = gf_strdup(errstr);
244
    }
245

246
    return ret;
247
}
248

249
static int
250
validate_disperse(glusterd_volinfo_t *volinfo, dict_t *dict, char *key,
251
                  char *value, char **op_errstr)
252
{
253
    char errstr[2048] = "";
254
    int ret = -1;
255

256
    if (volinfo->type != GF_CLUSTER_TYPE_DISPERSE) {
257
        snprintf(errstr, sizeof(errstr),
258
                 "Cannot set %s for a non-disperse volume.", key);
259
        gf_msg(THIS->name, GF_LOG_ERROR, 0, GD_MSG_VOL_NOT_DISPERSE, "%s",
260
               errstr);
261
        *op_errstr = gf_strdup(errstr);
262
        ret = -1;
263
        goto out;
264
    }
265
    ret = 0;
266

267
out:
268
    gf_msg_debug("glusterd", 0, "Returning %d", ret);
269

270
    return ret;
271
}
272

273
static int
274
validate_replica(glusterd_volinfo_t *volinfo, dict_t *dict, char *key,
275
                 char *value, char **op_errstr)
276
{
277
    char errstr[2048] = "";
278
    int ret = 0;
279
    xlator_t *this = THIS;
280

281
    if (volinfo->replica_count == 1) {
282
        snprintf(errstr, sizeof(errstr),
283
                 "Cannot set %s for a non-replicate volume.", key);
284
        gf_msg(this->name, GF_LOG_ERROR, 0, GD_MSG_VOL_NOT_REPLICA, "%s",
285
               errstr);
286
        *op_errstr = gf_strdup(errstr);
287
        ret = -1;
288
        goto out;
289
    }
290

291
out:
292
    gf_msg_debug(this->name, 0, "Returning %d", ret);
293

294
    return ret;
295
}
296

297
static int
298
validate_quorum_count(glusterd_volinfo_t *volinfo, dict_t *dict, char *key,
299
                      char *value, char **op_errstr)
300
{
301
    int ret = 0;
302
    xlator_t *this = THIS;
303
    int q_count = 0;
304

305
    ret = gf_string2int(value, &q_count);
306
    if (ret) {
307
        gf_asprintf(op_errstr,
308
                    "%s is not an integer. %s expects a "
309
                    "valid integer value.",
310
                    value, key);
311
        goto out;
312
    }
313

314
    if (q_count < 1 || q_count > volinfo->replica_count) {
315
        gf_asprintf(op_errstr, "%d in %s %d is out of range [1 - %d]", q_count,
316
                    key, q_count, volinfo->replica_count);
317
        ret = -1;
318
    }
319

320
out:
321
    if (ret) {
322
        gf_msg(this->name, GF_LOG_ERROR, 0, GD_MSG_INVALID_ENTRY, "%s",
323
               *op_errstr);
324
    }
325
    gf_msg_debug(this->name, 0, "Returning %d", ret);
326

327
    return ret;
328
}
329

330
static int
331
validate_subvols_per_directory(glusterd_volinfo_t *volinfo, dict_t *dict,
332
                               char *key, char *value, char **op_errstr)
333
{
334
    char errstr[2048] = "";
335
    glusterd_conf_t *priv = NULL;
336
    int ret = 0;
337
    int subvols = 0;
338
    xlator_t *this = THIS;
339

340
    priv = this->private;
341
    GF_ASSERT(priv);
342

343
    subvols = atoi(value);
344

345
    /* Checking if the subvols-per-directory exceed the total
346
       number of subvolumes. */
347
    if (subvols > volinfo->subvol_count) {
348
        snprintf(errstr, sizeof(errstr),
349
                 "subvols-per-directory(%d) is greater "
350
                 "than the number of subvolumes(%d).",
351
                 subvols, volinfo->subvol_count);
352
        gf_msg(this->name, GF_LOG_ERROR, 0, GD_MSG_SUBVOLUMES_EXCEED, "%s.",
353
               errstr);
354
        *op_errstr = gf_strdup(errstr);
355
        ret = -1;
356
        goto out;
357
    }
358

359
out:
360
    gf_msg_debug(this->name, 0, "Returning %d", ret);
361

362
    return ret;
363
}
364

365
static int
366
validate_replica_heal_enable_disable(glusterd_volinfo_t *volinfo, dict_t *dict,
367
                                     char *key, char *value, char **op_errstr)
368
{
369
    int ret = 0;
370

371
    if (!glusterd_is_volume_replicate(volinfo)) {
372
        gf_asprintf(op_errstr, "Volume %s is not of replicate type",
373
                    volinfo->volname);
374
        ret = -1;
375
    }
376

377
    return ret;
378
}
379

380
static int
381
validate_mandatory_locking(glusterd_volinfo_t *volinfo, dict_t *dict, char *key,
382
                           char *value, char **op_errstr)
383
{
384
    char errstr[2048] = "";
385
    int ret = 0;
386
    xlator_t *this = THIS;
387

388
    if (strcmp(value, "off") != 0 && strcmp(value, "file") != 0 &&
389
        strcmp(value, "forced") != 0 && strcmp(value, "optimal") != 0) {
390
        snprintf(errstr, sizeof(errstr),
391
                 "Invalid option value '%s':"
392
                 " Available options are 'off', 'file', "
393
                 "'forced' or 'optimal'",
394
                 value);
395
        gf_msg(this->name, GF_LOG_ERROR, 0, GD_MSG_INVALID_ENTRY, "%s", errstr);
396
        *op_errstr = gf_strdup(errstr);
397
        ret = -1;
398
        goto out;
399
    }
400
out:
401
    gf_msg_debug(this->name, 0, "Returning %d", ret);
402

403
    return ret;
404
}
405

406
static int
407
validate_disperse_heal_enable_disable(glusterd_volinfo_t *volinfo, dict_t *dict,
408
                                      char *key, char *value, char **op_errstr)
409
{
410
    int ret = 0;
411

412
    if (volinfo->type != GF_CLUSTER_TYPE_DISPERSE) {
413
        gf_asprintf(op_errstr, "Volume %s is not of disperse type",
414
                    volinfo->volname);
415
        ret = -1;
416
    }
417

418
    return ret;
419
}
420

421
static int
422
validate_lock_migration_option(glusterd_volinfo_t *volinfo, dict_t *dict,
423
                               char *key, char *value, char **op_errstr)
424
{
425
    char errstr[2048] = "";
426
    int ret = 0;
427
    xlator_t *this = THIS;
428
    gf_boolean_t b = _gf_false;
429

430
    if (volinfo->replica_count > 1 || volinfo->disperse_count) {
431
        snprintf(errstr, sizeof(errstr),
432
                 "Lock migration is "
433
                 "a experimental feature. Currently works with"
434
                 " pure distribute volume only");
435
        ret = -1;
436

437
        gf_msg(this->name, GF_LOG_ERROR, EINVAL, GD_MSG_INVALID_ENTRY, "%s",
438
               errstr);
439

440
        *op_errstr = gf_strdup(errstr);
441
        goto out;
442
    }
443

444
    ret = gf_string2boolean(value, &b);
445
    if (ret) {
446
        snprintf(errstr, sizeof(errstr),
447
                 "Invalid value"
448
                 " for volume set command. Use on/off only.");
449
        ret = -1;
450

451
        gf_msg(this->name, GF_LOG_ERROR, EINVAL, GD_MSG_INVALID_ENTRY, "%s",
452
               errstr);
453

454
        *op_errstr = gf_strdup(errstr);
455

456
        goto out;
457
    }
458

459
    gf_msg_debug(this->name, 0, "Returning %d", ret);
460

461
out:
462
    return ret;
463
}
464

465
static int
466
validate_mux_limit(glusterd_volinfo_t *volinfo, dict_t *dict, char *key,
467
                   char *value, char **op_errstr)
468
{
469
    uint val = 0;
470
    int ret = -1;
471

472
    if (!is_brick_mx_enabled()) {
473
        gf_asprintf(op_errstr,
474
                    "Brick-multiplexing is not enabled. "
475
                    "Please enable brick multiplexing before trying "
476
                    "to set this option.");
477
        gf_msg(THIS->name, GF_LOG_ERROR, 0, GD_MSG_WRONG_OPTS_SETTING, "%s",
478
               *op_errstr);
479
        goto out;
480
    }
481

482
    ret = gf_string2uint(value, &val);
483
    if (ret) {
484
        gf_asprintf(op_errstr,
485
                    "%s is not a valid count. "
486
                    "%s expects an unsigned integer.",
487
                    value, key);
488
        gf_msg(THIS->name, GF_LOG_ERROR, 0, GD_MSG_INVALID_ENTRY, "%s",
489
               *op_errstr);
490
    }
491

492
    if (val == 1) {
493
        gf_asprintf(op_errstr,
494
                    "Brick-multiplexing is enabled. "
495
                    "Please set this option to a value other than 1 "
496
                    "to make use of the brick-multiplexing feature.");
497
        ret = -1;
498
        goto out;
499
    }
500
out:
501
    gf_msg_debug("glusterd", 0, "Returning %d", ret);
502

503
    return ret;
504
}
505

506
static int
507
validate_volume_per_thread_limit(glusterd_volinfo_t *volinfo, dict_t *dict,
508
                                 char *key, char *value, char **op_errstr)
509
{
510
    uint val = 0;
511
    int ret = -1;
512

513
    if (!is_brick_mx_enabled()) {
514
        gf_asprintf(op_errstr,
515
                    "Brick-multiplexing is not enabled. "
516
                    "Please enable brick multiplexing before trying "
517
                    "to set this option.");
518
        gf_msg(THIS->name, GF_LOG_ERROR, 0, GD_MSG_WRONG_OPTS_SETTING, "%s",
519
               *op_errstr);
520
        goto out;
521
    }
522

523
    ret = gf_string2uint(value, &val);
524
    if (ret) {
525
        gf_asprintf(op_errstr,
526
                    "%s is not a valid count. "
527
                    "%s expects an unsigned integer.",
528
                    value, key);
529
        gf_msg(THIS->name, GF_LOG_ERROR, 0, GD_MSG_INVALID_ENTRY, "%s",
530
               *op_errstr);
531
    }
532

533
    if ((val < 5) || (val > 200)) {
534
        gf_asprintf(
535
            op_errstr,
536
            "Please set this option to a value between 5 and 200 to"
537
            "optimize processing large numbers of volumes in parallel.");
538
        ret = -1;
539
        goto out;
540
    }
541
out:
542
    gf_msg_debug("glusterd", 0, "Returning %d", ret);
543

544
    return ret;
545
}
546

547
static int
548
validate_boolean(glusterd_volinfo_t *volinfo, dict_t *dict, char *key,
549
                 char *value, char **op_errstr)
550
{
551
    gf_boolean_t b = _gf_false;
552
    int ret = -1;
553

554
    ret = gf_string2boolean(value, &b);
555
    if (ret) {
556
        gf_asprintf(op_errstr,
557
                    "%s is not a valid boolean value. %s "
558
                    "expects a valid boolean value.",
559
                    value, key);
560
        gf_msg(THIS->name, GF_LOG_ERROR, 0, GD_MSG_INVALID_ENTRY, "%s",
561
               *op_errstr);
562
    }
563
    gf_msg_debug("glusterd", 0, "Returning %d", ret);
564

565
    return ret;
566
}
567

568
static int
569
validate_disperse_quorum_count(glusterd_volinfo_t *volinfo, dict_t *dict,
570
                               char *key, char *value, char **op_errstr)
571
{
572
    int ret = -1;
573
    int quorum_count = 0;
574
    int data_count = 0;
575

576
    ret = gf_string2int(value, &quorum_count);
577
    if (ret) {
578
        gf_asprintf(op_errstr,
579
                    "%s is not an integer. %s expects a "
580
                    "valid integer value.",
581
                    value, key);
582
        goto out;
583
    }
584

585
    if (volinfo->type != GF_CLUSTER_TYPE_DISPERSE) {
586
        gf_asprintf(op_errstr, "Cannot set %s for a non-disperse volume.", key);
587
        ret = -1;
588
        goto out;
589
    }
590

591
    data_count = volinfo->disperse_count - volinfo->redundancy_count;
592
    if (quorum_count < data_count || quorum_count > volinfo->disperse_count) {
593
        gf_asprintf(op_errstr, "%d for %s is out of range [%d - %d]",
594
                    quorum_count, key, data_count, volinfo->disperse_count);
595
        ret = -1;
596
        goto out;
597
    }
598

599
    ret = 0;
600
out:
601
    return ret;
602
}
603

604
static int
605
validate_parallel_readdir(glusterd_volinfo_t *volinfo, dict_t *dict, char *key,
606
                          char *value, char **op_errstr)
607
{
608
    int ret = -1;
609

610
    ret = validate_boolean(volinfo, dict, key, value, op_errstr);
611
    if (ret)
612
        goto out;
613

614
    ret = glusterd_is_defrag_on(volinfo);
615
    if (ret) {
616
        gf_asprintf(op_errstr,
617
                    "%s option should be set "
618
                    "after rebalance is complete",
619
                    key);
620
        gf_msg("glusterd", GF_LOG_ERROR, 0, GD_MSG_INVALID_ENTRY, "%s",
621
               *op_errstr);
622
    }
623
out:
624
    gf_msg_debug("glusterd", 0, "Returning %d", ret);
625

626
    return ret;
627
}
628

629
static int
630
validate_rda_cache_limit(glusterd_volinfo_t *volinfo, dict_t *dict, char *key,
631
                         char *value, char **op_errstr)
632
{
633
    int ret = 0;
634
    uint64_t rda_cache_size = 0;
635

636
    ret = gf_string2bytesize_uint64(value, &rda_cache_size);
637
    if (ret < 0)
638
        goto out;
639

640
    if (rda_cache_size <= (1 * GF_UNIT_GB))
641
        goto out;
642

643
    /* With release 3.11 the max value of rda_cache_limit is changed from
644
     * 1GB to INFINITY. If there are clients older than 3.11 and the value
645
     * of rda-cache-limit is set to > 1GB, the older clients will stop
646
     * working. Hence if a user is setting rda-cache-limit to > 1GB
647
     * ensure that all the clients are 3.11 or greater.
648
     */
649
    ret = glusterd_check_client_op_version_support(
650
        volinfo->volname, GD_OP_VERSION_3_11_0, op_errstr);
651
out:
652
    gf_msg_debug("glusterd", 0, "Returning %d", ret);
653

654
    return ret;
655
}
656

657
static int
658
validate_worm_period(glusterd_volinfo_t *volinfo, dict_t *dict, char *key,
659
                     char *value, char **op_errstr)
660
{
661
    uint64_t period = -1;
662
    int ret = -1;
663

664
    ret = gf_string2uint64(value, &period);
665
    if (ret) {
666
        gf_asprintf(op_errstr,
667
                    "%s is not a valid uint64_t value."
668
                    " %s expects a valid uint64_t value.",
669
                    value, key);
670
        gf_msg(THIS->name, GF_LOG_ERROR, 0, GD_MSG_INVALID_ENTRY, "%s",
671
               *op_errstr);
672
    }
673
    gf_msg_debug("glusterd", 0, "Returning %d", ret);
674

675
    return ret;
676
}
677

678
static int
679
validate_reten_mode(glusterd_volinfo_t *volinfo, dict_t *dict, char *key,
680
                    char *value, char **op_errstr)
681
{
682
    int ret = -1;
683

684
    if ((strcmp(value, "relax") && strcmp(value, "enterprise"))) {
685
        gf_asprintf(op_errstr,
686
                    "The value of retention mode should be "
687
                    "either relax or enterprise. But the value"
688
                    " of %s is %s",
689
                    key, value);
690
        gf_msg(THIS->name, GF_LOG_ERROR, 0, GD_MSG_INVALID_ENTRY, "%s",
691
               *op_errstr);
692
        ret = -1;
693
        goto out;
694
    }
695
    ret = 0;
696
out:
697
    gf_msg_debug("glusterd", 0, "Returning %d", ret);
698

699
    return ret;
700
}
701
static int
702
is_directory(const char *path)
703
{
704
    struct stat statbuf;
705
    if (sys_stat(path, &statbuf) != 0)
706
        return 0;
707
    return S_ISDIR(statbuf.st_mode);
708
}
709
static int
710
validate_statedump_path(glusterd_volinfo_t *volinfo, dict_t *dict, char *key,
711
                        char *value, char **op_errstr)
712
{
713
    int ret = 0;
714
    if (!is_directory(value)) {
715
        gf_asprintf(op_errstr, "Failed: %s is not a directory", value);
716
        ret = -1;
717
        gf_msg(THIS->name, GF_LOG_ERROR, 0, GD_MSG_INVALID_ENTRY, "%s",
718
               *op_errstr);
719
    }
720

721
    return ret;
722
}
723

724
/* dispatch table for VOLUME SET
725
 * -----------------------------
726
 *
727
 * Format of entries:
728
 *
729
 * First field is the <key>, for the purpose of looking it up
730
 * in volume dictionary. Each <key> is of the format "<domain>.<specifier>".
731
 *
732
 * Second field is <voltype>.
733
 *
734
 * Third field is <option>, if its unset, it's assumed to be
735
 * the same as <specifier>.
736
 *
737
 * Fourth field is <value>. In this context they are used to specify
738
 * a default. That is, even the volume dict doesn't have a value,
739
 * we procced as if the default value were set for it.
740
 *
741
 * Fifth field is <doctype>, which decides if the option is public and available
742
 * in "set help" or not. "NO_DOC" entries are not part of the public interface
743
 * and are subject to change at any time. This also decides if an option is
744
 * global (applies to all volumes) or normal (applies to only specified volume).
745
 *
746
 * Sixth field is <flags>.
747
 *
748
 * Seventh field is <op-version>.
749
 *
750
 * Eight field is description of option: If NULL, tried to fetch from
751
 * translator code's xlator_options table.
752
 *
753
 * Ninth field is validation function: If NULL, xlator's option specific
754
 * validation will be tried, otherwise tried at glusterd code itself.
755
 *
756
 * There are two type of entries: basic and special.
757
 *
758
 * - Basic entries are the ones where the <option> does _not_ start with
759
 *   the bang! character ('!').
760
 *
761
 *   In their case, <option> is understood as an option for an xlator of
762
 *   type <voltype>. Their effect is to copy over the volinfo->dict[<key>]
763
 *   value to all graph nodes of type <voltype> (if such a value is set).
764
 *
765
 *   You are free to add entries of this type, they will become functional
766
 *   just by being present in the table.
767
 *
768
 * - Special entries where the <option> starts with the bang!.
769
 *
770
 *   They are not applied to all graphs during generation, and you cannot
771
 *   extend them in a trivial way which could be just picked up. Better
772
 *   not touch them unless you know what you do.
773
 *
774
 *
775
 * Another kind of grouping for options, according to visibility:
776
 *
777
 * - Exported: one which is used in the code. These are characterized by
778
 *   being used a macro as <key> (of the format VKEY_..., defined in
779
 *   glusterd-volgen.h
780
 *
781
 * - Non-exported: the rest; these have string literal <keys>.
782
 *
783
 * Adhering to this policy, option name changes shall be one-liners.
784
 *
785
 */
786

787
struct volopt_map_entry glusterd_volopt_map[] = {
788
    /* DHT xlator options */
789
    {.key = "cluster.lookup-unhashed",
790
     .voltype = "cluster/distribute",
791
     .op_version = 1,
792
     .flags = VOLOPT_FLAG_CLIENT_OPT},
793
    {.key = "cluster.lookup-optimize",
794
     .voltype = "cluster/distribute",
795
     .op_version = GD_OP_VERSION_3_7_2,
796
     .flags = VOLOPT_FLAG_CLIENT_OPT},
797
    {.key = "cluster.rmdir-optimize",
798
     .voltype = "cluster/distribute",
799
     .op_version = GD_OP_VERSION_11_0,
800
     .flags = VOLOPT_FLAG_CLIENT_OPT},
801
    {.key = "cluster.min-free-disk",
802
     .voltype = "cluster/distribute",
803
     .op_version = 1,
804
     .flags = VOLOPT_FLAG_CLIENT_OPT},
805
    {.key = "cluster.min-free-inodes",
806
     .voltype = "cluster/distribute",
807
     .op_version = 1,
808
     .flags = VOLOPT_FLAG_CLIENT_OPT},
809
    {.key = "cluster.rebalance-stats",
810
     .voltype = "cluster/distribute",
811
     .op_version = 2,
812
     .flags = VOLOPT_FLAG_CLIENT_OPT},
813
    {.key = "cluster.subvols-per-directory",
814
     .voltype = "cluster/distribute",
815
     .option = "directory-layout-spread",
816
     .op_version = 2,
817
     .validate_fn = validate_subvols_per_directory,
818
     .flags = VOLOPT_FLAG_CLIENT_OPT},
819
    {.key = "cluster.readdir-optimize",
820
     .voltype = "cluster/distribute",
821
     .op_version = 1,
822
     .flags = VOLOPT_FLAG_CLIENT_OPT},
823
    {.key = "cluster.rsync-hash-regex",
824
     .voltype = "cluster/distribute",
825
     .type = NO_DOC,
826
     .op_version = 3,
827
     .flags = VOLOPT_FLAG_CLIENT_OPT},
828
    {.key = "cluster.extra-hash-regex",
829
     .voltype = "cluster/distribute",
830
     .type = NO_DOC,
831
     .op_version = 3,
832
     .flags = VOLOPT_FLAG_CLIENT_OPT},
833
    {.key = "cluster.dht-xattr-name",
834
     .voltype = "cluster/distribute",
835
     .option = "xattr-name",
836
     .type = NO_DOC,
837
     .op_version = 3,
838
     .flags = VOLOPT_FLAG_CLIENT_OPT},
839
    {
840
        .key = "cluster.randomize-hash-range-by-gfid",
841
        .voltype = "cluster/distribute",
842
        .option = "randomize-hash-range-by-gfid",
843
        .type = NO_DOC,
844
        .op_version = GD_OP_VERSION_3_6_0,
845
        .flags = VOLOPT_FLAG_CLIENT_OPT,
846
    },
847
    {
848
        .key = "cluster.rebal-throttle",
849
        .voltype = "cluster/distribute",
850
        .option = "rebal-throttle",
851
        .op_version = GD_OP_VERSION_3_7_0,
852
        .validate_fn = validate_defrag_throttle_option,
853
        .flags = VOLOPT_FLAG_CLIENT_OPT,
854
    },
855

856
    {
857
        .key = "cluster.lock-migration",
858
        .voltype = "cluster/distribute",
859
        .option = "lock-migration",
860
        .value = "off",
861
        .op_version = GD_OP_VERSION_3_8_0,
862
        .validate_fn = validate_lock_migration_option,
863
        .flags = VOLOPT_FLAG_CLIENT_OPT,
864
    },
865

866
    {
867
        .key = "cluster.force-migration",
868
        .voltype = "cluster/distribute",
869
        .option = "force-migration",
870
        .value = "off",
871
        .op_version = GD_OP_VERSION_4_0_0,
872
        .flags = VOLOPT_FLAG_CLIENT_OPT,
873
    },
874

875
    /* NUFA xlator options (Distribute special case) */
876
    {.key = "cluster.nufa",
877
     .voltype = "cluster/distribute",
878
     .option = "!nufa",
879
     .type = NO_DOC,
880
     .op_version = 2,
881
     .flags = VOLOPT_FLAG_CLIENT_OPT},
882
    {.key = "cluster.local-volume-name",
883
     .voltype = "cluster/nufa",
884
     .option = "local-volume-name",
885
     .type = NO_DOC,
886
     .op_version = 3,
887
     .flags = VOLOPT_FLAG_CLIENT_OPT},
888
    {
889
        .key = "cluster.weighted-rebalance",
890
        .voltype = "cluster/distribute",
891
        .op_version = GD_OP_VERSION_3_6_0,
892
    },
893

894
    /* Switch xlator options (Distribute special case) */
895
    {.key = "cluster.switch",
896
     .voltype = "cluster/distribute",
897
     .option = "!switch",
898
     .type = NO_DOC,
899
     .op_version = 3,
900
     .flags = VOLOPT_FLAG_CLIENT_OPT},
901
    {.key = "cluster.switch-pattern",
902
     .voltype = "cluster/switch",
903
     .option = "pattern.switch.case",
904
     .type = NO_DOC,
905
     .op_version = 3,
906
     .flags = VOLOPT_FLAG_CLIENT_OPT},
907

908
    /* AFR xlator options */
909
    {.key = "cluster.entry-change-log",
910
     .voltype = "cluster/replicate",
911
     .op_version = 1,
912
     .flags = VOLOPT_FLAG_CLIENT_OPT},
913
    {.key = "cluster.read-subvolume",
914
     .voltype = "cluster/replicate",
915
     .op_version = 1,
916
     .flags = VOLOPT_FLAG_CLIENT_OPT},
917
    {.key = "cluster.read-subvolume-index",
918
     .voltype = "cluster/replicate",
919
     .op_version = 2,
920
     .flags = VOLOPT_FLAG_CLIENT_OPT},
921
    {.key = "cluster.read-hash-mode",
922
     .voltype = "cluster/replicate",
923
     .op_version = 2,
924
     .flags = VOLOPT_FLAG_CLIENT_OPT},
925
    {.key = "cluster.background-self-heal-count",
926
     .voltype = "cluster/replicate",
927
     .op_version = 1,
928
     .flags = VOLOPT_FLAG_CLIENT_OPT},
929
    {.key = "cluster.metadata-self-heal",
930
     .voltype = "cluster/replicate",
931
     .op_version = 1,
932
     .validate_fn = validate_replica,
933
     .flags = VOLOPT_FLAG_CLIENT_OPT},
934
    {.key = "cluster.data-self-heal",
935
     .voltype = "cluster/replicate",
936
     .op_version = 1,
937
     .validate_fn = validate_replica,
938
     .flags = VOLOPT_FLAG_CLIENT_OPT},
939
    {.key = "cluster.entry-self-heal",
940
     .voltype = "cluster/replicate",
941
     .op_version = 1,
942
     .validate_fn = validate_replica,
943
     .flags = VOLOPT_FLAG_CLIENT_OPT},
944
    {.key = "cluster.self-heal-daemon",
945
     .voltype = "cluster/replicate",
946
     .option = "!self-heal-daemon",
947
     .op_version = 1,
948
     .validate_fn = validate_replica_heal_enable_disable},
949
    {.key = "cluster.heal-timeout",
950
     .voltype = "cluster/replicate",
951
     .option = "!heal-timeout",
952
     .op_version = 2,
953
     .flags = VOLOPT_FLAG_CLIENT_OPT},
954
    {.key = "cluster.strict-readdir",
955
     .voltype = "cluster/replicate",
956
     .type = NO_DOC,
957
     .op_version = 1,
958
     .flags = VOLOPT_FLAG_CLIENT_OPT},
959
    {.key = "cluster.self-heal-window-size",
960
     .voltype = "cluster/replicate",
961
     .option = "data-self-heal-window-size",
962
     .op_version = 1,
963
     .flags = VOLOPT_FLAG_CLIENT_OPT},
964
    {.key = "cluster.data-change-log",
965
     .voltype = "cluster/replicate",
966
     .op_version = 1,
967
     .flags = VOLOPT_FLAG_CLIENT_OPT},
968
    {.key = "cluster.metadata-change-log",
969
     .voltype = "cluster/replicate",
970
     .op_version = 1,
971
     .flags = VOLOPT_FLAG_CLIENT_OPT},
972
    {.key = "cluster.data-self-heal-algorithm",
973
     .voltype = "cluster/replicate",
974
     .option = "data-self-heal-algorithm",
975
     .op_version = 1,
976
     .flags = VOLOPT_FLAG_CLIENT_OPT},
977
    {.key = "cluster.eager-lock",
978
     .voltype = "cluster/replicate",
979
     .op_version = 1,
980
     .flags = VOLOPT_FLAG_CLIENT_OPT},
981
    {.key = "disperse.eager-lock",
982
     .voltype = "cluster/disperse",
983
     .op_version = GD_OP_VERSION_3_7_10,
984
     .flags = VOLOPT_FLAG_CLIENT_OPT},
985
    {.key = "disperse.other-eager-lock",
986
     .voltype = "cluster/disperse",
987
     .op_version = GD_OP_VERSION_3_13_0,
988
     .flags = VOLOPT_FLAG_CLIENT_OPT},
989
    {.key = "disperse.eager-lock-timeout",
990
     .voltype = "cluster/disperse",
991
     .op_version = GD_OP_VERSION_4_0_0,
992
     .flags = VOLOPT_FLAG_CLIENT_OPT},
993
    {.key = "disperse.other-eager-lock-timeout",
994
     .voltype = "cluster/disperse",
995
     .op_version = GD_OP_VERSION_4_0_0,
996
     .flags = VOLOPT_FLAG_CLIENT_OPT},
997
    {.key = "cluster.quorum-type",
998
     .voltype = "cluster/replicate",
999
     .option = "quorum-type",
1000
     .op_version = 1,
1001
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1002
    {.key = "cluster.quorum-count",
1003
     .voltype = "cluster/replicate",
1004
     .option = "quorum-count",
1005
     .op_version = 1,
1006
     .validate_fn = validate_quorum_count,
1007
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1008
    {.key = "cluster.choose-local",
1009
     .voltype = "cluster/replicate",
1010
     .op_version = 2,
1011
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1012
    {.key = "cluster.self-heal-readdir-size",
1013
     .voltype = "cluster/replicate",
1014
     .op_version = 2,
1015
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1016
    {.key = "cluster.post-op-delay-secs",
1017
     .voltype = "cluster/replicate",
1018
     .type = NO_DOC,
1019
     .op_version = 2,
1020
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1021
    {.key = "cluster.ensure-durability",
1022
     .voltype = "cluster/replicate",
1023
     .op_version = 3,
1024
     .type = NO_DOC,
1025
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1026
    {.key = "cluster.consistent-metadata",
1027
     .voltype = "cluster/replicate",
1028
     .type = DOC,
1029
     .op_version = GD_OP_VERSION_3_7_0,
1030
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1031
    {.key = "cluster.heal-wait-queue-length",
1032
     .voltype = "cluster/replicate",
1033
     .type = DOC,
1034
     .op_version = GD_OP_VERSION_3_7_10,
1035
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1036
    {.key = "cluster.favorite-child-policy",
1037
     .voltype = "cluster/replicate",
1038
     .type = DOC,
1039
     .op_version = GD_OP_VERSION_3_7_12,
1040
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1041
    {.key = "cluster.full-lock",
1042
     .voltype = "cluster/replicate",
1043
     .type = NO_DOC,
1044
     .op_version = GD_OP_VERSION_3_13_2,
1045
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1046
    {.key = "cluster.optimistic-change-log",
1047
     .voltype = "cluster/replicate",
1048
     .type = NO_DOC,
1049
     .op_version = GD_OP_VERSION_7_2,
1050
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1051

1052
    /* IO-stats xlator options */
1053
    {.key = VKEY_DIAG_LAT_MEASUREMENT,
1054
     .voltype = "debug/io-stats",
1055
     .option = "latency-measurement",
1056
     .value = "off",
1057
     .op_version = 1},
1058
    {.key = "diagnostics.dump-fd-stats",
1059
     .voltype = "debug/io-stats",
1060
     .op_version = 1},
1061
    {.key = VKEY_DIAG_CNT_FOP_HITS,
1062
     .voltype = "debug/io-stats",
1063
     .option = "count-fop-hits",
1064
     .value = "off",
1065
     .type = NO_DOC,
1066
     .op_version = 1},
1067
    {.key = "diagnostics.brick-log-level",
1068
     .voltype = "debug/io-stats",
1069
     .value = "INFO",
1070
     .option = "!brick-log-level",
1071
     .op_version = 1},
1072
    {.key = "diagnostics.client-log-level",
1073
     .voltype = "debug/io-stats",
1074
     .value = "INFO",
1075
     .option = "!client-log-level",
1076
     .op_version = 1,
1077
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1078
    {.key = "diagnostics.brick-sys-log-level",
1079
     .voltype = "debug/io-stats",
1080
     .option = "!sys-log-level",
1081
     .op_version = 1},
1082
    {.key = "diagnostics.client-sys-log-level",
1083
     .voltype = "debug/io-stats",
1084
     .option = "!sys-log-level",
1085
     .op_version = 1,
1086
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1087
    {
1088
        .key = "diagnostics.brick-logger",
1089
        .voltype = "debug/io-stats",
1090
        .option = "!logger",
1091
        .op_version = GD_OP_VERSION_3_6_0,
1092
    },
1093
    {.key = "diagnostics.client-logger",
1094
     .voltype = "debug/io-stats",
1095
     .option = "!logger",
1096
     .op_version = GD_OP_VERSION_3_6_0,
1097
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1098
    {
1099
        .key = "diagnostics.brick-log-format",
1100
        .voltype = "debug/io-stats",
1101
        .option = "!log-format",
1102
        .op_version = GD_OP_VERSION_3_6_0,
1103
    },
1104
    {.key = "diagnostics.client-log-format",
1105
     .voltype = "debug/io-stats",
1106
     .option = "!log-format",
1107
     .op_version = GD_OP_VERSION_3_6_0,
1108
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1109
    {
1110
        .key = "diagnostics.brick-log-buf-size",
1111
        .voltype = "debug/io-stats",
1112
        .option = "!log-buf-size",
1113
        .op_version = GD_OP_VERSION_3_6_0,
1114
    },
1115
    {.key = "diagnostics.client-log-buf-size",
1116
     .voltype = "debug/io-stats",
1117
     .option = "!log-buf-size",
1118
     .op_version = GD_OP_VERSION_3_6_0,
1119
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1120
    {
1121
        .key = "diagnostics.brick-log-flush-timeout",
1122
        .voltype = "debug/io-stats",
1123
        .option = "!log-flush-timeout",
1124
        .op_version = GD_OP_VERSION_3_6_0,
1125
    },
1126
    {.key = "diagnostics.client-log-flush-timeout",
1127
     .voltype = "debug/io-stats",
1128
     .option = "!log-flush-timeout",
1129
     .op_version = GD_OP_VERSION_3_6_0,
1130
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1131
    {.key = "diagnostics.stats-dump-interval",
1132
     .voltype = "debug/io-stats",
1133
     .option = "ios-dump-interval",
1134
     .op_version = 1},
1135
    {.key = "diagnostics.fop-sample-interval",
1136
     .voltype = "debug/io-stats",
1137
     .option = "ios-sample-interval",
1138
     .op_version = 1},
1139
    {
1140
        .key = "diagnostics.stats-dump-format",
1141
        .voltype = "debug/io-stats",
1142
        .option = "ios-dump-format",
1143
        .op_version = GD_OP_VERSION_3_12_0,
1144
    },
1145
    {.key = "diagnostics.fop-sample-buf-size",
1146
     .voltype = "debug/io-stats",
1147
     .option = "ios-sample-buf-size",
1148
     .op_version = 1},
1149
    {.key = "diagnostics.stats-dnscache-ttl-sec",
1150
     .voltype = "debug/io-stats",
1151
     .option = "ios-dnscache-ttl-sec",
1152
     .op_version = 1},
1153

1154
    /* IO-cache xlator options */
1155
    {.key = "performance.cache-max-file-size",
1156
     .voltype = "performance/io-cache",
1157
     .option = "max-file-size",
1158
     .op_version = 1,
1159
     .validate_fn = validate_cache_max_min_size,
1160
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1161
    {.key = "performance.cache-min-file-size",
1162
     .voltype = "performance/io-cache",
1163
     .option = "min-file-size",
1164
     .op_version = 1,
1165
     .validate_fn = validate_cache_max_min_size,
1166
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1167
    {.key = "performance.cache-refresh-timeout",
1168
     .voltype = "performance/io-cache",
1169
     .option = "cache-timeout",
1170
     .op_version = 1,
1171
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1172
    {.key = "performance.cache-priority",
1173
     .voltype = "performance/io-cache",
1174
     .option = "priority",
1175
     .op_version = 1,
1176
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1177
    {.key = "performance.io-cache-size",
1178
     .voltype = "performance/io-cache",
1179
     .option = "cache-size",
1180
     .op_version = GD_OP_VERSION_8_0,
1181
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1182
    {
1183
        .key = "performance.cache-size",
1184
        .voltype = "performance/io-cache",
1185
        .op_version = 1,
1186
        .flags = VOLOPT_FLAG_CLIENT_OPT,
1187
        .description = "Deprecated option. Use performance.io-cache-size "
1188
                       "to adjust the cache size of the io-cache translator, "
1189
                       "and use performance.quick-read-cache-size to adjust "
1190
                       "the cache size of the quick-read translator.",
1191
    },
1192

1193
    /* IO-threads xlator options */
1194
    {.key = "performance.io-thread-count",
1195
     .voltype = "performance/io-threads",
1196
     .option = "thread-count",
1197
     .op_version = 1},
1198
    {.key = "performance.high-prio-threads",
1199
     .voltype = "performance/io-threads",
1200
     .op_version = 1},
1201
    {.key = "performance.normal-prio-threads",
1202
     .voltype = "performance/io-threads",
1203
     .op_version = 1},
1204
    {.key = "performance.low-prio-threads",
1205
     .voltype = "performance/io-threads",
1206
     .op_version = 1},
1207
    {.key = "performance.least-prio-threads",
1208
     .voltype = "performance/io-threads",
1209
     .op_version = 1},
1210
    {.key = "performance.enable-least-priority",
1211
     .voltype = "performance/io-threads",
1212
     .op_version = 1},
1213
    {.key = "performance.iot-watchdog-secs",
1214
     .voltype = "performance/io-threads",
1215
     .option = "watchdog-secs",
1216
     .op_version = GD_OP_VERSION_4_1_0},
1217
    {.key = "performance.iot-cleanup-disconnected-reqs",
1218
     .voltype = "performance/io-threads",
1219
     .option = "cleanup-disconnected-reqs",
1220
     .op_version = GD_OP_VERSION_4_1_0},
1221
    {.key = "performance.iot-pass-through",
1222
     .voltype = "performance/io-threads",
1223
     .option = "pass-through",
1224
     .op_version = GD_OP_VERSION_4_1_0},
1225

1226
    /* Other perf xlators' options */
1227
    {.key = "performance.io-cache-pass-through",
1228
     .voltype = "performance/io-cache",
1229
     .option = "pass-through",
1230
     .op_version = GD_OP_VERSION_4_1_0},
1231
    {.key = "performance.quick-read-cache-size",
1232
     .voltype = "performance/quick-read",
1233
     .option = "cache-size",
1234
     .op_version = GD_OP_VERSION_8_0,
1235
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1236
    {.key = "performance.cache-size",
1237
     .voltype = "performance/quick-read",
1238
     .type = NO_DOC,
1239
     .op_version = 1,
1240
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1241
    {.key = "performance.quick-read-cache-timeout",
1242
     .voltype = "performance/quick-read",
1243
     .option = "cache-timeout",
1244
     .op_version = GD_OP_VERSION_8_0,
1245
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1246
    {.key = "performance.qr-cache-timeout",
1247
     .voltype = "performance/quick-read",
1248
     .option = "cache-timeout",
1249
     .op_version = 1,
1250
     .flags = VOLOPT_FLAG_CLIENT_OPT,
1251
     .description =
1252
         "Deprecated option. Use performance.quick-read-cache-timeout "
1253
         "instead."},
1254
    {.key = "performance.quick-read-cache-invalidation",
1255
     .voltype = "performance/quick-read",
1256
     .option = "quick-read-cache-invalidation",
1257
     .op_version = GD_OP_VERSION_4_0_0,
1258
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1259
    {.key = "performance.ctime-invalidation",
1260
     .voltype = "performance/quick-read",
1261
     .option = "ctime-invalidation",
1262
     .op_version = GD_OP_VERSION_5_0,
1263
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1264
    {.key = "performance.flush-behind",
1265
     .voltype = "performance/write-behind",
1266
     .option = "flush-behind",
1267
     .op_version = 1,
1268
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1269
    {.key = "performance.nfs.flush-behind",
1270
     .voltype = "performance/write-behind",
1271
     .option = "flush-behind",
1272
     .op_version = 1,
1273
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1274
    {.key = "performance.write-behind-window-size",
1275
     .voltype = "performance/write-behind",
1276
     .option = "cache-size",
1277
     .op_version = 1,
1278
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1279
    {
1280
        .key = "performance.resync-failed-syncs-after-fsync",
1281
        .voltype = "performance/write-behind",
1282
        .option = "resync-failed-syncs-after-fsync",
1283
        .op_version = GD_OP_VERSION_3_7_7,
1284
        .flags = VOLOPT_FLAG_CLIENT_OPT,
1285
        .description = "If sync of \"cached-writes issued before fsync\" "
1286
                       "(to backend) fails, this option configures whether "
1287
                       "to retry syncing them after fsync or forget them. "
1288
                       "If set to on, cached-writes are retried "
1289
                       "till a \"flush\" fop (or a successful sync) on sync "
1290
                       "failures. "
1291
                       "fsync itself is failed irrespective of the value of "
1292
                       "this option. ",
1293
    },
1294
    {.key = "performance.nfs.write-behind-window-size",
1295
     .voltype = "performance/write-behind",
1296
     .option = "cache-size",
1297
     .op_version = 1,
1298
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1299
    {.key = "performance.strict-o-direct",
1300
     .voltype = "performance/write-behind",
1301
     .option = "strict-O_DIRECT",
1302
     .op_version = 2,
1303
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1304
    {.key = "performance.nfs.strict-o-direct",
1305
     .voltype = "performance/write-behind",
1306
     .option = "strict-O_DIRECT",
1307
     .op_version = 2,
1308
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1309
    {.key = "performance.strict-write-ordering",
1310
     .voltype = "performance/write-behind",
1311
     .option = "strict-write-ordering",
1312
     .op_version = 2,
1313
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1314
    {.key = "performance.nfs.strict-write-ordering",
1315
     .voltype = "performance/write-behind",
1316
     .option = "strict-write-ordering",
1317
     .op_version = 2,
1318
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1319
    {.key = "performance.write-behind-trickling-writes",
1320
     .voltype = "performance/write-behind",
1321
     .option = "trickling-writes",
1322
     .op_version = GD_OP_VERSION_3_13_1,
1323
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1324
    {.key = "performance.aggregate-size",
1325
     .voltype = "performance/write-behind",
1326
     .option = "aggregate-size",
1327
     .op_version = GD_OP_VERSION_4_1_0,
1328
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1329
    {.key = "performance.nfs.write-behind-trickling-writes",
1330
     .voltype = "performance/write-behind",
1331
     .option = "trickling-writes",
1332
     .op_version = GD_OP_VERSION_3_13_1,
1333
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1334
    {.key = "performance.lazy-open",
1335
     .voltype = "performance/open-behind",
1336
     .option = "lazy-open",
1337
     .op_version = 3,
1338
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1339
    {.key = "performance.read-after-open",
1340
     .voltype = "performance/open-behind",
1341
     .option = "read-after-open",
1342
     .op_version = 3,
1343
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1344
    {
1345
        .key = "performance.open-behind-pass-through",
1346
        .voltype = "performance/open-behind",
1347
        .option = "pass-through",
1348
        .op_version = GD_OP_VERSION_4_1_0,
1349
    },
1350
    {.key = "performance.read-ahead-page-count",
1351
     .voltype = "performance/read-ahead",
1352
     .option = "page-count",
1353
     .op_version = 1,
1354
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1355
    {
1356
        .key = "performance.read-ahead-pass-through",
1357
        .voltype = "performance/read-ahead",
1358
        .option = "pass-through",
1359
        .op_version = GD_OP_VERSION_4_1_0,
1360
    },
1361
    {
1362
        .key = "performance.readdir-ahead-pass-through",
1363
        .voltype = "performance/readdir-ahead",
1364
        .option = "pass-through",
1365
        .op_version = GD_OP_VERSION_4_1_0,
1366
    },
1367
    {.key = "performance.md-cache-pass-through",
1368
     .voltype = "performance/md-cache",
1369
     .option = "pass-through",
1370
     .op_version = GD_OP_VERSION_4_1_0},
1371
    {.key = "performance.write-behind-pass-through",
1372
     .voltype = "performance/write-behind",
1373
     .option = "pass-through",
1374
     .op_version = GD_OP_VERSION_9_0},
1375
    {.key = "performance.md-cache-timeout",
1376
     .voltype = "performance/md-cache",
1377
     .option = "md-cache-timeout",
1378
     .op_version = 2,
1379
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1380
    {.key = "performance.cache-swift-metadata",
1381
     .voltype = "performance/md-cache",
1382
     .option = "cache-swift-metadata",
1383
     .op_version = GD_OP_VERSION_3_7_10,
1384
     .description = "Cache swift metadata (user.swift.metadata xattr)",
1385
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1386
    {.key = "performance.cache-samba-metadata",
1387
     .voltype = "performance/md-cache",
1388
     .option = "cache-samba-metadata",
1389
     .op_version = GD_OP_VERSION_3_9_0,
1390
     .description = "Cache samba metadata (user.DOSATTRIB, security.NTACL"
1391
                    " xattr)",
1392
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1393
    {.key = "performance.cache-capability-xattrs",
1394
     .voltype = "performance/md-cache",
1395
     .option = "cache-capability-xattrs",
1396
     .op_version = GD_OP_VERSION_3_10_0,
1397
     .description = "Cache xattrs required for capability based security",
1398
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1399
    {.key = "performance.cache-ima-xattrs",
1400
     .voltype = "performance/md-cache",
1401
     .option = "cache-ima-xattrs",
1402
     .op_version = GD_OP_VERSION_3_10_0,
1403
     .description = "Cache xattrs required for IMA "
1404
                    "(Integrity Measurement Architecture)",
1405
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1406
    {.key = "performance.md-cache-statfs",
1407
     .voltype = "performance/md-cache",
1408
     .option = "md-cache-statfs",
1409
     .op_version = GD_OP_VERSION_4_0_0,
1410
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1411
    {.key = "performance.xattr-cache-list",
1412
     .voltype = "performance/md-cache",
1413
     .option = "xattr-cache-list",
1414
     .op_version = GD_OP_VERSION_4_0_0,
1415
     .flags = VOLOPT_FLAG_CLIENT_OPT,
1416
     .description = "A comma separated list of xattrs that shall be "
1417
                    "cached by md-cache. The only wildcard allowed is '*'"},
1418
    {.key = "performance.nl-cache-pass-through",
1419
     .voltype = "performance/nl-cache",
1420
     .option = "pass-through",
1421
     .op_version = GD_OP_VERSION_4_1_0},
1422

1423
    /* Client xlator options */
1424
    {.key = "network.frame-timeout",
1425
     .voltype = "protocol/client",
1426
     .op_version = 1,
1427
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1428
    {.key = "network.ping-timeout",
1429
     .voltype = "protocol/client",
1430
     .op_version = 1,
1431
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1432
    {.key = "network.tcp-window-size",
1433
     .voltype = "protocol/client",
1434
     .op_version = 1,
1435
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1436
    {.key = "client.ssl",
1437
     .voltype = "protocol/client",
1438
     .option = "transport.socket.ssl-enabled",
1439
     .value = "off",
1440
     .op_version = 2,
1441
     .description = "enable/disable client.ssl flag in the "
1442
                    "volume.",
1443
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1444
    {.key = "network.remote-dio",
1445
     .voltype = "protocol/client",
1446
     .option = "filter-O_DIRECT",
1447
     .op_version = 2,
1448
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1449
    {
1450
        .key = "client.own-thread",
1451
        .voltype = "protocol/client",
1452
        .option = "transport.socket.own-thread",
1453
        .type = NO_DOC,
1454
        .op_version = GD_OP_VERSION_3_7_0,
1455
    },
1456
    {
1457
        .key = "client.event-threads",
1458
        .voltype = "protocol/client",
1459
        .op_version = GD_OP_VERSION_3_7_0,
1460
    },
1461
    {.key = "client.tcp-user-timeout",
1462
     .voltype = "protocol/client",
1463
     .option = "transport.tcp-user-timeout",
1464
     .op_version = GD_OP_VERSION_3_10_2,
1465
     .value = "0", /* 0 - implies "use system default" */
1466
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1467
    {.key = "client.keepalive-time",
1468
     .voltype = "protocol/client",
1469
     .option = "transport.socket.keepalive-time",
1470
     .op_version = GD_OP_VERSION_3_10_2,
1471
     .value = "20",
1472
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1473
    {.key = "client.keepalive-interval",
1474
     .voltype = "protocol/client",
1475
     .option = "transport.socket.keepalive-interval",
1476
     .op_version = GD_OP_VERSION_3_10_2,
1477
     .value = "2",
1478
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1479
    {.key = "client.keepalive-count",
1480
     .voltype = "protocol/client",
1481
     .option = "transport.socket.keepalive-count",
1482
     .op_version = GD_OP_VERSION_3_10_2,
1483
     .value = "9",
1484
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1485
    {.key = "client.strict-locks",
1486
     .voltype = "protocol/client",
1487
     .option = "strict-locks",
1488
     .value = "off",
1489
     .op_version = GD_OP_VERSION_8_0,
1490
     .validate_fn = validate_boolean,
1491
     .type = GLOBAL_DOC,
1492
     .description = "When set, doesn't reopen saved fds after reconnect "
1493
                    "if POSIX locks are held on them. Hence subsequent "
1494
                    "operations on these fds will fail. This is "
1495
                    "necessary for stricter lock complaince as bricks "
1496
                    "cleanup any granted locks when a client "
1497
                    "disconnects."},
1498

1499
    /* Although the following option is named ta-remote-port but it will be
1500
     * added as remote-port in client volfile for ta-bricks only.
1501
     */
1502
    {.key = "client.ta-brick-port",
1503
     .voltype = "protocol/client",
1504
     .option = "ta-remote-port",
1505
     .op_version = GD_OP_VERSION_7_0},
1506

1507
    /* Server xlator options */
1508
    {.key = "network.tcp-window-size",
1509
     .voltype = "protocol/server",
1510
     .type = NO_DOC,
1511
     .op_version = 1},
1512
    {.key = "network.inode-lru-limit",
1513
     .voltype = "protocol/server",
1514
     .op_version = 1},
1515
    {.key = AUTH_ALLOW_MAP_KEY,
1516
     .voltype = "protocol/server",
1517
     .option = "!server-auth",
1518
     .value = "*",
1519
     .op_version = 1},
1520
    {.key = AUTH_REJECT_MAP_KEY,
1521
     .voltype = "protocol/server",
1522
     .option = "!server-auth",
1523
     .op_version = 1},
1524
    {.key = "transport.keepalive",
1525
     .voltype = "protocol/server",
1526
     .option = "transport.socket.keepalive",
1527
     .type = NO_DOC,
1528
     .value = "1",
1529
     .op_version = 1},
1530
    {.key = "server.allow-insecure",
1531
     .voltype = "protocol/server",
1532
     .option = "rpc-auth-allow-insecure",
1533
     .type = DOC,
1534
     .op_version = 1},
1535
    {.key = "server.root-squash",
1536
     .voltype = "protocol/server",
1537
     .option = "root-squash",
1538
     .op_version = 2},
1539
    {.key = "server.all-squash",
1540
     .voltype = "protocol/server",
1541
     .option = "all-squash",
1542
     .op_version = GD_OP_VERSION_6_0},
1543
    {.key = "server.anonuid",
1544
     .voltype = "protocol/server",
1545
     .option = "anonuid",
1546
     .op_version = 3},
1547
    {.key = "server.anongid",
1548
     .voltype = "protocol/server",
1549
     .option = "anongid",
1550
     .op_version = 3},
1551
    {.key = "server.statedump-path",
1552
     .voltype = "protocol/server",
1553
     .option = "statedump-path",
1554
     .op_version = 1,
1555
     .validate_fn = validate_statedump_path},
1556
    {.key = "server.outstanding-rpc-limit",
1557
     .voltype = "protocol/server",
1558
     .option = "rpc.outstanding-rpc-limit",
1559
     .type = GLOBAL_DOC,
1560
     .op_version = 3},
1561
    {.key = "server.ssl",
1562
     .voltype = "protocol/server",
1563
     .value = "off",
1564
     .option = "transport.socket.ssl-enabled",
1565
     .description = "enable/disable server.ssl flag in the "
1566
                    "volume.",
1567
     .op_version = 2},
1568
    {
1569
        .key = "auth.ssl-allow",
1570
        .voltype = "protocol/server",
1571
        .option = "!ssl-allow",
1572
        .value = "*",
1573
        .type = DOC,
1574
        .description = "Allow a comma separated list of common names (CN) of "
1575
                       "the clients that are allowed to access the server."
1576
                       "By default, all TLS authenticated clients are "
1577
                       "allowed to access the server.",
1578
        .op_version = GD_OP_VERSION_3_6_0,
1579
    },
1580
    {
1581
        .key = "server.manage-gids",
1582
        .voltype = "protocol/server",
1583
        .op_version = GD_OP_VERSION_3_6_0,
1584
    },
1585
    {
1586
        .key = "server.dynamic-auth",
1587
        .voltype = "protocol/server",
1588
        .op_version = GD_OP_VERSION_3_7_5,
1589
    },
1590
    {
1591
        .key = "client.send-gids",
1592
        .voltype = "protocol/client",
1593
        .type = NO_DOC,
1594
        .op_version = GD_OP_VERSION_3_6_0,
1595
    },
1596
    {
1597
        .key = "server.gid-timeout",
1598
        .voltype = "protocol/server",
1599
        .op_version = GD_OP_VERSION_3_6_0,
1600
    },
1601
    {
1602
        .key = "server.own-thread",
1603
        .voltype = "protocol/server",
1604
        .option = "transport.socket.own-thread",
1605
        .type = NO_DOC,
1606
        .op_version = GD_OP_VERSION_3_7_0,
1607
    },
1608
    {
1609
        .key = "server.event-threads",
1610
        .voltype = "protocol/server",
1611
        .op_version = GD_OP_VERSION_3_7_0,
1612
    },
1613
    {
1614
        .key = "server.tcp-user-timeout",
1615
        .voltype = "protocol/server",
1616
        .option = "transport.tcp-user-timeout",
1617
        .op_version = GD_OP_VERSION_3_10_2,
1618
    },
1619
    {
1620
        .key = "server.keepalive-time",
1621
        .voltype = "protocol/server",
1622
        .option = "transport.socket.keepalive-time",
1623
        .op_version = GD_OP_VERSION_3_10_2,
1624
        .value = "20",
1625
    },
1626
    {
1627
        .key = "server.keepalive-interval",
1628
        .voltype = "protocol/server",
1629
        .option = "transport.socket.keepalive-interval",
1630
        .op_version = GD_OP_VERSION_3_10_2,
1631
        .value = "2",
1632
    },
1633
    {
1634
        .key = "server.keepalive-count",
1635
        .voltype = "protocol/server",
1636
        .option = "transport.socket.keepalive-count",
1637
        .op_version = GD_OP_VERSION_3_10_2,
1638
        .value = "9",
1639
    },
1640
    {
1641
        .key = "transport.listen-backlog",
1642
        .voltype = "protocol/server",
1643
        .option = "transport.listen-backlog",
1644
        .op_version = GD_OP_VERSION_3_11_1,
1645
        .validate_fn = validate_server_options,
1646
        .description = "This option uses the value of backlog argument that "
1647
                       "defines the maximum length to which the queue of "
1648
                       "pending connections for socket fd may grow.",
1649
        .value = "1024",
1650
    },
1651

1652
    /* Generic transport options */
1653
    {
1654
        .key = SSL_OWN_CERT_OPT,
1655
        .voltype = "rpc-transport/socket",
1656
        .option = "!ssl-own-cert",
1657
        .op_version = GD_OP_VERSION_3_7_4,
1658
    },
1659
    {
1660
        .key = SSL_PRIVATE_KEY_OPT,
1661
        .voltype = "rpc-transport/socket",
1662
        .option = "!ssl-private-key",
1663
        .op_version = GD_OP_VERSION_3_7_4,
1664
    },
1665
    {
1666
        .key = SSL_CA_LIST_OPT,
1667
        .voltype = "rpc-transport/socket",
1668
        .option = "!ssl-ca-list",
1669
        .op_version = GD_OP_VERSION_3_7_4,
1670
    },
1671
    {
1672
        .key = SSL_CRL_PATH_OPT,
1673
        .voltype = "rpc-transport/socket",
1674
        .option = "!ssl-crl-path",
1675
        .op_version = GD_OP_VERSION_3_7_4,
1676
    },
1677
    {
1678
        .key = SSL_CERT_DEPTH_OPT,
1679
        .voltype = "rpc-transport/socket",
1680
        .option = "!ssl-cert-depth",
1681
        .op_version = GD_OP_VERSION_3_6_0,
1682
    },
1683
    {
1684
        .key = SSL_CIPHER_LIST_OPT,
1685
        .voltype = "rpc-transport/socket",
1686
        .option = "!ssl-cipher-list",
1687
        .op_version = GD_OP_VERSION_3_6_0,
1688
    },
1689
    {
1690
        .key = SSL_DH_PARAM_OPT,
1691
        .voltype = "rpc-transport/socket",
1692
        .option = "!ssl-dh-param",
1693
        .op_version = GD_OP_VERSION_3_7_4,
1694
    },
1695
    {
1696
        .key = SSL_EC_CURVE_OPT,
1697
        .voltype = "rpc-transport/socket",
1698
        .option = "!ssl-ec-curve",
1699
        .op_version = GD_OP_VERSION_3_7_4,
1700
    },
1701
    {
1702
        .key = "transport.address-family",
1703
        .voltype = "protocol/server",
1704
        .option = "!address-family",
1705
        .op_version = GD_OP_VERSION_3_7_4,
1706
        .type = NO_DOC,
1707
    },
1708

1709
    /* Performance xlators enable/disbable options */
1710
    {.key = "performance.write-behind",
1711
     .voltype = "performance/write-behind",
1712
     .option = "!perf",
1713
     .value = "on",
1714
     .op_version = 1,
1715
     .description = "enable/disable write-behind translator in the "
1716
                    "volume.",
1717
     .flags = VOLOPT_FLAG_CLIENT_OPT | VOLOPT_FLAG_XLATOR_OPT},
1718
    {.key = "performance.read-ahead",
1719
     .voltype = "performance/read-ahead",
1720
     .option = "!perf",
1721
     .value = "off",
1722
     .op_version = 1,
1723
     .description = "enable/disable read-ahead translator in the volume.",
1724
     .flags = VOLOPT_FLAG_CLIENT_OPT | VOLOPT_FLAG_XLATOR_OPT},
1725
    {.key = "performance.readdir-ahead",
1726
     .voltype = "performance/readdir-ahead",
1727
     .option = "!perf",
1728
     .value = "off",
1729
     .op_version = 3,
1730
     .description = "enable/disable readdir-ahead translator in the volume.",
1731
     .flags = VOLOPT_FLAG_CLIENT_OPT | VOLOPT_FLAG_XLATOR_OPT},
1732
    {.key = "performance.io-cache",
1733
     .voltype = "performance/io-cache",
1734
     .option = "!perf",
1735
     .value = "off",
1736
     .op_version = 1,
1737
     .description = "enable/disable io-cache translator in the volume.",
1738
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1739
    {.key = "performance.open-behind",
1740
     .voltype = "performance/open-behind",
1741
     .option = "!perf",
1742
     .value = "on",
1743
     .op_version = 2,
1744
     .description = "enable/disable open-behind translator in the volume.",
1745
     .flags = VOLOPT_FLAG_CLIENT_OPT | VOLOPT_FLAG_XLATOR_OPT
1746

1747
    },
1748
    {.key = "performance.quick-read",
1749
     .voltype = "performance/quick-read",
1750
     .option = "!perf",
1751
     .value = "on",
1752
     .op_version = 1,
1753
     .description = "enable/disable quick-read translator in the volume.",
1754
     .flags = VOLOPT_FLAG_CLIENT_OPT | VOLOPT_FLAG_XLATOR_OPT},
1755
    {.key = "performance.nl-cache",
1756
     .voltype = "performance/nl-cache",
1757
     .option = "!perf",
1758
     .value = "off",
1759
     .op_version = GD_OP_VERSION_3_11_0,
1760
     .description = "enable/disable negative entry caching translator in "
1761
                    "the volume. Enabling this option improves performance"
1762
                    " of 'create file/directory' workload",
1763
     .flags = VOLOPT_FLAG_CLIENT_OPT | VOLOPT_FLAG_XLATOR_OPT},
1764
    {.key = "performance.stat-prefetch",
1765
     .voltype = "performance/md-cache",
1766
     .option = "!perf",
1767
     .value = "on",
1768
     .op_version = 1,
1769
     .description = "enable/disable meta-data caching translator in the "
1770
                    "volume.",
1771
     .flags = VOLOPT_FLAG_CLIENT_OPT | VOLOPT_FLAG_XLATOR_OPT},
1772
    {.key = "performance.client-io-threads",
1773
     .voltype = "performance/io-threads",
1774
     .option = "!perf",
1775
     .value = "on",
1776
     .op_version = 1,
1777
     .description = "enable/disable io-threads translator in the client "
1778
                    "graph of volume.",
1779
     .flags = VOLOPT_FLAG_CLIENT_OPT | VOLOPT_FLAG_XLATOR_OPT},
1780
    {.key = "performance.nfs.write-behind",
1781
     .voltype = "performance/write-behind",
1782
     .option = "!nfsperf",
1783
     .value = "on",
1784
     .op_version = 1,
1785
     .description = "enable/disable write-behind translator in the volume",
1786
     .flags = VOLOPT_FLAG_XLATOR_OPT},
1787
    {.key = "performance.nfs.read-ahead",
1788
     .voltype = "performance/read-ahead",
1789
     .option = "!nfsperf",
1790
     .value = "off",
1791
     .type = NO_DOC,
1792
     .op_version = 1,
1793
     .flags = VOLOPT_FLAG_XLATOR_OPT},
1794
    {.key = "performance.nfs.io-cache",
1795
     .voltype = "performance/io-cache",
1796
     .option = "!nfsperf",
1797
     .value = "off",
1798
     .type = NO_DOC,
1799
     .op_version = 1,
1800
     .flags = VOLOPT_FLAG_XLATOR_OPT},
1801
    {.key = "performance.nfs.quick-read",
1802
     .voltype = "performance/quick-read",
1803
     .option = "!nfsperf",
1804
     .value = "off",
1805
     .type = NO_DOC,
1806
     .op_version = 1,
1807
     .flags = VOLOPT_FLAG_XLATOR_OPT},
1808
    {.key = "performance.nfs.stat-prefetch",
1809
     .voltype = "performance/md-cache",
1810
     .option = "!nfsperf",
1811
     .value = "off",
1812
     .type = NO_DOC,
1813
     .op_version = 1,
1814
     .flags = VOLOPT_FLAG_XLATOR_OPT},
1815
    {.key = "performance.nfs.io-threads",
1816
     .voltype = "performance/io-threads",
1817
     .option = "!nfsperf",
1818
     .value = "off",
1819
     .type = NO_DOC,
1820
     .op_version = 1,
1821
     .flags = VOLOPT_FLAG_XLATOR_OPT},
1822
    {.key = "performance.force-readdirp",
1823
     .voltype = "performance/md-cache",
1824
     .option = "force-readdirp",
1825
     .op_version = 2,
1826
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1827
    {.key = "performance.cache-invalidation",
1828
     .voltype = "performance/md-cache",
1829
     .option = "cache-invalidation",
1830
     .op_version = GD_OP_VERSION_3_9_0,
1831
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1832

1833
    {.key = "performance.global-cache-invalidation",
1834
     .voltype = "performance/md-cache",
1835
     .option = "global-cache-invalidation",
1836
     .op_version = GD_OP_VERSION_6_0,
1837
     .flags = VOLOPT_FLAG_CLIENT_OPT},
1838

1839
    /* Feature translators */
1840
    {.key = "features.uss",
1841
     .voltype = "features/snapview-server",
1842
     .op_version = GD_OP_VERSION_3_6_0,
1843
     .value = "off",
1844
     .flags = VOLOPT_FLAG_CLIENT_OPT | VOLOPT_FLAG_XLATOR_OPT,
1845
     .validate_fn = validate_uss,
1846
     .description = "enable/disable User Serviceable Snapshots on the "
1847
                    "volume."},
1848

1849
    {.key = "features.snapshot-directory",
1850
     .voltype = "features/snapview-client",
1851
     .op_version = GD_OP_VERSION_3_6_0,
1852
     .value = ".snaps",
1853
     .flags = VOLOPT_FLAG_CLIENT_OPT | VOLOPT_FLAG_XLATOR_OPT,
1854
     .validate_fn = validate_uss_dir,
1855
     .description = "Entry point directory for entering snapshot world. "
1856
                    "Value can have only [0-9a-z-_] and starts with "
1857
                    "dot (.) and cannot exceed 255 character"},
1858

1859
    {.key = "features.show-snapshot-directory",
1860
     .voltype = "features/snapview-client",
1861
     .op_version = GD_OP_VERSION_3_6_0,
1862
     .value = "off",
1863
     .flags = VOLOPT_FLAG_CLIENT_OPT | VOLOPT_FLAG_XLATOR_OPT,
1864
     .description = "show entry point in readdir output of "
1865
                    "snapdir-entry-path which is set by samba"},
1866

1867
    {.key = "features.tag-namespaces",
1868
     .voltype = "features/namespace",
1869
     .op_version = GD_OP_VERSION_4_1_0,
1870
     .option = "tag-namespaces",
1871
     .value = "off",
1872
     .flags = VOLOPT_FLAG_CLIENT_OPT,
1873
     .description = "This option enables this translator's functionality "
1874
                    "that tags every fop with a namespace hash for later "
1875
                    "throttling, stats collection, logging, etc."},
1876

1877
    /* Compressor-decompressor xlator options
1878
     * defaults used from xlator/features/compress/src/cdc.h
1879
     */
1880
    {.key = "network.compression",
1881
     .voltype = "features/cdc",
1882
     .option = "!feat",
1883
     .value = "off",
1884
     .op_version = 3,
1885
     .description = "enable/disable network compression translator",
1886
     .flags = VOLOPT_FLAG_XLATOR_OPT},
1887
    {.key = "network.compression.window-size",
1888
     .voltype = "features/cdc",
1889
     .option = "window-size",
1890
     .op_version = 3},
1891
    {.key = "network.compression.mem-level",
1892
     .voltype = "features/cdc",
1893
     .option = "mem-level",
1894
     .op_version = 3},
1895
    {.key = "network.compression.min-size",
1896
     .voltype = "features/cdc",
1897
     .option = "min-size",
1898
     .op_version = 3},
1899
    {.key = "network.compression.compression-level",
1900
     .voltype = "features/cdc",
1901
     .option = "compression-level",
1902
     .op_version = 3},
1903
    {.key = "network.compression.debug",
1904
     .voltype = "features/cdc",
1905
     .option = "debug",
1906
     .type = NO_DOC,
1907
     .op_version = 3},
1908

1909
    /* Quota xlator options */
1910
    {
1911
        .key = VKEY_FEATURES_LIMIT_USAGE,
1912
        .voltype = "features/quota",
1913
        .option = "limit-set",
1914
        .type = NO_DOC,
1915
        .op_version = 1,
1916
    },
1917
    {
1918
        .key = "features.default-soft-limit",
1919
        .voltype = "features/quota",
1920
        .option = "default-soft-limit",
1921
        .type = NO_DOC,
1922
        .op_version = 3,
1923
    },
1924
    {
1925
        .key = "features.soft-timeout",
1926
        .voltype = "features/quota",
1927
        .option = "soft-timeout",
1928
        .type = NO_DOC,
1929
        .op_version = 3,
1930
    },
1931
    {
1932
        .key = "features.hard-timeout",
1933
        .voltype = "features/quota",
1934
        .option = "hard-timeout",
1935
        .type = NO_DOC,
1936
        .op_version = 3,
1937
    },
1938
    {
1939
        .key = "features.alert-time",
1940
        .voltype = "features/quota",
1941
        .option = "alert-time",
1942
        .type = NO_DOC,
1943
        .op_version = 3,
1944
    },
1945
    {
1946
        .key = "features.quota-deem-statfs",
1947
        .voltype = "features/quota",
1948
        .option = "deem-statfs",
1949
        .value = "off",
1950
        .type = DOC,
1951
        .op_version = 2,
1952
        .validate_fn = validate_quota,
1953
    },
1954

1955
    /* Marker xlator options */
1956
    {.key = VKEY_MARKER_XTIME,
1957
     .voltype = "features/marker",
1958
     .option = "xtime",
1959
     .value = "off",
1960
     .type = NO_DOC,
1961
     .flags = VOLOPT_FLAG_FORCE,
1962
     .op_version = 1},
1963
    {.key = VKEY_MARKER_XTIME,
1964
     .voltype = "features/marker",
1965
     .option = "!xtime",
1966
     .value = "off",
1967
     .type = NO_DOC,
1968
     .flags = VOLOPT_FLAG_FORCE,
1969
     .op_version = 1},
1970
    {.key = VKEY_MARKER_XTIME_FORCE,
1971
     .voltype = "features/marker",
1972
     .option = "gsync-force-xtime",
1973
     .value = "off",
1974
     .type = NO_DOC,
1975
     .flags = VOLOPT_FLAG_FORCE,
1976
     .op_version = 2},
1977
    {.key = VKEY_MARKER_XTIME_FORCE,
1978
     .voltype = "features/marker",
1979
     .option = "!gsync-force-xtime",
1980
     .value = "off",
1981
     .type = NO_DOC,
1982
     .flags = VOLOPT_FLAG_FORCE,
1983
     .op_version = 2},
1984
    {.key = VKEY_FEATURES_QUOTA,
1985
     .voltype = "features/marker",
1986
     .option = "quota",
1987
     .value = "off",
1988
     .type = NO_DOC,
1989
     .flags = VOLOPT_FLAG_NEVER_RESET,
1990
     .op_version = 1},
1991
    {.key = VKEY_FEATURES_INODE_QUOTA,
1992
     .voltype = "features/marker",
1993
     .option = "inode-quota",
1994
     .value = "off",
1995
     .type = NO_DOC,
1996
     .flags = VOLOPT_FLAG_NEVER_RESET,
1997
     .op_version = 1},
1998
    {.key = VKEY_FEATURES_BITROT,
1999
     .voltype = "features/bit-rot",
2000
     .option = "bitrot",
2001
     .value = "disable",
2002
     .type = NO_DOC,
2003
     .flags = VOLOPT_FLAG_FORCE,
2004
     .op_version = GD_OP_VERSION_3_7_0},
2005

2006
    /* Debug xlators options */
2007
    {.key = "debug.trace",
2008
     .voltype = "debug/trace",
2009
     .option = "!debug",
2010
     .value = "off",
2011
     .type = NO_DOC,
2012
     .op_version = 1,
2013
     .flags = VOLOPT_FLAG_XLATOR_OPT},
2014
    {.key = "debug.log-history",
2015
     .voltype = "debug/trace",
2016
     .option = "log-history",
2017
     .type = NO_DOC,
2018
     .op_version = 2},
2019
    {.key = "debug.log-file",
2020
     .voltype = "debug/trace",
2021
     .option = "log-file",
2022
     .type = NO_DOC,
2023
     .op_version = 2},
2024
    {.key = "debug.exclude-ops",
2025
     .voltype = "debug/trace",
2026
     .option = "exclude-ops",
2027
     .type = NO_DOC,
2028
     .op_version = 2},
2029
    {.key = "debug.include-ops",
2030
     .voltype = "debug/trace",
2031
     .option = "include-ops",
2032
     .type = NO_DOC,
2033
     .op_version = 2},
2034
    {.key = "debug.error-gen",
2035
     .voltype = "debug/error-gen",
2036
     .option = "!debug",
2037
     .value = "off",
2038
     .type = NO_DOC,
2039
     .op_version = 1,
2040
     .flags = VOLOPT_FLAG_XLATOR_OPT},
2041
    {.key = "debug.error-failure",
2042
     .voltype = "debug/error-gen",
2043
     .option = "failure",
2044
     .type = NO_DOC,
2045
     .op_version = 3},
2046
    {.key = "debug.error-number",
2047
     .voltype = "debug/error-gen",
2048
     .option = "error-no",
2049
     .type = NO_DOC,
2050
     .op_version = 3},
2051
    {.key = "debug.random-failure",
2052
     .voltype = "debug/error-gen",
2053
     .option = "random-failure",
2054
     .type = NO_DOC,
2055
     .op_version = 3},
2056
    {.key = "debug.error-fops",
2057
     .voltype = "debug/error-gen",
2058
     .option = "enable",
2059
     .type = NO_DOC,
2060
     .op_version = 3},
2061

2062
#ifdef BUILD_GNFS
2063
    /* NFS xlator options */
2064
    {.key = "nfs.enable-ino32",
2065
     .voltype = "nfs/server",
2066
     .option = "nfs.enable-ino32",
2067
     .type = GLOBAL_DOC,
2068
     .op_version = 1},
2069
    {.key = "nfs.mem-factor",
2070
     .voltype = "nfs/server",
2071
     .option = "nfs.mem-factor",
2072
     .type = GLOBAL_DOC,
2073
     .op_version = 1},
2074
    {.key = "nfs.export-dirs",
2075
     .voltype = "nfs/server",
2076
     .option = "nfs3.export-dirs",
2077
     .type = GLOBAL_DOC,
2078
     .op_version = 1},
2079
    {.key = "nfs.export-volumes",
2080
     .voltype = "nfs/server",
2081
     .option = "nfs3.export-volumes",
2082
     .type = GLOBAL_DOC,
2083
     .op_version = 1},
2084
    {.key = "nfs.addr-namelookup",
2085
     .voltype = "nfs/server",
2086
     .option = "rpc-auth.addr.namelookup",
2087
     .type = GLOBAL_DOC,
2088
     .op_version = 1},
2089
    {.key = "nfs.dynamic-volumes",
2090
     .voltype = "nfs/server",
2091
     .option = "nfs.dynamic-volumes",
2092
     .type = GLOBAL_DOC,
2093
     .op_version = 1},
2094
    {.key = "nfs.register-with-portmap",
2095
     .voltype = "nfs/server",
2096
     .option = "rpc.register-with-portmap",
2097
     .type = GLOBAL_DOC,
2098
     .op_version = 1},
2099
    {.key = "nfs.outstanding-rpc-limit",
2100
     .voltype = "nfs/server",
2101
     .option = "rpc.outstanding-rpc-limit",
2102
     .type = GLOBAL_DOC,
2103
     .op_version = 3},
2104
    {.key = "nfs.port",
2105
     .voltype = "nfs/server",
2106
     .option = "nfs.port",
2107
     .type = GLOBAL_DOC,
2108
     .op_version = 1},
2109
    {.key = "nfs.rpc-auth-unix",
2110
     .voltype = "nfs/server",
2111
     .option = "!rpc-auth.auth-unix.*",
2112
     .op_version = 1},
2113
    {.key = "nfs.rpc-auth-null",
2114
     .voltype = "nfs/server",
2115
     .option = "!rpc-auth.auth-null.*",
2116
     .op_version = 1},
2117
    {.key = "nfs.rpc-auth-allow",
2118
     .voltype = "nfs/server",
2119
     .option = "!rpc-auth.addr.*.allow",
2120
     .op_version = 1},
2121
    {.key = "nfs.rpc-auth-reject",
2122
     .voltype = "nfs/server",
2123
     .option = "!rpc-auth.addr.*.reject",
2124
     .op_version = 1},
2125
    {.key = "nfs.ports-insecure",
2126
     .voltype = "nfs/server",
2127
     .option = "!rpc-auth.ports.*.insecure",
2128
     .op_version = 1},
2129
    {.key = "nfs.transport-type",
2130
     .voltype = "nfs/server",
2131
     .option = "!nfs.transport-type",
2132
     .op_version = 1,
2133
     .description = "Specifies the nfs transport type. Valid "
2134
                    "transport types are 'tcp' and 'rdma'."},
2135
    {.key = "nfs.trusted-sync",
2136
     .voltype = "nfs/server",
2137
     .option = "!nfs3.*.trusted-sync",
2138
     .op_version = 1},
2139
    {.key = "nfs.trusted-write",
2140
     .voltype = "nfs/server",
2141
     .option = "!nfs3.*.trusted-write",
2142
     .op_version = 1},
2143
    {.key = "nfs.volume-access",
2144
     .voltype = "nfs/server",
2145
     .option = "!nfs3.*.volume-access",
2146
     .op_version = 1},
2147
    {.key = "nfs.export-dir",
2148
     .voltype = "nfs/server",
2149
     .option = "!nfs3.*.export-dir",
2150
     .op_version = 1},
2151
    {.key = NFS_DISABLE_MAP_KEY,
2152
     .voltype = "nfs/server",
2153
     .option = "!nfs-disable",
2154
     .value = SITE_H_NFS_DISABLE,
2155
     .op_version = 1},
2156
    {.key = "nfs.nlm",
2157
     .voltype = "nfs/server",
2158
     .option = "nfs.nlm",
2159
     .type = GLOBAL_DOC,
2160
     .op_version = 1},
2161
    {.key = "nfs.acl",
2162
     .voltype = "nfs/server",
2163
     .option = "nfs.acl",
2164
     .type = GLOBAL_DOC,
2165
     .op_version = 3},
2166
    {.key = "nfs.mount-udp",
2167
     .voltype = "nfs/server",
2168
     .option = "nfs.mount-udp",
2169
     .type = GLOBAL_DOC,
2170
     .op_version = 1},
2171
    {.key = "nfs.mount-rmtab",
2172
     .voltype = "nfs/server",
2173
     .option = "nfs.mount-rmtab",
2174
     .type = GLOBAL_DOC,
2175
     .op_version = 1},
2176
    {
2177
        .key = "nfs.rpc-statd",
2178
        .voltype = "nfs/server",
2179
        .option = "nfs.rpc-statd",
2180
        .type = NO_DOC,
2181
        .op_version = GD_OP_VERSION_3_6_0,
2182
    },
2183
    {
2184
        .key = "nfs.log-level",
2185
        .voltype = "nfs/server",
2186
        .option = "nfs.log-level",
2187
        .type = NO_DOC,
2188
        .op_version = GD_OP_VERSION_3_6_0,
2189
    },
2190
    {.key = "nfs.server-aux-gids",
2191
     .voltype = "nfs/server",
2192
     .option = "nfs.server-aux-gids",
2193
     .type = NO_DOC,
2194
     .op_version = 2},
2195
    {.key = "nfs.drc",
2196
     .voltype = "nfs/server",
2197
     .option = "nfs.drc",
2198
     .type = GLOBAL_DOC,
2199
     .op_version = 3},
2200
    {.key = "nfs.drc-size",
2201
     .voltype = "nfs/server",
2202
     .option = "nfs.drc-size",
2203
     .type = GLOBAL_DOC,
2204
     .op_version = 3},
2205
    {.key = "nfs.read-size",
2206
     .voltype = "nfs/server",
2207
     .option = "nfs3.read-size",
2208
     .type = GLOBAL_DOC,
2209
     .op_version = 3},
2210
    {.key = "nfs.write-size",
2211
     .voltype = "nfs/server",
2212
     .option = "nfs3.write-size",
2213
     .type = GLOBAL_DOC,
2214
     .op_version = 3},
2215
    {.key = "nfs.readdir-size",
2216
     .voltype = "nfs/server",
2217
     .option = "nfs3.readdir-size",
2218
     .type = GLOBAL_DOC,
2219
     .op_version = 3},
2220
    {.key = "nfs.rdirplus",
2221
     .voltype = "nfs/server",
2222
     .option = "nfs.rdirplus",
2223
     .type = GLOBAL_DOC,
2224
     .op_version = GD_OP_VERSION_3_7_12,
2225
     .description = "When this option is set to off NFS falls back to "
2226
                    "standard readdir instead of readdirp"},
2227
    {
2228
        .key = "nfs.event-threads",
2229
        .voltype = "nfs/server",
2230
        .option = "nfs.event-threads",
2231
        .type = NO_DOC,
2232
        .op_version = GD_OP_VERSION_4_0_0,
2233
    },
2234

2235
    /* Cli options for Export authentication on nfs mount */
2236
    {.key = "nfs.exports-auth-enable",
2237
     .voltype = "nfs/server",
2238
     .option = "nfs.exports-auth-enable",
2239
     .type = GLOBAL_DOC,
2240
     .op_version = GD_OP_VERSION_3_7_0},
2241
    {.key = "nfs.auth-refresh-interval-sec",
2242
     .voltype = "nfs/server",
2243
     .option = "nfs.auth-refresh-interval-sec",
2244
     .type = GLOBAL_DOC,
2245
     .op_version = GD_OP_VERSION_3_7_0},
2246
    {.key = "nfs.auth-cache-ttl-sec",
2247
     .voltype = "nfs/server",
2248
     .option = "nfs.auth-cache-ttl-sec",
2249
     .type = GLOBAL_DOC,
2250
     .op_version = GD_OP_VERSION_3_7_0},
2251

2252
#endif /* BUILD_GNFS */
2253

2254
    /* Other options which don't fit any place above */
2255
    {.key = "features.read-only",
2256
     .voltype = "features/read-only",
2257
     .option = "read-only",
2258
     .op_version = 1,
2259
     .flags = VOLOPT_FLAG_CLIENT_OPT | VOLOPT_FLAG_XLATOR_OPT},
2260
    {.key = "features.worm",
2261
     .voltype = "features/worm",
2262
     .option = "worm",
2263
     .value = "off",
2264
     .validate_fn = validate_boolean,
2265
     .op_version = 2,
2266
     .flags = VOLOPT_FLAG_CLIENT_OPT | VOLOPT_FLAG_XLATOR_OPT},
2267
    {.key = "features.worm-file-level",
2268
     .voltype = "features/worm",
2269
     .option = "worm-file-level",
2270
     .value = "off",
2271
     .validate_fn = validate_boolean,
2272
     .op_version = GD_OP_VERSION_3_8_0,
2273
     .flags = VOLOPT_FLAG_CLIENT_OPT | VOLOPT_FLAG_XLATOR_OPT},
2274
    {.key = "features.worm-files-deletable",
2275
     .voltype = "features/worm",
2276
     .option = "worm-files-deletable",
2277
     .value = "on",
2278
     .validate_fn = validate_boolean,
2279
     .op_version = GD_OP_VERSION_3_13_0,
2280
     .flags = VOLOPT_FLAG_CLIENT_OPT | VOLOPT_FLAG_XLATOR_OPT},
2281
    {
2282
        .key = "features.default-retention-period",
2283
        .voltype = "features/worm",
2284
        .option = "default-retention-period",
2285
        .validate_fn = validate_worm_period,
2286
        .op_version = GD_OP_VERSION_3_8_0,
2287
    },
2288
    {
2289
        .key = "features.retention-mode",
2290
        .voltype = "features/worm",
2291
        .option = "retention-mode",
2292
        .validate_fn = validate_reten_mode,
2293
        .op_version = GD_OP_VERSION_3_8_0,
2294
    },
2295
    {
2296
        .key = "features.auto-commit-period",
2297
        .voltype = "features/worm",
2298
        .option = "auto-commit-period",
2299
        .validate_fn = validate_worm_period,
2300
        .op_version = GD_OP_VERSION_3_8_0,
2301
    },
2302
    {.key = "storage.linux-aio", .voltype = "storage/posix", .op_version = 1},
2303
    {.key = "storage.linux-io_uring",
2304
     .voltype = "storage/posix",
2305
     .op_version = GD_OP_VERSION_9_0},
2306
    {.key = "storage.batch-fsync-mode",
2307
     .voltype = "storage/posix",
2308
     .op_version = 3},
2309
    {.key = "storage.batch-fsync-delay-usec",
2310
     .voltype = "storage/posix",
2311
     .op_version = 3},
2312
    {
2313
        .key = "storage.xattr-user-namespace-mode",
2314
        .voltype = "storage/posix",
2315
        .op_version = GD_OP_VERSION_3_6_0,
2316
    },
2317
    {.key = "storage.owner-uid",
2318
     .voltype = "storage/posix",
2319
     .option = "brick-uid",
2320
     .op_version = 1},
2321
    {.key = "storage.owner-gid",
2322
     .voltype = "storage/posix",
2323
     .option = "brick-gid",
2324
     .op_version = 1},
2325
    {.key = "storage.node-uuid-pathinfo",
2326
     .voltype = "storage/posix",
2327
     .op_version = 3},
2328
    {.key = "storage.health-check-interval",
2329
     .voltype = "storage/posix",
2330
     .op_version = 3},
2331
    {
2332
        .option = "update-link-count-parent",
2333
        .key = "storage.build-pgfid",
2334
        .voltype = "storage/posix",
2335
        .op_version = GD_OP_VERSION_3_6_0,
2336
    },
2337
    {
2338
        .option = "gfid2path",
2339
        .key = "storage.gfid2path",
2340
        .type = NO_DOC,
2341
        .voltype = "storage/posix",
2342
        .op_version = GD_OP_VERSION_3_12_0,
2343
    },
2344
    {
2345
        .option = "gfid2path-separator",
2346
        .key = "storage.gfid2path-separator",
2347
        .voltype = "storage/posix",
2348
        .op_version = GD_OP_VERSION_3_12_0,
2349
    },
2350
    {
2351
        .key = "storage.reserve",
2352
        .voltype = "storage/posix",
2353
        .op_version = GD_OP_VERSION_3_13_0,
2354
    },
2355
    {
2356
        .option = "health-check-timeout",
2357
        .key = "storage.health-check-timeout",
2358
        .type = NO_DOC,
2359
        .voltype = "storage/posix",
2360
        .op_version = GD_OP_VERSION_4_0_0,
2361
    },
2362
    {
2363
        .option = "fips-mode-rchecksum",
2364
        .key = "storage.fips-mode-rchecksum",
2365
        .type = NO_DOC,
2366
        .voltype = "storage/posix",
2367
        .op_version = GD_OP_VERSION_4_0_0,
2368
    },
2369
    {
2370
        .option = "force-create-mode",
2371
        .key = "storage.force-create-mode",
2372
        .voltype = "storage/posix",
2373
        .op_version = GD_OP_VERSION_4_0_0,
2374
    },
2375
    {
2376
        .option = "force-directory-mode",
2377
        .key = "storage.force-directory-mode",
2378
        .voltype = "storage/posix",
2379
        .op_version = GD_OP_VERSION_4_0_0,
2380
    },
2381
    {
2382
        .option = "create-mask",
2383
        .key = "storage.create-mask",
2384
        .voltype = "storage/posix",
2385
        .op_version = GD_OP_VERSION_4_0_0,
2386
    },
2387
    {
2388
        .option = "create-directory-mask",
2389
        .key = "storage.create-directory-mask",
2390
        .voltype = "storage/posix",
2391
        .op_version = GD_OP_VERSION_4_0_0,
2392
    },
2393
    {
2394
        .option = "max-hardlinks",
2395
        .key = "storage.max-hardlinks",
2396
        .voltype = "storage/posix",
2397
        .op_version = GD_OP_VERSION_4_0_0,
2398
    },
2399
    {
2400
        .option = "ctime",
2401
        .key = "features.ctime",
2402
        .voltype = "storage/posix",
2403
        .op_version = GD_OP_VERSION_4_1_0,
2404
    },
2405
    {.key = "config.memory-accounting",
2406
     .voltype = "mgmt/glusterd",
2407
     .option = "!config",
2408
     .op_version = 2,
2409
     .flags = VOLOPT_FLAG_CLIENT_OPT},
2410
    {.key = "config.transport",
2411
     .voltype = "mgmt/glusterd",
2412
     .option = "!config",
2413
     .op_version = 2},
2414
    {.key = VKEY_CONFIG_GFPROXY,
2415
     .voltype = "configuration",
2416
     .option = "gfproxyd",
2417
     .value = "off",
2418
     .type = DOC,
2419
     .op_version = GD_OP_VERSION_3_13_0,
2420
     .description = "If this option is enabled, the proxy client daemon "
2421
                    "called gfproxyd will be started on all the trusted "
2422
                    "storage pool nodes"},
2423
    {.key = GLUSTERD_QUORUM_TYPE_KEY,
2424
     .voltype = "mgmt/glusterd",
2425
     .value = "off",
2426
     .op_version = 2},
2427
    {.key = GLUSTERD_QUORUM_RATIO_KEY,
2428
     .voltype = "mgmt/glusterd",
2429
     .value = "51",
2430
     .op_version = 2},
2431
    /* changelog translator - global tunables */
2432
    {.key = "changelog.changelog",
2433
     .voltype = "features/changelog",
2434
     .type = NO_DOC,
2435
     .op_version = 3},
2436
    {.key = "changelog.changelog-dir",
2437
     .voltype = "features/changelog",
2438
     .type = NO_DOC,
2439
     .op_version = 3},
2440
    {.key = "changelog.encoding",
2441
     .voltype = "features/changelog",
2442
     .type = NO_DOC,
2443
     .op_version = 3},
2444
    {.key = "changelog.rollover-time",
2445
     .voltype = "features/changelog",
2446
     .type = NO_DOC,
2447
     .op_version = 3},
2448
    {.key = "changelog.fsync-interval",
2449
     .voltype = "features/changelog",
2450
     .type = NO_DOC,
2451
     .op_version = 3},
2452
    {
2453
        .key = "changelog.changelog-barrier-timeout",
2454
        .voltype = "features/changelog",
2455
        .value = TOSTRING(BARRIER_TIMEOUT),
2456
        .op_version = GD_OP_VERSION_3_6_0,
2457
    },
2458
    {.key = "changelog.capture-del-path",
2459
     .voltype = "features/changelog",
2460
     .type = NO_DOC,
2461
     .op_version = 3},
2462
    {
2463
        .key = "features.barrier",
2464
        .voltype = "features/barrier",
2465
        .value = "disable",
2466
        .type = NO_DOC,
2467
        .op_version = GD_OP_VERSION_3_7_0,
2468
    },
2469
    {
2470
        .key = "features.barrier-timeout",
2471
        .voltype = "features/barrier",
2472
        .value = TOSTRING(BARRIER_TIMEOUT),
2473
        .op_version = GD_OP_VERSION_3_6_0,
2474
    },
2475
    {
2476
        .key = GLUSTERD_GLOBAL_OP_VERSION_KEY,
2477
        .voltype = "mgmt/glusterd",
2478
        .op_version = GD_OP_VERSION_3_6_0,
2479
    },
2480
    {
2481
        .key = GLUSTERD_MAX_OP_VERSION_KEY,
2482
        .voltype = "mgmt/glusterd",
2483
        .op_version = GD_OP_VERSION_3_10_0,
2484
    },
2485
    /*Trash translator options */
2486
    {
2487
        .key = "features.trash",
2488
        .voltype = "features/trash",
2489
        .op_version = GD_OP_VERSION_3_7_0,
2490
    },
2491
    {
2492
        .key = "features.trash-dir",
2493
        .voltype = "features/trash",
2494
        .op_version = GD_OP_VERSION_3_7_0,
2495
    },
2496
    {
2497
        .key = "features.trash-eliminate-path",
2498
        .voltype = "features/trash",
2499
        .op_version = GD_OP_VERSION_3_7_0,
2500
    },
2501
    {
2502
        .key = "features.trash-max-filesize",
2503
        .voltype = "features/trash",
2504
        .op_version = GD_OP_VERSION_3_7_0,
2505
    },
2506
    {
2507
        .key = "features.trash-internal-op",
2508
        .voltype = "features/trash",
2509
        .op_version = GD_OP_VERSION_3_7_0,
2510
    },
2511
    {.key = GLUSTERD_SHARED_STORAGE_KEY,
2512
     .voltype = "mgmt/glusterd",
2513
     .value = "disable",
2514
     .type = GLOBAL_DOC,
2515
     .op_version = GD_OP_VERSION_3_7_1,
2516
     .description = "Create and mount the shared storage volume"
2517
                    "(gluster_shared_storage) at "
2518
                    "/var/run/gluster/shared_storage on enabling this "
2519
                    "option. Unmount and delete the shared storage volume "
2520
                    " on disabling this option."},
2521
    {
2522
        .key = "locks.trace",
2523
        .voltype = "features/locks",
2524
        .op_version = GD_OP_VERSION_3_7_0,
2525
    },
2526
    {
2527
        .key = "locks.mandatory-locking",
2528
        .voltype = "features/locks",
2529
        .op_version = GD_OP_VERSION_3_8_0,
2530
        .validate_fn = validate_mandatory_locking,
2531
    },
2532
    {.key = "cluster.disperse-self-heal-daemon",
2533
     .voltype = "cluster/disperse",
2534
     .type = NO_DOC,
2535
     .option = "self-heal-daemon",
2536
     .op_version = GD_OP_VERSION_3_7_0,
2537
     .validate_fn = validate_disperse_heal_enable_disable},
2538
    {.key = "cluster.quorum-reads",
2539
     .voltype = "cluster/replicate",
2540
     .op_version = GD_OP_VERSION_3_7_0,
2541
     .flags = VOLOPT_FLAG_CLIENT_OPT},
2542
    {.key = "client.bind-insecure",
2543
     .voltype = "protocol/client",
2544
     .option = "client-bind-insecure",
2545
     .type = NO_DOC,
2546
     .op_version = GD_OP_VERSION_3_7_0,
2547
     .flags = VOLOPT_FLAG_CLIENT_OPT},
2548
    {.key = "features.timeout",
2549
     .voltype = "features/quiesce",
2550
     .option = "timeout",
2551
     .op_version = GD_OP_VERSION_4_0_0,
2552
     .flags = VOLOPT_FLAG_CLIENT_OPT,
2553
     .description = "Specifies the number of seconds the "
2554
                    "quiesce translator will wait "
2555
                    "for a CHILD_UP event before "
2556
                    "force-unwinding the frames it has "
2557
                    "currently stored for retry."},
2558
    {.key = "features.failover-hosts",
2559
     .voltype = "features/quiesce",
2560
     .option = "failover-hosts",
2561
     .op_version = GD_OP_VERSION_4_0_0,
2562
     .flags = VOLOPT_FLAG_CLIENT_OPT,
2563
     .description = "It is a comma separated list of hostname/IP "
2564
                    "addresses. It Specifies the list of hosts where "
2565
                    "the gfproxy daemons are running, to which the "
2566
                    "the thin clients can failover to."},
2567
    {.key = "features.shard",
2568
     .voltype = "features/shard",
2569
     .value = "off",
2570
     .option = "!shard",
2571
     .op_version = GD_OP_VERSION_3_7_0,
2572
     .description = "enable/disable sharding translator on the volume.",
2573
     .flags = VOLOPT_FLAG_CLIENT_OPT | VOLOPT_FLAG_XLATOR_OPT},
2574
    {.key = "features.shard-block-size",
2575
     .voltype = "features/shard",
2576
     .op_version = GD_OP_VERSION_3_7_0,
2577
     .flags = VOLOPT_FLAG_CLIENT_OPT},
2578
    {
2579
        .key = "features.shard-lru-limit",
2580
        .voltype = "features/shard",
2581
        .op_version = GD_OP_VERSION_5_0,
2582
        .flags = VOLOPT_FLAG_CLIENT_OPT,
2583
        .type = NO_DOC,
2584
    },
2585
    {.key = "features.shard-deletion-rate",
2586
     .voltype = "features/shard",
2587
     .op_version = GD_OP_VERSION_5_0,
2588
     .flags = VOLOPT_FLAG_CLIENT_OPT},
2589
    {
2590
        .key = "features.scrub-throttle",
2591
        .voltype = "features/bit-rot",
2592
        .value = "lazy",
2593
        .option = "scrub-throttle",
2594
        .op_version = GD_OP_VERSION_3_7_0,
2595
        .type = NO_DOC,
2596
    },
2597
    {
2598
        .key = "features.scrub-freq",
2599
        .voltype = "features/bit-rot",
2600
        .value = "biweekly",
2601
        .option = "scrub-frequency",
2602
        .op_version = GD_OP_VERSION_3_7_0,
2603
        .type = NO_DOC,
2604
    },
2605
    {
2606
        .key = "features.scrub",
2607
        .voltype = "features/bit-rot",
2608
        .option = "scrubber",
2609
        .op_version = GD_OP_VERSION_3_7_0,
2610
        .flags = VOLOPT_FLAG_FORCE,
2611
        .type = NO_DOC,
2612
    },
2613
    {
2614
        .key = "features.expiry-time",
2615
        .voltype = "features/bit-rot",
2616
        .value = TOSTRING(SIGNING_TIMEOUT),
2617
        .option = "expiry-time",
2618
        .op_version = GD_OP_VERSION_3_7_0,
2619
        .type = NO_DOC,
2620
    },
2621
    {
2622
        .key = "features.signer-threads",
2623
        .voltype = "features/bit-rot",
2624
        .value = TOSTRING(BR_DEFAULT_THREADS),
2625
        .option = "signer-threads",
2626
        .op_version = GD_OP_VERSION_8_0,
2627
        .type = NO_DOC,
2628
    },
2629
    /* Upcall translator options */
2630
    /* Upcall translator options */
2631
    {
2632
        .key = "features.cache-invalidation",
2633
        .voltype = "features/upcall",
2634
        .value = "off",
2635
        .op_version = GD_OP_VERSION_3_7_0,
2636
    },
2637
    {
2638
        .key = "features.cache-invalidation-timeout",
2639
        .voltype = "features/upcall",
2640
        .op_version = GD_OP_VERSION_3_7_0,
2641
    },
2642
    {
2643
        .key = "ganesha.enable",
2644
        .voltype = "mgmt/ganesha",
2645
        .value = "off",
2646
        .option = "ganesha.enable",
2647
        .op_version = GD_OP_VERSION_7_0,
2648
    },
2649
    /* Lease translator options */
2650
    {
2651
        .key = "features.leases",
2652
        .voltype = "features/leases",
2653
        .value = "off",
2654
        .op_version = GD_OP_VERSION_3_8_0,
2655
    },
2656
    {
2657
        .key = "features.lease-lock-recall-timeout",
2658
        .voltype = "features/leases",
2659
        .op_version = GD_OP_VERSION_3_8_0,
2660
    },
2661
    {.key = "disperse.background-heals",
2662
     .voltype = "cluster/disperse",
2663
     .op_version = GD_OP_VERSION_3_7_3,
2664
     .flags = VOLOPT_FLAG_CLIENT_OPT},
2665
    {.key = "disperse.heal-wait-qlength",
2666
     .voltype = "cluster/disperse",
2667
     .op_version = GD_OP_VERSION_3_7_3,
2668
     .flags = VOLOPT_FLAG_CLIENT_OPT},
2669
    {
2670
        .key = "cluster.heal-timeout",
2671
        .voltype = "cluster/disperse",
2672
        .option = "!heal-timeout",
2673
        .op_version = GD_OP_VERSION_3_7_3,
2674
        .type = NO_DOC,
2675
    },
2676
    {.key = "dht.force-readdirp",
2677
     .voltype = "cluster/distribute",
2678
     .option = "use-readdirp",
2679
     .op_version = GD_OP_VERSION_3_7_5,
2680
     .flags = VOLOPT_FLAG_CLIENT_OPT},
2681
    {.key = "disperse.read-policy",
2682
     .voltype = "cluster/disperse",
2683
     .op_version = GD_OP_VERSION_3_7_6,
2684
     .flags = VOLOPT_FLAG_CLIENT_OPT},
2685
    {.key = "cluster.shd-max-threads",
2686
     .voltype = "cluster/replicate",
2687
     .op_version = GD_OP_VERSION_3_7_12,
2688
     .flags = VOLOPT_FLAG_CLIENT_OPT,
2689
     .validate_fn = validate_replica},
2690
    {.key = "cluster.shd-wait-qlength",
2691
     .voltype = "cluster/replicate",
2692
     .op_version = GD_OP_VERSION_3_7_12,
2693
     .flags = VOLOPT_FLAG_CLIENT_OPT},
2694
    {.key = "cluster.locking-scheme",
2695
     .voltype = "cluster/replicate",
2696
     .type = DOC,
2697
     .op_version = GD_OP_VERSION_3_7_12,
2698
     .flags = VOLOPT_FLAG_CLIENT_OPT},
2699
    {.key = "cluster.granular-entry-heal",
2700
     .voltype = "cluster/replicate",
2701
     .type = DOC,
2702
     .op_version = GD_OP_VERSION_3_8_0,
2703
     .flags = VOLOPT_FLAG_CLIENT_OPT},
2704
    {
2705
        .option = "revocation-secs",
2706
        .key = "features.locks-revocation-secs",
2707
        .voltype = "features/locks",
2708
        .op_version = GD_OP_VERSION_3_9_0,
2709
    },
2710
    {
2711
        .option = "revocation-clear-all",
2712
        .key = "features.locks-revocation-clear-all",
2713
        .voltype = "features/locks",
2714
        .op_version = GD_OP_VERSION_3_9_0,
2715
    },
2716
    {
2717
        .option = "revocation-max-blocked",
2718
        .key = "features.locks-revocation-max-blocked",
2719
        .voltype = "features/locks",
2720
        .op_version = GD_OP_VERSION_3_9_0,
2721
    },
2722
    {
2723
        .option = "monkey-unlocking",
2724
        .key = "features.locks-monkey-unlocking",
2725
        .voltype = "features/locks",
2726
        .op_version = GD_OP_VERSION_3_9_0,
2727
        .type = NO_DOC,
2728
    },
2729
    {
2730
        .option = "notify-contention",
2731
        .key = "features.locks-notify-contention",
2732
        .voltype = "features/locks",
2733
        .op_version = GD_OP_VERSION_4_0_0,
2734
    },
2735
    {
2736
        .option = "notify-contention-delay",
2737
        .key = "features.locks-notify-contention-delay",
2738
        .voltype = "features/locks",
2739
        .op_version = GD_OP_VERSION_4_0_0,
2740
    },
2741
    {.key = "disperse.shd-max-threads",
2742
     .voltype = "cluster/disperse",
2743
     .op_version = GD_OP_VERSION_3_9_0,
2744
     .flags = VOLOPT_FLAG_CLIENT_OPT,
2745
     .validate_fn = validate_disperse},
2746
    {.key = "disperse.shd-wait-qlength",
2747
     .voltype = "cluster/disperse",
2748
     .op_version = GD_OP_VERSION_3_9_0,
2749
     .flags = VOLOPT_FLAG_CLIENT_OPT},
2750
    {.key = "disperse.cpu-extensions",
2751
     .voltype = "cluster/disperse",
2752
     .op_version = GD_OP_VERSION_3_9_0,
2753
     .flags = VOLOPT_FLAG_CLIENT_OPT},
2754
    {.key = "disperse.self-heal-window-size",
2755
     .voltype = "cluster/disperse",
2756
     .op_version = GD_OP_VERSION_3_11_0,
2757
     .flags = VOLOPT_FLAG_CLIENT_OPT},
2758
    {.key = "cluster.use-compound-fops",
2759
     .voltype = "cluster/replicate",
2760
     .value = "off",
2761
     .type = DOC,
2762
     .op_version = GD_OP_VERSION_3_8_4,
2763
     .flags = VOLOPT_FLAG_CLIENT_OPT},
2764
    {.key = "performance.parallel-readdir",
2765
     .voltype = "performance/readdir-ahead",
2766
     .option = "parallel-readdir",
2767
     .value = "off",
2768
     .type = DOC,
2769
     .op_version = GD_OP_VERSION_3_10_0,
2770
     .validate_fn = validate_parallel_readdir,
2771
     .description = "If this option is enabled, the readdir operation "
2772
                    "is performed in parallel on all the bricks, thus "
2773
                    "improving the performance of readdir. Note that "
2774
                    "the performance improvement is higher in large "
2775
                    "clusters"},
2776
    {
2777
        .key = "performance.rda-request-size",
2778
        .voltype = "performance/readdir-ahead",
2779
        .option = "rda-request-size",
2780
        .value = "131072",
2781
        .flags = VOLOPT_FLAG_CLIENT_OPT,
2782
        .type = DOC,
2783
        .op_version = GD_OP_VERSION_3_9_1,
2784
    },
2785
    {
2786
        .key = "performance.rda-low-wmark",
2787
        .voltype = "performance/readdir-ahead",
2788
        .option = "rda-low-wmark",
2789
        .type = NO_DOC,
2790
        .flags = VOLOPT_FLAG_CLIENT_OPT,
2791
        .op_version = GD_OP_VERSION_3_9_1,
2792
    },
2793
    {
2794
        .key = "performance.rda-high-wmark",
2795
        .voltype = "performance/readdir-ahead",
2796
        .type = NO_DOC,
2797
        .flags = VOLOPT_FLAG_CLIENT_OPT,
2798
        .op_version = GD_OP_VERSION_3_9_1,
2799
    },
2800
    {.key = "performance.rda-cache-limit",
2801
     .voltype = "performance/readdir-ahead",
2802
     .value = "10MB",
2803
     .type = DOC,
2804
     .flags = VOLOPT_FLAG_CLIENT_OPT,
2805
     .op_version = GD_OP_VERSION_3_9_1,
2806
     .validate_fn = validate_rda_cache_limit},
2807
    {
2808
        .key = "performance.nl-cache-positive-entry",
2809
        .voltype = "performance/nl-cache",
2810
        .type = DOC,
2811
        .flags = VOLOPT_FLAG_CLIENT_OPT,
2812
        .op_version = GD_OP_VERSION_3_11_0,
2813
        .description = "enable/disable storing of entries that were lookedup"
2814
                       " and found to be present in the volume, thus lookup"
2815
                       " on non existent file is served from the cache",
2816
    },
2817
    {
2818
        .key = "performance.nl-cache-limit",
2819
        .voltype = "performance/nl-cache",
2820
        .value = "10MB",
2821
        .flags = VOLOPT_FLAG_CLIENT_OPT,
2822
        .op_version = GD_OP_VERSION_3_11_0,
2823
    },
2824
    {
2825
        .key = "performance.nl-cache-timeout",
2826
        .voltype = "performance/nl-cache",
2827
        .flags = VOLOPT_FLAG_CLIENT_OPT,
2828
        .op_version = GD_OP_VERSION_3_11_0,
2829
    },
2830

2831
    /* Brick multiplexing options */
2832
    {.key = GLUSTERD_BRICK_MULTIPLEX_KEY,
2833
     .voltype = "mgmt/glusterd",
2834
     .value = "disable",
2835
     .op_version = GD_OP_VERSION_3_10_0,
2836
     .validate_fn = validate_boolean,
2837
     .type = GLOBAL_DOC,
2838
     .description = "This global option can be used to enable/disable "
2839
                    "brick multiplexing. Brick multiplexing ensures that "
2840
                    "compatible brick instances can share one single "
2841
                    "brick process."},
2842
    {.key = GLUSTER_BRICK_GRACEFUL_CLEANUP,
2843
     .voltype = "mgmt/glusterd",
2844
     .value = "disable",
2845
     .op_version = GD_OP_VERSION_9_0,
2846
     .validate_fn = validate_boolean,
2847
     .type = GLOBAL_NO_DOC,
2848
     .description = "This global option can be used to enable/disable "
2849
                    "graceful cleanup, after enable graceful cleanup "
2850
                    "glusterd always sends a detach rpc request to stop a "
2851
                    "brick process."},
2852
    {.key = GLUSTERD_VOL_CNT_PER_THRD,
2853
     .voltype = "mgmt/glusterd",
2854
     .value = GLUSTERD_VOL_CNT_PER_THRD_DEFAULT_VALUE,
2855
     .op_version = GD_OP_VERSION_7_0,
2856
     .validate_fn = validate_volume_per_thread_limit,
2857
     .type = GLOBAL_NO_DOC,
2858
     .description =
2859
         "This option can be used to limit the number of volumes "
2860
         "handled per thread to populate peer data.The option accepts "
2861
         "values in the range of 5 to 200"},
2862
    {.key = GLUSTERD_BRICKMUX_LIMIT_KEY,
2863
     .voltype = "mgmt/glusterd",
2864
     .value = GLUSTERD_BRICKMUX_LIMIT_DFLT_VALUE,
2865
     .op_version = GD_OP_VERSION_3_12_0,
2866
     .validate_fn = validate_mux_limit,
2867
     .type = GLOBAL_DOC,
2868
     .description = "This option can be used to limit the number of brick "
2869
                    "instances per brick process when brick-multiplexing "
2870
                    "is enabled. If not explicitly set, this tunable is "
2871
                    "set to 0 which denotes that brick-multiplexing can "
2872
                    "happen without any limit on the number of bricks per "
2873
                    "process. Also this option can't be set when the "
2874
                    "brick-multiplexing feature is disabled."},
2875
    {.key = "disperse.optimistic-change-log",
2876
     .voltype = "cluster/disperse",
2877
     .type = NO_DOC,
2878
     .op_version = GD_OP_VERSION_3_10_1,
2879
     .flags = VOLOPT_FLAG_CLIENT_OPT},
2880
    {.key = "disperse.stripe-cache",
2881
     .voltype = "cluster/disperse",
2882
     .type = NO_DOC,
2883
     .op_version = GD_OP_VERSION_4_0_0,
2884
     .flags = VOLOPT_FLAG_CLIENT_OPT},
2885

2886
    /* Halo replication options */
2887
    {.key = "cluster.halo-enabled",
2888
     .voltype = "cluster/replicate",
2889
     .op_version = GD_OP_VERSION_3_11_0,
2890
     .flags = VOLOPT_FLAG_CLIENT_OPT},
2891
    {.key = "cluster.halo-shd-max-latency",
2892
     .voltype = "cluster/replicate",
2893
     .op_version = GD_OP_VERSION_3_11_0,
2894
     .flags = VOLOPT_FLAG_CLIENT_OPT},
2895
    {.key = "cluster.halo-nfsd-max-latency",
2896
     .voltype = "cluster/replicate",
2897
     .op_version = GD_OP_VERSION_3_11_0,
2898
     .flags = VOLOPT_FLAG_CLIENT_OPT},
2899
    {.key = "cluster.halo-max-latency",
2900
     .voltype = "cluster/replicate",
2901
     .op_version = GD_OP_VERSION_3_11_0,
2902
     .flags = VOLOPT_FLAG_CLIENT_OPT},
2903
    {.key = "cluster.halo-max-replicas",
2904
     .voltype = "cluster/replicate",
2905
     .op_version = GD_OP_VERSION_3_11_0,
2906
     .flags = VOLOPT_FLAG_CLIENT_OPT},
2907
    {.key = "cluster.halo-min-replicas",
2908
     .voltype = "cluster/replicate",
2909
     .op_version = GD_OP_VERSION_3_11_0,
2910
     .flags = VOLOPT_FLAG_CLIENT_OPT},
2911
    {.key = VKEY_FEATURES_SELINUX,
2912
     .voltype = "features/selinux",
2913
     .type = NO_DOC,
2914
     .value = "on",
2915
     .op_version = GD_OP_VERSION_3_11_0,
2916
     .description = "Convert security.selinux xattrs to "
2917
                    "trusted.gluster.selinux on the bricks. Recommended "
2918
                    "to have enabled when clients and/or bricks support "
2919
                    "SELinux."},
2920
    {.key = GLUSTERD_LOCALTIME_LOGGING_KEY,
2921
     .voltype = "mgmt/glusterd",
2922
     .type = GLOBAL_DOC,
2923
     .op_version = GD_OP_VERSION_3_12_0,
2924
     .validate_fn = validate_boolean},
2925
    {.key = GLUSTERD_DAEMON_LOG_LEVEL_KEY,
2926
     .voltype = "mgmt/glusterd",
2927
     .type = GLOBAL_NO_DOC,
2928
     .value = "INFO",
2929
     .op_version = GD_OP_VERSION_5_0},
2930
    {.key = "debug.delay-gen",
2931
     .voltype = "debug/delay-gen",
2932
     .option = "!debug",
2933
     .value = "off",
2934
     .type = NO_DOC,
2935
     .op_version = GD_OP_VERSION_3_13_0,
2936
     .flags = VOLOPT_FLAG_XLATOR_OPT},
2937
    {
2938
        .key = "delay-gen.delay-percentage",
2939
        .voltype = "debug/delay-gen",
2940
        .type = NO_DOC,
2941
        .op_version = GD_OP_VERSION_3_13_0,
2942
    },
2943
    {
2944
        .key = "delay-gen.delay-duration",
2945
        .voltype = "debug/delay-gen",
2946
        .type = NO_DOC,
2947
        .op_version = GD_OP_VERSION_3_13_0,
2948
    },
2949
    {
2950
        .key = "delay-gen.enable",
2951
        .voltype = "debug/delay-gen",
2952
        .type = NO_DOC,
2953
        .op_version = GD_OP_VERSION_3_13_0,
2954
    },
2955
    {.key = "disperse.parallel-writes",
2956
     .voltype = "cluster/disperse",
2957
     .type = NO_DOC,
2958
     .op_version = GD_OP_VERSION_3_13_0,
2959
     .flags = VOLOPT_FLAG_CLIENT_OPT},
2960
    {.key = "disperse.quorum-count",
2961
     .voltype = "cluster/disperse",
2962
     .type = NO_DOC,
2963
     .op_version = GD_OP_VERSION_8_0,
2964
     .validate_fn = validate_disperse_quorum_count,
2965
     .description = "This option can be used to define how many successes on"
2966
                    "the bricks constitute a success to the application. This"
2967
                    " count should be in the range"
2968
                    "[disperse-data-count,  disperse-count] (inclusive)",
2969
     .flags = VOLOPT_FLAG_CLIENT_OPT},
2970
    {
2971
        .key = "features.sdfs",
2972
        .voltype = "features/sdfs",
2973
        .value = "off",
2974
        .option = "!features",
2975
        .op_version = GD_OP_VERSION_4_0_0,
2976
        .description = "enable/disable dentry serialization xlator in volume",
2977
        .type = NO_DOC,
2978
    },
2979
    {.key = "features.cloudsync",
2980
     .voltype = "features/cloudsync",
2981
     .value = "off",
2982
     .op_version = GD_OP_VERSION_4_1_0,
2983
     .flags = VOLOPT_FLAG_CLIENT_OPT},
2984
    {.key = "features.ctime",
2985
     .voltype = "features/utime",
2986
     .validate_fn = validate_boolean,
2987
     .value = "on",
2988
     .option = "!utime",
2989
     .op_version = GD_OP_VERSION_4_1_0,
2990
     .description = "enable/disable utime translator on the volume.",
2991
     .flags = VOLOPT_FLAG_CLIENT_OPT | VOLOPT_FLAG_XLATOR_OPT},
2992
    {.key = "ctime.noatime",
2993
     .voltype = "features/utime",
2994
     .validate_fn = validate_boolean,
2995
     .value = "on",
2996
     .option = "noatime",
2997
     .op_version = GD_OP_VERSION_5_0,
2998
     .description = "enable/disable noatime option with ctime enabled.",
2999
     .flags = VOLOPT_FLAG_CLIENT_OPT | VOLOPT_FLAG_XLATOR_OPT},
3000
    {.key = "features.cloudsync-storetype",
3001
     .voltype = "features/cloudsync",
3002
     .op_version = GD_OP_VERSION_5_0,
3003
     .flags = VOLOPT_FLAG_CLIENT_OPT},
3004
    {.key = "features.s3plugin-seckey",
3005
     .voltype = "features/cloudsync",
3006
     .op_version = GD_OP_VERSION_5_0,
3007
     .flags = VOLOPT_FLAG_CLIENT_OPT},
3008
    {.key = "features.s3plugin-keyid",
3009
     .voltype = "features/cloudsync",
3010
     .op_version = GD_OP_VERSION_5_0,
3011
     .flags = VOLOPT_FLAG_CLIENT_OPT},
3012
    {.key = "features.s3plugin-bucketid",
3013
     .voltype = "features/cloudsync",
3014
     .op_version = GD_OP_VERSION_5_0,
3015
     .flags = VOLOPT_FLAG_CLIENT_OPT},
3016
    {.key = "features.s3plugin-hostname",
3017
     .voltype = "features/cloudsync",
3018
     .op_version = GD_OP_VERSION_5_0,
3019
     .flags = VOLOPT_FLAG_CLIENT_OPT},
3020
    {.key = "features.enforce-mandatory-lock",
3021
     .voltype = "features/locks",
3022
     .value = "off",
3023
     .type = NO_DOC,
3024
     .op_version = GD_OP_VERSION_6_0,
3025
     .validate_fn = validate_boolean,
3026
     .description = "option to enforce mandatory lock on a file",
3027
     .flags = VOLOPT_FLAG_XLATOR_OPT},
3028
    {.key = VKEY_CONFIG_GLOBAL_THREADING,
3029
     .voltype = "debug/io-stats",
3030
     .option = "global-threading",
3031
     .value = "off",
3032
     .op_version = GD_OP_VERSION_6_0},
3033
    {.key = VKEY_CONFIG_CLIENT_THREADS,
3034
     .voltype = "debug/io-stats",
3035
     .option = "!client-threads",
3036
     .value = "16",
3037
     .op_version = GD_OP_VERSION_6_0},
3038
    {.key = VKEY_CONFIG_BRICK_THREADS,
3039
     .voltype = "debug/io-stats",
3040
     .option = "!brick-threads",
3041
     .value = "16",
3042
     .op_version = GD_OP_VERSION_6_0},
3043
    {.key = "features.cloudsync-remote-read",
3044
     .voltype = "features/cloudsync",
3045
     .value = "off",
3046
     .op_version = GD_OP_VERSION_7_0,
3047
     .flags = VOLOPT_FLAG_CLIENT_OPT},
3048
    {.key = "features.cloudsync-store-id",
3049
     .voltype = "features/cloudsync",
3050
     .op_version = GD_OP_VERSION_7_0,
3051
     .flags = VOLOPT_FLAG_CLIENT_OPT},
3052
    {.key = "features.cloudsync-product-id",
3053
     .voltype = "features/cloudsync",
3054
     .op_version = GD_OP_VERSION_7_0,
3055
     .flags = VOLOPT_FLAG_CLIENT_OPT},
3056
    {
3057
        .key = "features.acl",
3058
        .voltype = "features/access-control",
3059
        .value = "enable",
3060
        .option = "!features",
3061
        .op_version = GD_OP_VERSION_8_0,
3062
        .description = "(WARNING: for debug purpose only) enable/disable "
3063
                       "access-control xlator in volume",
3064
        .type = NO_DOC,
3065
    },
3066
    {
3067
        .key = "feature.simple-quota-pass-through",
3068
        .voltype = "features/simple-quota",
3069
        .option = "pass-through",
3070
        .value = "true",
3071
        .description = "enable/disable simple-quota (EXPERIMENTAL) xlator in "
3072
                       "volume. Disabled by default",
3073
        .op_version = GD_OP_VERSION_11_0,
3074
    },
3075
    {
3076
        .key = "feature.simple-quota.use-backend",
3077
        .voltype = "features/simple-quota",
3078
        .option = "use-backend",
3079
        .value = "false",
3080
        .description = "enable/disable backend filesystem's accounting for "
3081
                       "quota. Disabled by default",
3082
        .op_version = GD_OP_VERSION_11_0,
3083
    },
3084
    {.key = "cluster.use-anonymous-inode",
3085
     .voltype = "cluster/replicate",
3086
     .op_version = GD_OP_VERSION_9_0,
3087
     .value = "yes",
3088
     .flags = VOLOPT_FLAG_CLIENT_OPT},
3089

3090
    {.key = "rebalance.ensure-durability",
3091
     .voltype = "cluster/distribute",
3092
     .type = NO_DOC,
3093
     .op_version = GD_OP_VERSION_10_0,
3094
     .flags = VOLOPT_FLAG_CLIENT_OPT},
3095
    {.key = NULL}};
3096

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.