Skip to content

VFS: Enable future NFS superblock sharing [try #2]

David Howells linux-fsdevel lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2VFS: Permit filesystem to override root dentry on mount [try #2]Documentation/filesystems/Locking Documentation/filesystems/porting Documentation/filesystems/vfs.txt +77 more+474 -3830 replies
2/2VFS: Permit filesystem to perform statfs with a known root dentry [try #2]Documentation/filesystems/Locking Documentation/filesystems/vfs.txt arch/alpha/kernel/osf_sys.c +57 more+175 -1440 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchAl Viro
1/2A-b
2/2A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] VFS: Enable future NFS superblock sharing [try #2]

These two patches are a precursor to the NFS superblock sharing patches. The NFS superblock sharing patches group NFS files together into superblocks by {server, protocol, FSID}.

Ideally we'd represent each FSID tree retrieved from the server as a single tree in the client, rooted at the root of the FSID tree. However, things are much more messy than that for two reasons:

(1) We may jump directly into the middle of a tree (consider mountd), and we may not be able to access the common root of a tree on the server.

This means we may know about several subtrees of a particular filesystem on the server, but not be able to get the bits connecting them. Consider /home: the automounter might mount various users' home directories, but it may not actually be able to mount the directory in which they live.

(2) We can't simply assume that the hidden common bit of the paths forms a real tree. Symbolic links on the server may distort our perception of reality, and if the common part suddenly becomes visible, we may find that the dentry tree we've constructed is out of shape.

So what we want to do with NFS is have the ability to have separate trees within one superblock, and to splice the root of one as a branch on another when we find a connection.

The getsb patch permits the get_sb() op to return an arbitrary root for a superblock, allowing multiple trees to be set up within the superblock, or permitting a subtree to be returned (similar to mount --bind).

The statfs patch permits the statfs() op to find out which bit of the tree is being probed. In the NFS case, this is because the actual root dentry is a dummy that is never actually used (since we aren't necessarily sure of what the root actually is). For FUSE this might be because different dentries map to different data sources.

[try #2] is updated to 2.6.17-git2.

David