Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Documentation: nfs: convert pnfs.txt to ReST

Convert pnfs.txt to ReST. Content remains mostly unchanged.

Signed-off-by: Daniel W. S. Almeida <dwlsalmeida@gmail.com>
Link: https://lore.kernel.org/r/20200129044917.566906-2-dwlsalmeida@gmail.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>

authored by

Daniel W. S. Almeida and committed by
Jonathan Corbet
34e75cf4 bb6d3fb3

+25 -10
+1
Documentation/filesystems/index.rst
··· 51 51 overlayfs 52 52 virtiofs 53 53 vfat 54 + nfs/index
+9
Documentation/filesystems/nfs/index.rst
··· 1 + =============================== 2 + NFS 3 + =============================== 4 + 5 + 6 + .. toctree:: 7 + :maxdepth: 1 8 + 9 + pnfs
+15 -10
Documentation/filesystems/nfs/pnfs.txt Documentation/filesystems/nfs/pnfs.rst
··· 1 - Reference counting in pnfs: 1 + ========================== 2 + Reference counting in pnfs 2 3 ========================== 3 4 4 5 The are several inter-related caches. We have layouts which can 5 6 reference multiple devices, each of which can reference multiple data servers. 6 7 Each data server can be referenced by multiple devices. Each device 7 - can be referenced by multiple layouts. To keep all of this straight, 8 + can be referenced by multiple layouts. To keep all of this straight, 8 9 we need to reference count. 9 10 10 11 11 12 struct pnfs_layout_hdr 12 - ---------------------- 13 + ====================== 14 + 13 15 The on-the-wire command LAYOUTGET corresponds to struct 14 16 pnfs_layout_segment, usually referred to by the variable name lseg. 15 17 Each nfs_inode may hold a pointer to a cache of these layout ··· 27 25 keeps it in the list. 28 26 29 27 deviceid_cache 30 - -------------- 28 + ============== 29 + 31 30 lsegs reference device ids, which are resolved per nfs_client and 32 31 layout driver type. The device ids are held in a RCU cache (struct 33 32 nfs4_deviceid_cache). The cache itself is referenced across each ··· 41 38 deviceid's per filesystem, and multiple filesystems per nfs_client. 42 39 43 40 The hash code is copied from the nfsd code base. A discussion of 44 - hashing and variations of this algorithm can be found at: 45 - http://groups.google.com/group/comp.lang.c/browse_thread/thread/9522965e2b8d3809 41 + hashing and variations of this algorithm can be found `here. 42 + <http://groups.google.com/group/comp.lang.c/browse_thread/thread/9522965e2b8d3809>`_ 46 43 47 44 data server cache 48 - ----------------- 45 + ================= 46 + 49 47 file driver devices refer to data servers, which are kept in a module 50 48 level cache. Its reference is held over the lifetime of the deviceid 51 49 pointing to it. 52 50 53 51 lseg 54 - ---- 52 + ==== 53 + 55 54 lseg maintains an extra reference corresponding to the NFS_LSEG_VALID 56 55 bit which holds it in the pnfs_layout_hdr's list. When the final lseg 57 56 is removed from the pnfs_layout_hdr's list, the NFS_LAYOUT_DESTROYED 58 57 bit is set, preventing any new lsegs from being added. 59 58 60 59 layout drivers 61 - -------------- 60 + ============== 62 61 63 62 PNFS utilizes what is called layout drivers. The STD defines 4 basic 64 63 layout types: "files", "objects", "blocks", and "flexfiles". For each ··· 73 68 Flexfiles-layout-driver code is in: fs/nfs/flexfilelayout/.. directory 74 69 75 70 blocks-layout setup 76 - ------------------- 71 + =================== 77 72 78 73 TODO: Document the setup needs of the blocks layout driver