1# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 2--- 3name: nfsd 4protocol: genetlink 5uapi-header: linux/nfsd_netlink.h 6 7doc: NFSD configuration over generic netlink. 8 9definitions: 10 - 11 type: flags 12 name: cache-type 13 entries: [svc_export, expkey] 14 - 15 type: flags 16 name: export-flags 17 doc: These flags are ordered to match the NFSEXP_* flags in include/linux/nfsd/export.h 18 entries: 19 - readonly 20 - insecure-port 21 - rootsquash 22 - allsquash 23 - async 24 - gathered-writes 25 - noreaddirplus 26 - security-label 27 - sign-fh 28 - nohide 29 - nosubtreecheck 30 - noauthnlm 31 - msnfs 32 - fsid 33 - crossmount 34 - noacl 35 - v4root 36 - pnfs 37 - 38 type: flags 39 name: xprtsec-mode 40 doc: These flags are ordered to match the NFSEXP_XPRTSEC_* flags in include/linux/nfsd/export.h 41 entries: 42 - none 43 - tls 44 - mtls 45 46attribute-sets: 47 - 48 name: cache-notify 49 attributes: 50 - 51 name: cache-type 52 type: u32 53 enum: cache-type 54 - 55 name: rpc-status 56 attributes: 57 - 58 name: xid 59 type: u32 60 byte-order: big-endian 61 - 62 name: flags 63 type: u32 64 - 65 name: prog 66 type: u32 67 - 68 name: version 69 type: u8 70 - 71 name: proc 72 type: u32 73 - 74 name: service-time 75 type: s64 76 - 77 name: pad 78 type: pad 79 - 80 name: saddr4 81 type: u32 82 byte-order: big-endian 83 display-hint: ipv4 84 - 85 name: daddr4 86 type: u32 87 byte-order: big-endian 88 display-hint: ipv4 89 - 90 name: saddr6 91 type: binary 92 display-hint: ipv6 93 - 94 name: daddr6 95 type: binary 96 display-hint: ipv6 97 - 98 name: sport 99 type: u16 100 byte-order: big-endian 101 - 102 name: dport 103 type: u16 104 byte-order: big-endian 105 - 106 name: compound-ops 107 type: u32 108 multi-attr: true 109 - 110 name: server 111 attributes: 112 - 113 name: threads 114 type: u32 115 multi-attr: true 116 - 117 name: gracetime 118 type: u32 119 - 120 name: leasetime 121 type: u32 122 - 123 name: scope 124 type: string 125 - 126 name: min-threads 127 type: u32 128 - 129 name: fh-key 130 type: binary 131 checks: 132 exact-len: 16 133 - 134 name: version 135 attributes: 136 - 137 name: major 138 type: u32 139 - 140 name: minor 141 type: u32 142 - 143 name: enabled 144 type: flag 145 - 146 name: server-proto 147 attributes: 148 - 149 name: version 150 type: nest 151 nested-attributes: version 152 multi-attr: true 153 - 154 name: sock 155 attributes: 156 - 157 name: addr 158 type: binary 159 - 160 name: transport-name 161 type: string 162 - 163 name: server-sock 164 attributes: 165 - 166 name: addr 167 type: nest 168 nested-attributes: sock 169 multi-attr: true 170 - 171 name: pool-mode 172 attributes: 173 - 174 name: mode 175 type: string 176 - 177 name: npools 178 type: u32 179 - 180 name: fslocation 181 attributes: 182 - 183 name: host 184 type: string 185 - 186 name: path 187 type: string 188 - 189 name: fslocations 190 attributes: 191 - 192 name: location 193 type: nest 194 nested-attributes: fslocation 195 multi-attr: true 196 - 197 name: auth-flavor 198 attributes: 199 - 200 name: pseudoflavor 201 type: u32 202 - 203 name: flags 204 type: u32 205 enum: export-flags 206 enum-as-flags: true 207 - 208 name: svc-export 209 attributes: 210 - 211 name: seqno 212 type: u64 213 - 214 name: client 215 type: string 216 - 217 name: path 218 type: string 219 - 220 name: negative 221 type: flag 222 - 223 name: expiry 224 type: u64 225 - 226 name: anon-uid 227 type: u32 228 - 229 name: anon-gid 230 type: u32 231 - 232 name: fslocations 233 type: nest 234 nested-attributes: fslocations 235 - 236 name: uuid 237 type: binary 238 - 239 name: secinfo 240 type: nest 241 nested-attributes: auth-flavor 242 multi-attr: true 243 - 244 name: xprtsec 245 type: u32 246 enum: xprtsec-mode 247 multi-attr: true 248 - 249 name: flags 250 type: u32 251 enum: export-flags 252 enum-as-flags: true 253 - 254 name: fsid 255 type: s32 256 - 257 name: svc-export-reqs 258 attributes: 259 - 260 name: requests 261 type: nest 262 nested-attributes: svc-export 263 multi-attr: true 264 - 265 name: expkey 266 attributes: 267 - 268 name: seqno 269 type: u64 270 - 271 name: client 272 type: string 273 - 274 name: fsidtype 275 type: u8 276 - 277 name: fsid 278 type: binary 279 - 280 name: negative 281 type: flag 282 - 283 name: expiry 284 type: u64 285 - 286 name: path 287 type: string 288 - 289 name: expkey-reqs 290 attributes: 291 - 292 name: requests 293 type: nest 294 nested-attributes: expkey 295 multi-attr: true 296 - 297 name: cache-flush 298 attributes: 299 - 300 name: mask 301 type: u32 302 enum: cache-type 303 enum-as-flags: true 304 - 305 name: unlock-ip 306 attributes: 307 - 308 name: address 309 type: binary 310 doc: struct sockaddr_in or struct sockaddr_in6. 311 checks: 312 min-len: 16 313 - 314 name: unlock-filesystem 315 attributes: 316 - 317 name: path 318 type: string 319 doc: Filesystem path whose state should be released. 320 - 321 name: unlock-export 322 attributes: 323 - 324 name: path 325 type: string 326 doc: >- 327 Export path whose NFSv4 state should be revoked. 328 All state (opens, locks, delegations, layouts) acquired 329 through any export of this path is revoked, regardless 330 of which client holds the state. Intended for use after 331 all clients have been unexported from a given path, 332 enabling the underlying filesystem to be unmounted. 333 - 334 name: server-proc-entry 335 attributes: 336 - 337 name: op 338 type: u32 339 - 340 name: count 341 type: u64 342 - 343 name: pad 344 type: pad 345 - 346 name: server-stats 347 attributes: 348 - 349 name: rc-hits 350 type: u64 351 - 352 name: rc-misses 353 type: u64 354 - 355 name: rc-nocache 356 type: u64 357 - 358 name: pad 359 type: pad 360 - 361 name: fh-stale 362 type: u64 363 - 364 name: io-read 365 type: u64 366 - 367 name: io-write 368 type: u64 369 - 370 name: netcnt 371 type: u32 372 - 373 name: netudpcnt 374 type: u32 375 - 376 name: nettcpcnt 377 type: u32 378 - 379 name: nettcpconn 380 type: u32 381 - 382 name: rpccnt 383 type: u32 384 - 385 name: rpcbadfmt 386 type: u32 387 - 388 name: rpcbadauth 389 type: u32 390 - 391 name: rpcbadclnt 392 type: u32 393 - 394 name: proc2-ops 395 type: nest 396 nested-attributes: server-proc-entry 397 multi-attr: true 398 - 399 name: proc3-ops 400 type: nest 401 nested-attributes: server-proc-entry 402 multi-attr: true 403 - 404 name: proc4-ops 405 type: nest 406 nested-attributes: server-proc-entry 407 multi-attr: true 408 - 409 name: proc4ops-ops 410 type: nest 411 nested-attributes: server-proc-entry 412 multi-attr: true 413 - 414 name: proc4cb-ops 415 type: nest 416 nested-attributes: server-proc-entry 417 multi-attr: true 418 419operations: 420 list: 421 - 422 name: rpc-status-get 423 doc: dump pending nfsd rpc 424 attribute-set: rpc-status 425 dump: 426 reply: 427 attributes: 428 - xid 429 - flags 430 - prog 431 - version 432 - proc 433 - service-time 434 - saddr4 435 - daddr4 436 - saddr6 437 - daddr6 438 - sport 439 - dport 440 - compound-ops 441 - 442 name: threads-set 443 doc: set the maximum number of running threads 444 attribute-set: server 445 flags: [admin-perm] 446 do: 447 request: 448 attributes: 449 - threads 450 - gracetime 451 - leasetime 452 - scope 453 - min-threads 454 - fh-key 455 - 456 name: threads-get 457 doc: get the maximum number of running threads 458 attribute-set: server 459 do: 460 reply: 461 attributes: 462 - threads 463 - gracetime 464 - leasetime 465 - scope 466 - min-threads 467 - 468 name: version-set 469 doc: set nfs enabled versions 470 attribute-set: server-proto 471 flags: [admin-perm] 472 do: 473 request: 474 attributes: 475 - version 476 - 477 name: version-get 478 doc: get nfs enabled versions 479 attribute-set: server-proto 480 do: 481 reply: 482 attributes: 483 - version 484 - 485 name: listener-set 486 doc: set nfs running sockets 487 attribute-set: server-sock 488 flags: [admin-perm] 489 do: 490 request: 491 attributes: 492 - addr 493 - 494 name: listener-get 495 doc: get nfs running listeners 496 attribute-set: server-sock 497 do: 498 reply: 499 attributes: 500 - addr 501 - 502 name: pool-mode-set 503 doc: set the current server pool-mode 504 attribute-set: pool-mode 505 flags: [admin-perm] 506 do: 507 request: 508 attributes: 509 - mode 510 - 511 name: pool-mode-get 512 doc: get info about server pool-mode 513 attribute-set: pool-mode 514 do: 515 reply: 516 attributes: 517 - mode 518 - npools 519 - 520 name: cache-notify 521 doc: Notification that there are cache requests that need servicing 522 attribute-set: cache-notify 523 mcgrp: exportd 524 event: 525 attributes: 526 - cache-type 527 - 528 name: svc-export-get-reqs 529 doc: Dump all pending svc_export requests 530 attribute-set: svc-export-reqs 531 flags: [admin-perm] 532 dump: 533 reply: 534 attributes: 535 - requests 536 - 537 name: svc-export-set-reqs 538 doc: Respond to one or more svc_export requests 539 attribute-set: svc-export-reqs 540 flags: [admin-perm] 541 do: 542 request: 543 attributes: 544 - requests 545 - 546 name: expkey-get-reqs 547 doc: Dump all pending expkey requests 548 attribute-set: expkey-reqs 549 flags: [admin-perm] 550 dump: 551 reply: 552 attributes: 553 - requests 554 - 555 name: expkey-set-reqs 556 doc: Respond to one or more expkey requests 557 attribute-set: expkey-reqs 558 flags: [admin-perm] 559 do: 560 request: 561 attributes: 562 - requests 563 - 564 name: cache-flush 565 doc: Flush nfsd caches (svc_export and/or expkey) 566 attribute-set: cache-flush 567 flags: [admin-perm] 568 do: 569 request: 570 attributes: 571 - mask 572 - 573 name: unlock-ip 574 doc: release NLM locks held by an IP address 575 attribute-set: unlock-ip 576 flags: [admin-perm] 577 do: 578 request: 579 attributes: 580 - address 581 - 582 name: unlock-filesystem 583 doc: revoke NFS state under a filesystem path 584 attribute-set: unlock-filesystem 585 flags: [admin-perm] 586 do: 587 request: 588 attributes: 589 - path 590 - 591 name: unlock-export 592 doc: >- 593 Revoke NFSv4 state acquired through exports of a given path. 594 Unlike unlock-filesystem, which operates at superblock granularity, 595 this command targets only state associated with a specific export 596 path. Userspace (exportfs -u) sends this after removing the last 597 client for a path so the underlying filesystem can be unmounted. 598 attribute-set: unlock-export 599 flags: [admin-perm] 600 do: 601 request: 602 attributes: 603 - path 604 - 605 name: server-stats-get 606 doc: dump NFS server statistics 607 attribute-set: server-stats 608 dump: 609 reply: 610 attributes: 611 - rc-hits 612 - rc-misses 613 - rc-nocache 614 - fh-stale 615 - io-read 616 - io-write 617 - netcnt 618 - netudpcnt 619 - nettcpcnt 620 - nettcpconn 621 - rpccnt 622 - rpcbadfmt 623 - rpcbadauth 624 - rpcbadclnt 625 - proc2-ops 626 - proc3-ops 627 - proc4-ops 628 - proc4ops-ops 629 - proc4cb-ops 630 631mcast-groups: 632 list: 633 - 634 name: none 635 - 636 name: exportd 637