1 #ifndef _NFSD_BLOCKLAYOUTXDR_H
2 #define _NFSD_BLOCKLAYOUTXDR_H 1
4 #include <linux/blkdev.h>
10 enum pnfs_block_extent_state
{
11 PNFS_BLOCK_READWRITE_DATA
= 0,
12 PNFS_BLOCK_READ_DATA
= 1,
13 PNFS_BLOCK_INVALID_DATA
= 2,
14 PNFS_BLOCK_NONE_DATA
= 3,
17 struct pnfs_block_extent
{
18 struct nfsd4_deviceid vol_id
;
22 enum pnfs_block_extent_state es
;
24 #define NFS4_BLOCK_EXTENT_SIZE 44
26 enum pnfs_block_volume_type
{
27 PNFS_BLOCK_VOLUME_SIMPLE
= 0,
28 PNFS_BLOCK_VOLUME_SLICE
= 1,
29 PNFS_BLOCK_VOLUME_CONCAT
= 2,
30 PNFS_BLOCK_VOLUME_STRIPE
= 3,
34 * Random upper cap for the uuid length to avoid unbounded allocation.
35 * Not actually limited by the protocol.
37 #define PNFS_BLOCK_UUID_LEN 128
39 struct pnfs_block_volume
{
40 enum pnfs_block_volume_type type
;
45 u8 sig
[PNFS_BLOCK_UUID_LEN
];
50 struct pnfs_block_deviceaddr
{
52 struct pnfs_block_volume volumes
[];
55 __be32
nfsd4_block_encode_getdeviceinfo(struct xdr_stream
*xdr
,
56 struct nfsd4_getdeviceinfo
*gdp
);
57 __be32
nfsd4_block_encode_layoutget(struct xdr_stream
*xdr
,
58 struct nfsd4_layoutget
*lgp
);
59 int nfsd4_block_decode_layoutupdate(__be32
*p
, u32 len
, struct iomap
**iomapp
,
62 #endif /* _NFSD_BLOCKLAYOUTXDR_H */