)]}'
{
  "log": [
    {
      "commit": "738a35195941ecf604d3070e2a053e1df3de350b",
      "tree": "dd85dd6e48fad4a041d26ef6c36c4dd08537161f",
      "parents": [
        "27ba851244f627a302d0fc6469d1ad413fc34fcb"
      ],
      "author": {
        "name": "David Howells",
        "email": "dhowells@redhat.com",
        "time": "Sun Jul 30 14:58:27 2006 -0400"
      },
      "committer": {
        "name": "Trond Myklebust",
        "email": "Trond.Myklebust@netapp.com",
        "time": "Fri Sep 22 23:24:38 2006 -0400"
      },
      "message": "NFS: Secure the roots of the NFS subtrees in a shared superblock\n\nInvoke security_d_instantiate() on root dentries after allocating them with\ndentry_alloc_anon().  Normally dentry_alloc_root() would do that, but we don\u0027t\ncall that as we don\u0027t want to assign a name to the root dentry at this point\n(we may discover the real name later).\n\nSigned-Off-By: David Howells \u003cdhowells@redhat.com\u003e\nSigned-off-by: Trond Myklebust \u003cTrond.Myklebust@netapp.com\u003e\n"
    },
    {
      "commit": "54ceac4515986030c2502960be620198dd8fe25b",
      "tree": "b4ae4305c5652c0fe883ef5ea3243da91dbd2b34",
      "parents": [
        "cf6d7b5de8535a9f0088c5cc28ee2dae87371b4a"
      ],
      "author": {
        "name": "David Howells",
        "email": "dhowells@redhat.com",
        "time": "Tue Aug 22 20:06:13 2006 -0400"
      },
      "committer": {
        "name": "Trond Myklebust",
        "email": "Trond.Myklebust@netapp.com",
        "time": "Fri Sep 22 23:24:37 2006 -0400"
      },
      "message": "NFS: Share NFS superblocks per-protocol per-server per-FSID\n\nThe attached patch makes NFS share superblocks between mounts from the same\nserver and FSID over the same protocol.\n\nIt does this by creating each superblock with a false root and returning the\nreal root dentry in the vfsmount presented by get_sb(). The root dentry set\nstarts off as an anonymous dentry if we don\u0027t already have the dentry for its\ninode, otherwise it simply returns the dentry we already have.\n\nWe may thus end up with several trees of dentries in the superblock, and if at\nsome later point one of anonymous tree roots is discovered by normal filesystem\nactivity to be located in another tree within the superblock, the anonymous\nroot is named and materialises attached to the second tree at the appropriate\npoint.\n\nWhy do it this way? Why not pass an extra argument to the mount() syscall to\nindicate the subpath and then pathwalk from the server root to the desired\ndirectory? You can\u0027t guarantee this will work for two reasons:\n\n (1) The root and intervening nodes may not be accessible to the client.\n\n     With NFS2 and NFS3, for instance, mountd is called on the server to get\n     the filehandle for the tip of a path. mountd won\u0027t give us handles for\n     anything we don\u0027t have permission to access, and so we can\u0027t set up NFS\n     inodes for such nodes, and so can\u0027t easily set up dentries (we\u0027d have to\n     have ghost inodes or something).\n\n     With this patch we don\u0027t actually create dentries until we get handles\n     from the server that we can use to set up their inodes, and we don\u0027t\n     actually bind them into the tree until we know for sure where they go.\n\n (2) Inaccessible symbolic links.\n\n     If we\u0027re asked to mount two exports from the server, eg:\n\n\tmount warthog:/warthog/aaa/xxx /mmm\n\tmount warthog:/warthog/bbb/yyy /nnn\n\n     We may not be able to access anything nearer the root than xxx and yyy,\n     but we may find out later that /mmm/www/yyy, say, is actually the same\n     directory as the one mounted on /nnn. What we might then find out, for\n     example, is that /warthog/bbb was actually a symbolic link to\n     /warthog/aaa/xxx/www, but we can\u0027t actually determine that by talking to\n     the server until /warthog is made available by NFS.\n\n     This would lead to having constructed an errneous dentry tree which we\n     can\u0027t easily fix. We can end up with a dentry marked as a directory when\n     it should actually be a symlink, or we could end up with an apparently\n     hardlinked directory.\n\n     With this patch we need not make assumptions about the type of a dentry\n     for which we can\u0027t retrieve information, nor need we assume we know its\n     place in the grand scheme of things until we actually see that place.\n\nThis patch reduces the possibility of aliasing in the inode and page caches for\ninodes that may be accessed by more than one NFS export. It also reduces the\nnumber of superblocks required for NFS where there are many NFS exports being\nused from a server (home directory server + autofs for example).\n\nThis in turn makes it simpler to do local caching of network filesystems, as it\ncan then be guaranteed that there won\u0027t be links from multiple inodes in\nseparate superblocks to the same cache file.\n\nObviously, cache aliasing between different levels of NFS protocol could still\nbe a problem, but at least that gives us another key to use when indexing the\ncache.\n\nThis patch makes the following changes:\n\n (1) The server record construction/destruction has been abstracted out into\n     its own set of functions to make things easier to get right.  These have\n     been moved into fs/nfs/client.c.\n\n     All the code in fs/nfs/client.c has to do with the management of\n     connections to servers, and doesn\u0027t touch superblocks in any way; the\n     remaining code in fs/nfs/super.c has to do with VFS superblock management.\n\n (2) The sequence of events undertaken by NFS mount is now reordered:\n\n     (a) A volume representation (struct nfs_server) is allocated.\n\n     (b) A server representation (struct nfs_client) is acquired.  This may be\n     \t allocated or shared, and is keyed on server address, port and NFS\n     \t version.\n\n     (c) If allocated, the client representation is initialised.  The state\n     \t member variable of nfs_client is used to prevent a race during\n     \t initialisation from two mounts.\n\n     (d) For NFS4 a simple pathwalk is performed, walking from FH to FH to find\n     \t the root filehandle for the mount (fs/nfs/getroot.c).  For NFS2/3 we\n     \t are given the root FH in advance.\n\n     (e) The volume FSID is probed for on the root FH.\n\n     (f) The volume representation is initialised from the FSINFO record\n     \t retrieved on the root FH.\n\n     (g) sget() is called to acquire a superblock.  This may be allocated or\n     \t shared, keyed on client pointer and FSID.\n\n     (h) If allocated, the superblock is initialised.\n\n     (i) If the superblock is shared, then the new nfs_server record is\n     \t discarded.\n\n     (j) The root dentry for this mount is looked up from the root FH.\n\n     (k) The root dentry for this mount is assigned to the vfsmount.\n\n (3) nfs_readdir_lookup() creates dentries for each of the entries readdir()\n     returns; this function now attaches disconnected trees from alternate\n     roots that happen to be discovered attached to a directory being read (in\n     the same way nfs_lookup() is made to do for lookup ops).\n\n     The new d_materialise_unique() function is now used to do this, thus\n     permitting the whole thing to be done under one set of locks, and thus\n     avoiding any race between mount and lookup operations on the same\n     directory.\n\n (4) The client management code uses a new debug facility: NFSDBG_CLIENT which\n     is set by echoing 1024 to /proc/net/sunrpc/nfs_debug.\n\n (5) Clone mounts are now called xdev mounts.\n\n (6) Use the dentry passed to the statfs() op as the handle for retrieving fs\n     statistics rather than the root dentry of the superblock (which is now a\n     dummy).\n\nSigned-Off-By: David Howells \u003cdhowells@redhat.com\u003e\nSigned-off-by: Trond Myklebust \u003cTrond.Myklebust@netapp.com\u003e\n"
    }
  ]
}
