Pnfs
Pnfs
Linux
Christoph Hellwig
2014 Storage Developer Conference. © Insert Your Company Name. All Rights Reserved.
pNFS Overview
Block I/O
NFS
Control Protocol
pNFS I/O protocol
pNFS operations
→ release layout
LAYOUTCOMMIT (handle, range, attributes)
CB_LAYOUTRECALL
→ recall a layout or all layouts from a file
CB_RECALLABLE_OBJ_AVAIL
OPEN
LAYOUTGET
GETDEVICEINFO
READ
WRITE
struct pnfs_block_extent {
struct nfsd4_deviceid vol_id;
u64 foff;
u64 len;
u64 soff;
enum pnfs_block_extent_state es;
};
pNFS block layout – error handling
Structured to:
– Keep as much common code as possible
– keep protocol specific code in the NFS server
– Do as little as possible work in the file system
NFS server
FS FS FS FS
Layout driver design
struct nfsd4_deviceid {
u64 fsid_idx;
u32 generation;
u32 pad;
};
struct pnfs_block_extent {
struct nfsd4_deviceid vol_id;
u64 foff;
u64 len;
u64 soff;
enum pnfs_block_extent_state es;
};
XFS extent structure
typedef enum {
XFS_EXT_NORM, XFS_EXT_UNWRITTEN,
XFS_EXT_DMAPI_OFFLINE, XFS_EXT_INVALID
} xfs_exntst_t;