NFSv.2/pnfs Add a LAYOUTSTATS rpc function
Reviewed-by: Jeff Layton <jeff.layton@primarydata.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: Peng Tao <tao.peng@primarydata.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
This commit is contained in:
@@ -316,6 +316,49 @@ struct nfs4_layoutreturn {
|
||||
int rpc_status;
|
||||
};
|
||||
|
||||
#define PNFS_LAYOUTSTATS_MAXSIZE 256
|
||||
|
||||
struct nfs42_layoutstat_args;
|
||||
struct nfs42_layoutstat_devinfo;
|
||||
typedef void (*layoutstats_encode_t)(struct xdr_stream *,
|
||||
struct nfs42_layoutstat_args *,
|
||||
struct nfs42_layoutstat_devinfo *);
|
||||
|
||||
/* Per file per deviceid layoutstats */
|
||||
struct nfs42_layoutstat_devinfo {
|
||||
struct nfs4_deviceid dev_id;
|
||||
__u64 offset;
|
||||
__u64 length;
|
||||
__u64 read_count;
|
||||
__u64 read_bytes;
|
||||
__u64 write_count;
|
||||
__u64 write_bytes;
|
||||
__u32 layout_type;
|
||||
layoutstats_encode_t layoutstats_encode;
|
||||
void *layout_private;
|
||||
};
|
||||
|
||||
struct nfs42_layoutstat_args {
|
||||
struct nfs4_sequence_args seq_args;
|
||||
struct nfs_fh *fh;
|
||||
struct inode *inode;
|
||||
nfs4_stateid stateid;
|
||||
int num_dev;
|
||||
struct nfs42_layoutstat_devinfo *devinfo;
|
||||
};
|
||||
|
||||
struct nfs42_layoutstat_res {
|
||||
struct nfs4_sequence_res seq_res;
|
||||
int num_dev;
|
||||
int rpc_status;
|
||||
};
|
||||
|
||||
struct nfs42_layoutstat_data {
|
||||
struct inode *inode;
|
||||
struct nfs42_layoutstat_args args;
|
||||
struct nfs42_layoutstat_res res;
|
||||
};
|
||||
|
||||
struct stateowner_id {
|
||||
__u64 create_time;
|
||||
__u32 uniquifier;
|
||||
|
Reference in New Issue
Block a user