summaryrefslogtreecommitdiff
path: root/Documentation/netlink/specs/nfsd.yaml
blob: 8f36fadd68f75b3b041722de2d7abbfdc37d4c8b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
---
name: nfsd
protocol: genetlink
uapi-header: linux/nfsd_netlink.h

doc: NFSD configuration over generic netlink.

definitions:
  -
    type: flags
    name: cache-type
    entries: [svc_export, expkey]
  -
    type: flags
    name: export-flags
    doc: These flags are ordered to match the NFSEXP_* flags in include/linux/nfsd/export.h
    entries:
      - readonly
      - insecure-port
      - rootsquash
      - allsquash
      - async
      - gathered-writes
      - noreaddirplus
      - security-label
      - sign-fh
      - nohide
      - nosubtreecheck
      - noauthnlm
      - msnfs
      - fsid
      - crossmount
      - noacl
      - v4root
      - pnfs
  -
    type: flags
    name: xprtsec-mode
    doc: These flags are ordered to match the NFSEXP_XPRTSEC_* flags in include/linux/nfsd/export.h
    entries:
      - none
      - tls
      - mtls

attribute-sets:
  -
    name: cache-notify
    attributes:
      -
        name: cache-type
        type: u32
        enum: cache-type
  -
    name: rpc-status
    attributes:
      -
        name: xid
        type: u32
        byte-order: big-endian
      -
        name: flags
        type: u32
      -
        name: prog
        type: u32
      -
        name: version
        type: u8
      -
        name: proc
        type: u32
      -
        name: service-time
        type: s64
      -
        name: pad
        type: pad
      -
        name: saddr4
        type: u32
        byte-order: big-endian
        display-hint: ipv4
      -
        name: daddr4
        type: u32
        byte-order: big-endian
        display-hint: ipv4
      -
        name: saddr6
        type: binary
        display-hint: ipv6
      -
        name: daddr6
        type: binary
        display-hint: ipv6
      -
        name: sport
        type: u16
        byte-order: big-endian
      -
        name: dport
        type: u16
        byte-order: big-endian
      -
        name: compound-ops
        type: u32
        multi-attr: true
  -
    name: server
    attributes:
      -
        name: threads
        type: u32
        multi-attr: true
      -
        name: gracetime
        type: u32
      -
        name: leasetime
        type: u32
      -
        name: scope
        type: string
      -
        name: min-threads
        type: u32
      -
        name: fh-key
        type: binary
        checks:
            exact-len: 16
  -
    name: version
    attributes:
      -
        name: major
        type: u32
      -
        name: minor
        type: u32
      -
        name: enabled
        type: flag
  -
    name: server-proto
    attributes:
      -
        name: version
        type: nest
        nested-attributes: version
        multi-attr: true
  -
    name: sock
    attributes:
      -
        name: addr
        type: binary
      -
        name: transport-name
        type: string
  -
    name: server-sock
    attributes:
      -
        name: addr
        type: nest
        nested-attributes: sock
        multi-attr: true
  -
    name: pool-mode
    attributes:
      -
        name: mode
        type: string
      -
        name: npools
        type: u32
  -
    name: fslocation
    attributes:
      -
        name: host
        type: string
      -
        name: path
        type: string
  -
    name: fslocations
    attributes:
      -
        name: location
        type: nest
        nested-attributes: fslocation
        multi-attr: true
  -
    name: auth-flavor
    attributes:
      -
        name: pseudoflavor
        type: u32
      -
        name: flags
        type: u32
        enum: export-flags
        enum-as-flags: true
  -
    name: svc-export
    attributes:
      -
        name: seqno
        type: u64
      -
        name: client
        type: string
      -
        name: path
        type: string
      -
        name: negative
        type: flag
      -
        name: expiry
        type: u64
      -
        name: anon-uid
        type: u32
      -
        name: anon-gid
        type: u32
      -
        name: fslocations
        type: nest
        nested-attributes: fslocations
      -
        name: uuid
        type: binary
      -
        name: secinfo
        type: nest
        nested-attributes: auth-flavor
        multi-attr: true
      -
        name: xprtsec
        type: u32
        enum: xprtsec-mode
        multi-attr: true
      -
        name: flags
        type: u32
        enum: export-flags
        enum-as-flags: true
      -
        name: fsid
        type: s32
  -
    name: svc-export-reqs
    attributes:
      -
        name: requests
        type: nest
        nested-attributes: svc-export
        multi-attr: true
  -
    name: expkey
    attributes:
      -
        name: seqno
        type: u64
      -
        name: client
        type: string
      -
        name: fsidtype
        type: u8
      -
        name: fsid
        type: binary
      -
        name: negative
        type: flag
      -
        name: expiry
        type: u64
      -
        name: path
        type: string
  -
    name: expkey-reqs
    attributes:
      -
        name: requests
        type: nest
        nested-attributes: expkey
        multi-attr: true
  -
    name: cache-flush
    attributes:
      -
        name: mask
        type: u32
        enum: cache-type
        enum-as-flags: true
  -
    name: unlock-ip
    attributes:
      -
        name: address
        type: binary
        doc: struct sockaddr_in or struct sockaddr_in6.
        checks:
          min-len: 16
  -
    name: unlock-filesystem
    attributes:
      -
        name: path
        type: string
        doc: Filesystem path whose state should be released.
  -
    name: unlock-export
    attributes:
      -
        name: path
        type: string
        doc: >-
          Export path whose NFSv4 state should be revoked.
          All state (opens, locks, delegations, layouts) acquired
          through any export of this path is revoked, regardless
          of which client holds the state. Intended for use after
          all clients have been unexported from a given path,
          enabling the underlying filesystem to be unmounted.

operations:
  list:
    -
      name: rpc-status-get
      doc: dump pending nfsd rpc
      attribute-set: rpc-status
      dump:
        reply:
          attributes:
            - xid
            - flags
            - prog
            - version
            - proc
            - service-time
            - saddr4
            - daddr4
            - saddr6
            - daddr6
            - sport
            - dport
            - compound-ops
    -
      name: threads-set
      doc: set the maximum number of running threads
      attribute-set: server
      flags: [admin-perm]
      do:
        request:
          attributes:
            - threads
            - gracetime
            - leasetime
            - scope
            - min-threads
            - fh-key
    -
      name: threads-get
      doc: get the maximum number of running threads
      attribute-set: server
      do:
        reply:
          attributes:
            - threads
            - gracetime
            - leasetime
            - scope
            - min-threads
    -
      name: version-set
      doc: set nfs enabled versions
      attribute-set: server-proto
      flags: [admin-perm]
      do:
        request:
          attributes:
            - version
    -
      name: version-get
      doc: get nfs enabled versions
      attribute-set: server-proto
      do:
        reply:
          attributes:
            - version
    -
      name: listener-set
      doc: set nfs running sockets
      attribute-set: server-sock
      flags: [admin-perm]
      do:
        request:
          attributes:
            - addr
    -
      name: listener-get
      doc: get nfs running listeners
      attribute-set: server-sock
      do:
        reply:
          attributes:
            - addr
    -
      name: pool-mode-set
      doc: set the current server pool-mode
      attribute-set: pool-mode
      flags: [admin-perm]
      do:
        request:
          attributes:
            - mode
    -
      name: pool-mode-get
      doc: get info about server pool-mode
      attribute-set: pool-mode
      do:
        reply:
          attributes:
            - mode
            - npools
    -
      name: cache-notify
      doc: Notification that there are cache requests that need servicing
      attribute-set: cache-notify
      mcgrp: exportd
      event:
        attributes:
          - cache-type
    -
      name: svc-export-get-reqs
      doc: Dump all pending svc_export requests
      attribute-set: svc-export-reqs
      flags: [admin-perm]
      dump:
          reply:
            attributes:
              - requests
    -
      name: svc-export-set-reqs
      doc: Respond to one or more svc_export requests
      attribute-set: svc-export-reqs
      flags: [admin-perm]
      do:
          request:
            attributes:
              - requests
    -
      name: expkey-get-reqs
      doc: Dump all pending expkey requests
      attribute-set: expkey-reqs
      flags: [admin-perm]
      dump:
          reply:
            attributes:
              - requests
    -
      name: expkey-set-reqs
      doc: Respond to one or more expkey requests
      attribute-set: expkey-reqs
      flags: [admin-perm]
      do:
          request:
            attributes:
              - requests
    -
      name: cache-flush
      doc: Flush nfsd caches (svc_export and/or expkey)
      attribute-set: cache-flush
      flags: [admin-perm]
      do:
        request:
          attributes:
            - mask
    -
      name: unlock-ip
      doc: release NLM locks held by an IP address
      attribute-set: unlock-ip
      flags: [admin-perm]
      do:
        request:
          attributes:
            - address
    -
      name: unlock-filesystem
      doc: revoke NFS state under a filesystem path
      attribute-set: unlock-filesystem
      flags: [admin-perm]
      do:
        request:
          attributes:
            - path
    -
      name: unlock-export
      doc: >-
        Revoke NFSv4 state acquired through exports of a given path.
        Unlike unlock-filesystem, which operates at superblock granularity,
        this command targets only state associated with a specific export
        path. Userspace (exportfs -u) sends this after removing the last
        client for a path so the underlying filesystem can be unmounted.
      attribute-set: unlock-export
      flags: [admin-perm]
      do:
        request:
          attributes:
            - path

mcast-groups:
  list:
    -
      name: none
    -
      name: exportd