diff options
| author | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-02-03 16:01:27 -0500 |
|---|---|---|
| committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-02-03 16:01:27 -0500 |
| commit | e2c63e091e29786a34ecf42c169e627a3d1d96d7 (patch) | |
| tree | 4e96723b969bd6b3d39613de601f18da678cca71 /include/linux | |
| parent | cc3ea893cbb386e657d775f299f61bb9ba3bc435 (diff) | |
| parent | 7c13789e3e6c66dbcaade1760087429240eb3d27 (diff) | |
Merge branch 'flexfiles'
* flexfiles: (53 commits)
pnfs: lookup new lseg at lseg boundary
nfs41: .init_read and .init_write can be called with valid pg_lseg
pnfs: Update documentation on the Layout Drivers
pnfs/flexfiles: Add the FlexFile Layout Driver
nfs: count DIO good bytes correctly with mirroring
nfs41: wait for LAYOUTRETURN before retrying LAYOUTGET
nfs: add a helper to set NFS_ODIRECT_RESCHED_WRITES to direct writes
nfs41: add NFS_LAYOUT_RETRY_LAYOUTGET to layout header flags
nfs/flexfiles: send layoutreturn before freeing lseg
nfs41: introduce NFS_LAYOUT_RETURN_BEFORE_CLOSE
nfs41: allow async version layoutreturn
nfs41: add range to layoutreturn args
pnfs: allow LD to ask to resend read through pnfs
nfs: add nfs_pgio_current_mirror helper
nfs: only reset desc->pg_mirror_idx when mirroring is supported
nfs41: add a debug warning if we destroy an unempty layout
pnfs: fail comparison when bucket verifier not set
nfs: mirroring support for direct io
nfs: add mirroring support to pgio layer
pnfs: pass ds_commit_idx through the commit path
...
Conflicts:
fs/nfs/pnfs.c
fs/nfs/pnfs.h
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/nfs4.h | 1 | ||||
| -rw-r--r-- | include/linux/nfs_fs_sb.h | 9 | ||||
| -rw-r--r-- | include/linux/nfs_idmap.h | 2 | ||||
| -rw-r--r-- | include/linux/nfs_page.h | 22 | ||||
| -rw-r--r-- | include/linux/nfs_xdr.h | 6 | ||||
| -rw-r--r-- | include/linux/sunrpc/metrics.h | 4 |
6 files changed, 36 insertions, 8 deletions
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h index 022b761dbf0a..de7c91ca427e 100644 --- a/include/linux/nfs4.h +++ b/include/linux/nfs4.h | |||
| @@ -516,6 +516,7 @@ enum pnfs_layouttype { | |||
| 516 | LAYOUT_NFSV4_1_FILES = 1, | 516 | LAYOUT_NFSV4_1_FILES = 1, |
| 517 | LAYOUT_OSD2_OBJECTS = 2, | 517 | LAYOUT_OSD2_OBJECTS = 2, |
| 518 | LAYOUT_BLOCK_VOLUME = 3, | 518 | LAYOUT_BLOCK_VOLUME = 3, |
| 519 | LAYOUT_FLEX_FILES = 4, | ||
| 519 | }; | 520 | }; |
| 520 | 521 | ||
| 521 | /* used for both layout return and recall */ | 522 | /* used for both layout return and recall */ |
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index ddea982355f3..5e1273d4de14 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h | |||
| @@ -77,10 +77,6 @@ struct nfs_client { | |||
| 77 | /* Client owner identifier */ | 77 | /* Client owner identifier */ |
| 78 | const char * cl_owner_id; | 78 | const char * cl_owner_id; |
| 79 | 79 | ||
| 80 | /* Our own IP address, as a null-terminated string. | ||
| 81 | * This is used to generate the mv0 callback address. | ||
| 82 | */ | ||
| 83 | char cl_ipaddr[48]; | ||
| 84 | u32 cl_cb_ident; /* v4.0 callback identifier */ | 80 | u32 cl_cb_ident; /* v4.0 callback identifier */ |
| 85 | const struct nfs4_minor_version_ops *cl_mvops; | 81 | const struct nfs4_minor_version_ops *cl_mvops; |
| 86 | unsigned long cl_mig_gen; | 82 | unsigned long cl_mig_gen; |
| @@ -108,6 +104,11 @@ struct nfs_client { | |||
| 108 | #define NFS_SP4_MACH_CRED_COMMIT 6 /* COMMIT */ | 104 | #define NFS_SP4_MACH_CRED_COMMIT 6 /* COMMIT */ |
| 109 | #endif /* CONFIG_NFS_V4 */ | 105 | #endif /* CONFIG_NFS_V4 */ |
| 110 | 106 | ||
| 107 | /* Our own IP address, as a null-terminated string. | ||
| 108 | * This is used to generate the mv0 callback address. | ||
| 109 | */ | ||
| 110 | char cl_ipaddr[48]; | ||
| 111 | |||
| 111 | #ifdef CONFIG_NFS_FSCACHE | 112 | #ifdef CONFIG_NFS_FSCACHE |
| 112 | struct fscache_cookie *fscache; /* client index cache cookie */ | 113 | struct fscache_cookie *fscache; /* client index cache cookie */ |
| 113 | #endif | 114 | #endif |
diff --git a/include/linux/nfs_idmap.h b/include/linux/nfs_idmap.h index 0f4b79da6584..333844e38f66 100644 --- a/include/linux/nfs_idmap.h +++ b/include/linux/nfs_idmap.h | |||
| @@ -73,5 +73,7 @@ int nfs_map_group_to_gid(const struct nfs_server *, const char *, size_t, kgid_t | |||
| 73 | int nfs_map_uid_to_name(const struct nfs_server *, kuid_t, char *, size_t); | 73 | int nfs_map_uid_to_name(const struct nfs_server *, kuid_t, char *, size_t); |
| 74 | int nfs_map_gid_to_group(const struct nfs_server *, kgid_t, char *, size_t); | 74 | int nfs_map_gid_to_group(const struct nfs_server *, kgid_t, char *, size_t); |
| 75 | 75 | ||
| 76 | int nfs_map_string_to_numeric(const char *name, size_t namelen, __u32 *res); | ||
| 77 | |||
| 76 | extern unsigned int nfs_idmap_cache_timeout; | 78 | extern unsigned int nfs_idmap_cache_timeout; |
| 77 | #endif /* NFS_IDMAP_H */ | 79 | #endif /* NFS_IDMAP_H */ |
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h index 6c3e06ee2fb7..3eb072dbce83 100644 --- a/include/linux/nfs_page.h +++ b/include/linux/nfs_page.h | |||
| @@ -58,6 +58,9 @@ struct nfs_pageio_ops { | |||
| 58 | size_t (*pg_test)(struct nfs_pageio_descriptor *, struct nfs_page *, | 58 | size_t (*pg_test)(struct nfs_pageio_descriptor *, struct nfs_page *, |
| 59 | struct nfs_page *); | 59 | struct nfs_page *); |
| 60 | int (*pg_doio)(struct nfs_pageio_descriptor *); | 60 | int (*pg_doio)(struct nfs_pageio_descriptor *); |
| 61 | unsigned int (*pg_get_mirror_count)(struct nfs_pageio_descriptor *, | ||
| 62 | struct nfs_page *); | ||
| 63 | void (*pg_cleanup)(struct nfs_pageio_descriptor *); | ||
| 61 | }; | 64 | }; |
| 62 | 65 | ||
| 63 | struct nfs_rw_ops { | 66 | struct nfs_rw_ops { |
| @@ -69,18 +72,21 @@ struct nfs_rw_ops { | |||
| 69 | struct inode *); | 72 | struct inode *); |
| 70 | void (*rw_result)(struct rpc_task *, struct nfs_pgio_header *); | 73 | void (*rw_result)(struct rpc_task *, struct nfs_pgio_header *); |
| 71 | void (*rw_initiate)(struct nfs_pgio_header *, struct rpc_message *, | 74 | void (*rw_initiate)(struct nfs_pgio_header *, struct rpc_message *, |
| 75 | const struct nfs_rpc_ops *, | ||
| 72 | struct rpc_task_setup *, int); | 76 | struct rpc_task_setup *, int); |
| 73 | }; | 77 | }; |
| 74 | 78 | ||
| 75 | struct nfs_pageio_descriptor { | 79 | struct nfs_pgio_mirror { |
| 76 | struct list_head pg_list; | 80 | struct list_head pg_list; |
| 77 | unsigned long pg_bytes_written; | 81 | unsigned long pg_bytes_written; |
| 78 | size_t pg_count; | 82 | size_t pg_count; |
| 79 | size_t pg_bsize; | 83 | size_t pg_bsize; |
| 80 | unsigned int pg_base; | 84 | unsigned int pg_base; |
| 81 | unsigned char pg_moreio : 1, | 85 | unsigned char pg_recoalesce : 1; |
| 82 | pg_recoalesce : 1; | 86 | }; |
| 83 | 87 | ||
| 88 | struct nfs_pageio_descriptor { | ||
| 89 | unsigned char pg_moreio : 1; | ||
| 84 | struct inode *pg_inode; | 90 | struct inode *pg_inode; |
| 85 | const struct nfs_pageio_ops *pg_ops; | 91 | const struct nfs_pageio_ops *pg_ops; |
| 86 | const struct nfs_rw_ops *pg_rw_ops; | 92 | const struct nfs_rw_ops *pg_rw_ops; |
| @@ -91,8 +97,18 @@ struct nfs_pageio_descriptor { | |||
| 91 | struct pnfs_layout_segment *pg_lseg; | 97 | struct pnfs_layout_segment *pg_lseg; |
| 92 | struct nfs_direct_req *pg_dreq; | 98 | struct nfs_direct_req *pg_dreq; |
| 93 | void *pg_layout_private; | 99 | void *pg_layout_private; |
| 100 | unsigned int pg_bsize; /* default bsize for mirrors */ | ||
| 101 | |||
| 102 | u32 pg_mirror_count; | ||
| 103 | struct nfs_pgio_mirror *pg_mirrors; | ||
| 104 | struct nfs_pgio_mirror pg_mirrors_static[1]; | ||
| 105 | struct nfs_pgio_mirror *pg_mirrors_dynamic; | ||
| 106 | u32 pg_mirror_idx; /* current mirror */ | ||
| 94 | }; | 107 | }; |
| 95 | 108 | ||
| 109 | /* arbitrarily selected limit to number of mirrors */ | ||
| 110 | #define NFS_PAGEIO_DESCRIPTOR_MIRROR_MAX 16 | ||
| 111 | |||
| 96 | #define NFS_WBACK_BUSY(req) (test_bit(PG_BUSY,&(req)->wb_flags)) | 112 | #define NFS_WBACK_BUSY(req) (test_bit(PG_BUSY,&(req)->wb_flags)) |
| 97 | 113 | ||
| 98 | extern struct nfs_page *nfs_create_request(struct nfs_open_context *ctx, | 114 | extern struct nfs_page *nfs_create_request(struct nfs_open_context *ctx, |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index e5c3b620a609..81401125ab2d 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
| @@ -293,6 +293,7 @@ struct nfs4_layoutreturn_args { | |||
| 293 | struct nfs4_sequence_args seq_args; | 293 | struct nfs4_sequence_args seq_args; |
| 294 | struct pnfs_layout_hdr *layout; | 294 | struct pnfs_layout_hdr *layout; |
| 295 | struct inode *inode; | 295 | struct inode *inode; |
| 296 | struct pnfs_layout_range range; | ||
| 296 | nfs4_stateid stateid; | 297 | nfs4_stateid stateid; |
| 297 | __u32 layout_type; | 298 | __u32 layout_type; |
| 298 | }; | 299 | }; |
| @@ -514,6 +515,7 @@ struct nfs_pgio_res { | |||
| 514 | struct nfs4_sequence_res seq_res; | 515 | struct nfs4_sequence_res seq_res; |
| 515 | struct nfs_fattr * fattr; | 516 | struct nfs_fattr * fattr; |
| 516 | __u32 count; | 517 | __u32 count; |
| 518 | __u32 op_status; | ||
| 517 | int eof; /* used by read */ | 519 | int eof; /* used by read */ |
| 518 | struct nfs_writeverf * verf; /* used by write */ | 520 | struct nfs_writeverf * verf; /* used by write */ |
| 519 | const struct nfs_server *server; /* used by write */ | 521 | const struct nfs_server *server; /* used by write */ |
| @@ -533,6 +535,7 @@ struct nfs_commitargs { | |||
| 533 | 535 | ||
| 534 | struct nfs_commitres { | 536 | struct nfs_commitres { |
| 535 | struct nfs4_sequence_res seq_res; | 537 | struct nfs4_sequence_res seq_res; |
| 538 | __u32 op_status; | ||
| 536 | struct nfs_fattr *fattr; | 539 | struct nfs_fattr *fattr; |
| 537 | struct nfs_writeverf *verf; | 540 | struct nfs_writeverf *verf; |
| 538 | const struct nfs_server *server; | 541 | const struct nfs_server *server; |
| @@ -1326,7 +1329,8 @@ struct nfs_pgio_header { | |||
| 1326 | __u64 mds_offset; /* Filelayout dense stripe */ | 1329 | __u64 mds_offset; /* Filelayout dense stripe */ |
| 1327 | struct nfs_page_array page_array; | 1330 | struct nfs_page_array page_array; |
| 1328 | struct nfs_client *ds_clp; /* pNFS data server */ | 1331 | struct nfs_client *ds_clp; /* pNFS data server */ |
| 1329 | int ds_idx; /* ds index if ds_clp is set */ | 1332 | int ds_commit_idx; /* ds index if ds_clp is set */ |
| 1333 | int pgio_mirror_idx;/* mirror index in pgio layer */ | ||
| 1330 | }; | 1334 | }; |
| 1331 | 1335 | ||
| 1332 | struct nfs_mds_commit_info { | 1336 | struct nfs_mds_commit_info { |
diff --git a/include/linux/sunrpc/metrics.h b/include/linux/sunrpc/metrics.h index eecb5a71e6c0..7e61a17030a4 100644 --- a/include/linux/sunrpc/metrics.h +++ b/include/linux/sunrpc/metrics.h | |||
| @@ -79,6 +79,8 @@ struct rpc_clnt; | |||
| 79 | struct rpc_iostats * rpc_alloc_iostats(struct rpc_clnt *); | 79 | struct rpc_iostats * rpc_alloc_iostats(struct rpc_clnt *); |
| 80 | void rpc_count_iostats(const struct rpc_task *, | 80 | void rpc_count_iostats(const struct rpc_task *, |
| 81 | struct rpc_iostats *); | 81 | struct rpc_iostats *); |
| 82 | void rpc_count_iostats_metrics(const struct rpc_task *, | ||
| 83 | struct rpc_iostats *); | ||
| 82 | void rpc_print_iostats(struct seq_file *, struct rpc_clnt *); | 84 | void rpc_print_iostats(struct seq_file *, struct rpc_clnt *); |
| 83 | void rpc_free_iostats(struct rpc_iostats *); | 85 | void rpc_free_iostats(struct rpc_iostats *); |
| 84 | 86 | ||
| @@ -87,6 +89,8 @@ void rpc_free_iostats(struct rpc_iostats *); | |||
| 87 | static inline struct rpc_iostats *rpc_alloc_iostats(struct rpc_clnt *clnt) { return NULL; } | 89 | static inline struct rpc_iostats *rpc_alloc_iostats(struct rpc_clnt *clnt) { return NULL; } |
| 88 | static inline void rpc_count_iostats(const struct rpc_task *task, | 90 | static inline void rpc_count_iostats(const struct rpc_task *task, |
| 89 | struct rpc_iostats *stats) {} | 91 | struct rpc_iostats *stats) {} |
| 92 | static inline void rpc_count_iostats_metrics(const struct rpc_task *, | ||
| 93 | struct rpc_iostats *) {} | ||
| 90 | static inline void rpc_print_iostats(struct seq_file *seq, struct rpc_clnt *clnt) {} | 94 | static inline void rpc_print_iostats(struct seq_file *seq, struct rpc_clnt *clnt) {} |
| 91 | static inline void rpc_free_iostats(struct rpc_iostats *stats) {} | 95 | static inline void rpc_free_iostats(struct rpc_iostats *stats) {} |
| 92 | 96 | ||
