add NFS over AF_VSOCK support
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest posting 2/214 patches 71 repliesIn review
- v3 posting 1/214 patches 20 repliesSuperseded
- v212 patches 38 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 4 patches | 7 replies | Superseded |
Changes in v3 from the cover letter
* Documented vsock syntax in exports.man, nfs.man, and nfsd.man
* Added clientaddr autodetection in mount.nfs(8)
* Replaced #ifdefs with a single vsock.h header file
* Tested nfsd serving both IPv4 and vsock at the same time
Patches in v3 posting 2/2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/14 | mount: don't use IPPROTO_UDP for address resolutionutils/ | +1 | 0 replies | |
| 2/14 | nfs-utils: add vsock.hconfigure.ac support/ | +62 | 0 replies | |
| 3/14 | nfs-utils: add AF_VSOCK support to sockaddr.hsupport/ | +18 | 0 replies | |
| 4/14 | mount: present AF_VSOCK addressesutils/ | +6 | 0 replies | |
| 5/14 | mount: accept AF_VSOCK in nfs_verify_family()utils/ | +1 | 0 replies | |
| 6/14 | mount: generate AF_VSOCK clientaddrutils/ | +29 | 0 replies | |
| 7/14 | getport: recognize "vsock" netidsupport/ | +12 | 0 replies | |
| 8/14 | mount: AF_VSOCK address parsingutils/ utils/ | +68 | 0 replies | |
| 9/14 | exportfs: introduce host_freeaddrinfo()support/ support/ support/ +5 more | +40 | 0 replies | |
| 10/14 | exportfs: add AF_VSOCK address parsing and printingsupport/ | +133 | 0 replies | |
| 11/14 | exportfs: add AF_VSOCK support to set_addrlist()support/ | +3 | 0 replies | |
| 12/14 | exportfs: add support for "vsock:" exports(5) syntaxutils/ utils/ | +42 | 0 replies | |
| 13/14 | nfsd: add --vsock (-v) option to nfsdutils/ utils/ utils/ +1 more | +82 | 0 replies | |
| 14/14 | tests: add "vsock:" exports(5) test casetests/ tests/ | +55 | 0 replies |
Reviews trailers per patch
1 of 14 patches has a Reviewed-by or Acked-by.
| Patch | Jeff Layton |
|---|---|
| 1/14 | R-b |
| 2/14 | |
| 3/14 | |
| 4/14 | |
| 5/14 | |
| 6/14 | |
| 7/14 | |
| 8/14 | |
| 9/14 | |
| 10/14 | |
| 11/14 | |
| 12/14 | |
| 13/14 | |
| 14/14 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH nfs-utils v3 00/14] add NFS over AF_VSOCK support
v3:
* Documented vsock syntax in exports.man, nfs.man, and nfsd.man
* Added clientaddr autodetection in mount.nfs(8)
* Replaced #ifdefs with a single vsock.h header file
* Tested nfsd serving both IPv4 and vsock at the same time
Status:
* The last revision was somewhat controversial because it's already possible to share files between a hypervisor and virtual machine using TCP/IP, so why add AF_VSOCK support to the stack? TCP/IP based solutions require the virtual machine administrator to be involved in the configuration and are therefore not suitable for automatic management by OpenStack, oVirt, etc. Maintainers, is this feature acceptable?
* Need advice on netid: is there agreement to use "tcpv" instead of "vsock" as Chuck Lever suggested and how to ask IESG to assign it?
The AF_VSOCK address family allows virtual machines to communicate with the hypervisor using a zero-configuration transport. KVM, VMware, and Hyper-V hypervisors support AF_VSOCK and it was first introduced in Linux 3.9.
This patch series adds AF_VSOCK support to mount.nfs(8) and rpc.nfsd(8). To mount an export from the hypervisor (CID 2):
# mount.nfs 2:/srv/vm01 /mnt -o proto=vsock
To serve exports over vsock port 2049:
# nfsd ... --vsock 2049
This series extends exports(5) syntax to handle vsock:<CID> or vsock:*. For example, the guest with CID 3 can be given access using vsock:3.
nfsd can export over IPv4/IPv6 and vsock at the same time. See the changes to exports.man, nfs.man, and nfsd.man in the patches for syntax details.
NFSv4 and later are supported.
The code is also available here:
https://github.com/stefanha/nfs-utils/tree/vsock-nfsd
The latest kernel patches are available here:
https://github.com/stefanha/linux/tree/vsock-nfsd
Stefan Hajnoczi (14):
mount: don't use IPPROTO_UDP for address resolution
nfs-utils: add vsock.h
nfs-utils: add AF_VSOCK support to sockaddr.h
mount: present AF_VSOCK addresses
mount: accept AF_VSOCK in nfs_verify_family()
mount: generate AF_VSOCK clientaddr
getport: recognize "vsock" netid
mount: AF_VSOCK address parsing
exportfs: introduce host_freeaddrinfo()
exportfs: add AF_VSOCK address parsing and printing
exportfs: add AF_VSOCK support to set_addrlist()
exportfs: add support for "vsock:" exports(5) syntax
nfsd: add --vsock (-v) option to nfsd
tests: add "vsock:" exports(5) test case
tests/Makefile.am | 3 +- support/include/exportfs.h | 4 ++ support/include/sockaddr.h | 18 +++++ support/include/vsock.h | 59 +++++++++++++++++ utils/nfsd/nfssvc.h | 1 + support/export/client.c | 8 +-- support/export/hostname.c | 161 +++++++++++++++++++++++++++++++++++++++++++-- support/nfs/getport.c | 16 +++-- utils/exportfs/exportfs.c | 42 ++++++++++-- utils/mount/network.c | 37 ++++++++++- utils/mount/stropts.c | 61 ++++++++++++++--- utils/mountd/auth.c | 2 +- utils/mountd/cache.c | 10 +-- utils/mountd/mountd.c | 4 +- utils/mountd/rmtab.c | 2 +- utils/nfsd/nfsd.c | 18 ++++- utils/nfsd/nfssvc.c | 62 +++++++++++++++++ configure.ac | 3 + tests/t0002-vsock-basic.sh | 53 +++++++++++++++ utils/exportfs/exports.man | 12 +++- utils/mount/nfs.man | 20 ++++-- utils/nfsd/nfsd.man | 4 ++ 22 files changed, 552 insertions(+), 48 deletions(-) create mode 100644 support/include/vsock.h create mode 100755 tests/t0002-vsock-basic.sh
Signature · 1 line
2.13.5