1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _NFSD_BLOCKLAYOUTXDR_H
3 #define _NFSD_BLOCKLAYOUTXDR_H 1
5 #include <linux/blkdev.h>
11 struct pnfs_block_extent {
12 struct nfsd4_deviceid vol_id;
16 enum pnfs_block_extent_state es;
19 struct pnfs_block_range {
25 * Random upper cap for the uuid length to avoid unbounded allocation.
26 * Not actually limited by the protocol.
28 #define PNFS_BLOCK_UUID_LEN 128
30 struct pnfs_block_volume {
31 enum pnfs_block_volume_type type;
36 u8 sig[PNFS_BLOCK_UUID_LEN];
39 enum scsi_code_set code_set;
40 enum scsi_designator_type designator_type;
48 struct pnfs_block_deviceaddr {
50 struct pnfs_block_volume volumes[];
53 __be32 nfsd4_block_encode_getdeviceinfo(struct xdr_stream *xdr,
54 struct nfsd4_getdeviceinfo *gdp);
55 __be32 nfsd4_block_encode_layoutget(struct xdr_stream *xdr,
56 struct nfsd4_layoutget *lgp);
57 int nfsd4_block_decode_layoutupdate(__be32 *p, u32 len, struct iomap **iomapp,
59 int nfsd4_scsi_decode_layoutupdate(__be32 *p, u32 len, struct iomap **iomapp,
62 #endif /* _NFSD_BLOCKLAYOUTXDR_H */