diff options
-rw-r--r-- | fs/nfs/nfs2xdr.c | 6 | ||||
-rw-r--r-- | fs/nfs/nfs3xdr.c | 8 | ||||
-rw-r--r-- | fs/nfs/nfs4xdr.c | 9 | ||||
-rw-r--r-- | fs/nfs/read.c | 2 | ||||
-rw-r--r-- | fs/nfs/write.c | 2 | ||||
-rw-r--r-- | include/linux/nfs_xdr.h | 32 |
6 files changed, 26 insertions, 33 deletions
diff --git a/fs/nfs/nfs2xdr.c b/fs/nfs/nfs2xdr.c index 461cd8bd9401..5f61b83f4a1c 100644 --- a/fs/nfs/nfs2xdr.c +++ b/fs/nfs/nfs2xdr.c | |||
@@ -103,7 +103,7 @@ static void print_overflow_msg(const char *func, const struct xdr_stream *xdr) | |||
103 | /* | 103 | /* |
104 | * typedef opaque nfsdata<>; | 104 | * typedef opaque nfsdata<>; |
105 | */ | 105 | */ |
106 | static int decode_nfsdata(struct xdr_stream *xdr, struct nfs_readres *result) | 106 | static int decode_nfsdata(struct xdr_stream *xdr, struct nfs_pgio_res *result) |
107 | { | 107 | { |
108 | u32 recvd, count; | 108 | u32 recvd, count; |
109 | __be32 *p; | 109 | __be32 *p; |
@@ -857,7 +857,7 @@ out_default: | |||
857 | * }; | 857 | * }; |
858 | */ | 858 | */ |
859 | static int nfs2_xdr_dec_readres(struct rpc_rqst *req, struct xdr_stream *xdr, | 859 | static int nfs2_xdr_dec_readres(struct rpc_rqst *req, struct xdr_stream *xdr, |
860 | struct nfs_readres *result) | 860 | struct nfs_pgio_res *result) |
861 | { | 861 | { |
862 | enum nfs_stat status; | 862 | enum nfs_stat status; |
863 | int error; | 863 | int error; |
@@ -878,7 +878,7 @@ out_default: | |||
878 | } | 878 | } |
879 | 879 | ||
880 | static int nfs2_xdr_dec_writeres(struct rpc_rqst *req, struct xdr_stream *xdr, | 880 | static int nfs2_xdr_dec_writeres(struct rpc_rqst *req, struct xdr_stream *xdr, |
881 | struct nfs_writeres *result) | 881 | struct nfs_pgio_res *result) |
882 | { | 882 | { |
883 | /* All NFSv2 writes are "file sync" writes */ | 883 | /* All NFSv2 writes are "file sync" writes */ |
884 | result->verf->committed = NFS_FILE_SYNC; | 884 | result->verf->committed = NFS_FILE_SYNC; |
diff --git a/fs/nfs/nfs3xdr.c b/fs/nfs/nfs3xdr.c index 02f16c212007..8f4cbe7f4aa8 100644 --- a/fs/nfs/nfs3xdr.c +++ b/fs/nfs/nfs3xdr.c | |||
@@ -1589,7 +1589,7 @@ out_default: | |||
1589 | * }; | 1589 | * }; |
1590 | */ | 1590 | */ |
1591 | static int decode_read3resok(struct xdr_stream *xdr, | 1591 | static int decode_read3resok(struct xdr_stream *xdr, |
1592 | struct nfs_readres *result) | 1592 | struct nfs_pgio_res *result) |
1593 | { | 1593 | { |
1594 | u32 eof, count, ocount, recvd; | 1594 | u32 eof, count, ocount, recvd; |
1595 | __be32 *p; | 1595 | __be32 *p; |
@@ -1625,7 +1625,7 @@ out_overflow: | |||
1625 | } | 1625 | } |
1626 | 1626 | ||
1627 | static int nfs3_xdr_dec_read3res(struct rpc_rqst *req, struct xdr_stream *xdr, | 1627 | static int nfs3_xdr_dec_read3res(struct rpc_rqst *req, struct xdr_stream *xdr, |
1628 | struct nfs_readres *result) | 1628 | struct nfs_pgio_res *result) |
1629 | { | 1629 | { |
1630 | enum nfs_stat status; | 1630 | enum nfs_stat status; |
1631 | int error; | 1631 | int error; |
@@ -1673,7 +1673,7 @@ out_status: | |||
1673 | * }; | 1673 | * }; |
1674 | */ | 1674 | */ |
1675 | static int decode_write3resok(struct xdr_stream *xdr, | 1675 | static int decode_write3resok(struct xdr_stream *xdr, |
1676 | struct nfs_writeres *result) | 1676 | struct nfs_pgio_res *result) |
1677 | { | 1677 | { |
1678 | __be32 *p; | 1678 | __be32 *p; |
1679 | 1679 | ||
@@ -1697,7 +1697,7 @@ out_eio: | |||
1697 | } | 1697 | } |
1698 | 1698 | ||
1699 | static int nfs3_xdr_dec_write3res(struct rpc_rqst *req, struct xdr_stream *xdr, | 1699 | static int nfs3_xdr_dec_write3res(struct rpc_rqst *req, struct xdr_stream *xdr, |
1700 | struct nfs_writeres *result) | 1700 | struct nfs_pgio_res *result) |
1701 | { | 1701 | { |
1702 | enum nfs_stat status; | 1702 | enum nfs_stat status; |
1703 | int error; | 1703 | int error; |
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index 032159c36a57..939ae606cfa4 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c | |||
@@ -5087,7 +5087,8 @@ static int decode_putrootfh(struct xdr_stream *xdr) | |||
5087 | return decode_op_hdr(xdr, OP_PUTROOTFH); | 5087 | return decode_op_hdr(xdr, OP_PUTROOTFH); |
5088 | } | 5088 | } |
5089 | 5089 | ||
5090 | static int decode_read(struct xdr_stream *xdr, struct rpc_rqst *req, struct nfs_readres *res) | 5090 | static int decode_read(struct xdr_stream *xdr, struct rpc_rqst *req, |
5091 | struct nfs_pgio_res *res) | ||
5091 | { | 5092 | { |
5092 | __be32 *p; | 5093 | __be32 *p; |
5093 | uint32_t count, eof, recvd; | 5094 | uint32_t count, eof, recvd; |
@@ -5341,7 +5342,7 @@ static int decode_setclientid_confirm(struct xdr_stream *xdr) | |||
5341 | return decode_op_hdr(xdr, OP_SETCLIENTID_CONFIRM); | 5342 | return decode_op_hdr(xdr, OP_SETCLIENTID_CONFIRM); |
5342 | } | 5343 | } |
5343 | 5344 | ||
5344 | static int decode_write(struct xdr_stream *xdr, struct nfs_writeres *res) | 5345 | static int decode_write(struct xdr_stream *xdr, struct nfs_pgio_res *res) |
5345 | { | 5346 | { |
5346 | __be32 *p; | 5347 | __be32 *p; |
5347 | int status; | 5348 | int status; |
@@ -6638,7 +6639,7 @@ out: | |||
6638 | * Decode Read response | 6639 | * Decode Read response |
6639 | */ | 6640 | */ |
6640 | static int nfs4_xdr_dec_read(struct rpc_rqst *rqstp, struct xdr_stream *xdr, | 6641 | static int nfs4_xdr_dec_read(struct rpc_rqst *rqstp, struct xdr_stream *xdr, |
6641 | struct nfs_readres *res) | 6642 | struct nfs_pgio_res *res) |
6642 | { | 6643 | { |
6643 | struct compound_hdr hdr; | 6644 | struct compound_hdr hdr; |
6644 | int status; | 6645 | int status; |
@@ -6663,7 +6664,7 @@ out: | |||
6663 | * Decode WRITE response | 6664 | * Decode WRITE response |
6664 | */ | 6665 | */ |
6665 | static int nfs4_xdr_dec_write(struct rpc_rqst *rqstp, struct xdr_stream *xdr, | 6666 | static int nfs4_xdr_dec_write(struct rpc_rqst *rqstp, struct xdr_stream *xdr, |
6666 | struct nfs_writeres *res) | 6667 | struct nfs_pgio_res *res) |
6667 | { | 6668 | { |
6668 | struct compound_hdr hdr; | 6669 | struct compound_hdr hdr; |
6669 | int status; | 6670 | int status; |
diff --git a/fs/nfs/read.c b/fs/nfs/read.c index 46d555206023..473bba35a2cb 100644 --- a/fs/nfs/read.c +++ b/fs/nfs/read.c | |||
@@ -471,7 +471,7 @@ int nfs_readpage_result(struct rpc_task *task, struct nfs_read_data *data) | |||
471 | static void nfs_readpage_retry(struct rpc_task *task, struct nfs_read_data *data) | 471 | static void nfs_readpage_retry(struct rpc_task *task, struct nfs_read_data *data) |
472 | { | 472 | { |
473 | struct nfs_pgio_args *argp = &data->args; | 473 | struct nfs_pgio_args *argp = &data->args; |
474 | struct nfs_readres *resp = &data->res; | 474 | struct nfs_pgio_res *resp = &data->res; |
475 | 475 | ||
476 | /* This is a short read! */ | 476 | /* This is a short read! */ |
477 | nfs_inc_stats(data->header->inode, NFSIOS_SHORTREAD); | 477 | nfs_inc_stats(data->header->inode, NFSIOS_SHORTREAD); |
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 25ba3830ec8b..d392a70092fe 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c | |||
@@ -1389,7 +1389,7 @@ static int nfs_should_remove_suid(const struct inode *inode) | |||
1389 | void nfs_writeback_done(struct rpc_task *task, struct nfs_write_data *data) | 1389 | void nfs_writeback_done(struct rpc_task *task, struct nfs_write_data *data) |
1390 | { | 1390 | { |
1391 | struct nfs_pgio_args *argp = &data->args; | 1391 | struct nfs_pgio_args *argp = &data->args; |
1392 | struct nfs_writeres *resp = &data->res; | 1392 | struct nfs_pgio_res *resp = &data->res; |
1393 | struct inode *inode = data->header->inode; | 1393 | struct inode *inode = data->header->inode; |
1394 | int status; | 1394 | int status; |
1395 | 1395 | ||
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 5875001928f9..381f832b03c6 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
@@ -489,16 +489,6 @@ struct nfs4_delegreturnres { | |||
489 | }; | 489 | }; |
490 | 490 | ||
491 | /* | 491 | /* |
492 | * Arguments to the read call. | ||
493 | */ | ||
494 | struct nfs_readres { | ||
495 | struct nfs4_sequence_res seq_res; | ||
496 | struct nfs_fattr * fattr; | ||
497 | __u32 count; | ||
498 | int eof; | ||
499 | }; | ||
500 | |||
501 | /* | ||
502 | * Arguments to the write call. | 492 | * Arguments to the write call. |
503 | */ | 493 | */ |
504 | struct nfs_write_verifier { | 494 | struct nfs_write_verifier { |
@@ -510,14 +500,6 @@ struct nfs_writeverf { | |||
510 | enum nfs3_stable_how committed; | 500 | enum nfs3_stable_how committed; |
511 | }; | 501 | }; |
512 | 502 | ||
513 | struct nfs_writeres { | ||
514 | struct nfs4_sequence_res seq_res; | ||
515 | struct nfs_fattr * fattr; | ||
516 | struct nfs_writeverf * verf; | ||
517 | __u32 count; | ||
518 | const struct nfs_server *server; | ||
519 | }; | ||
520 | |||
521 | /* | 503 | /* |
522 | * Arguments shared by the read and write call. | 504 | * Arguments shared by the read and write call. |
523 | */ | 505 | */ |
@@ -535,6 +517,16 @@ struct nfs_pgio_args { | |||
535 | enum nfs3_stable_how stable; /* used by write */ | 517 | enum nfs3_stable_how stable; /* used by write */ |
536 | }; | 518 | }; |
537 | 519 | ||
520 | struct nfs_pgio_res { | ||
521 | struct nfs4_sequence_res seq_res; | ||
522 | struct nfs_fattr * fattr; | ||
523 | __u32 count; | ||
524 | int eof; /* used by read */ | ||
525 | struct nfs_writeverf * verf; /* used by write */ | ||
526 | const struct nfs_server *server; /* used by write */ | ||
527 | |||
528 | }; | ||
529 | |||
538 | /* | 530 | /* |
539 | * Arguments to the commit call. | 531 | * Arguments to the commit call. |
540 | */ | 532 | */ |
@@ -1261,7 +1253,7 @@ struct nfs_read_data { | |||
1261 | struct rpc_task task; | 1253 | struct rpc_task task; |
1262 | struct nfs_fattr fattr; /* fattr storage */ | 1254 | struct nfs_fattr fattr; /* fattr storage */ |
1263 | struct nfs_pgio_args args; | 1255 | struct nfs_pgio_args args; |
1264 | struct nfs_readres res; | 1256 | struct nfs_pgio_res res; |
1265 | unsigned long timestamp; /* For lease renewal */ | 1257 | unsigned long timestamp; /* For lease renewal */ |
1266 | int (*read_done_cb) (struct rpc_task *task, struct nfs_read_data *data); | 1258 | int (*read_done_cb) (struct rpc_task *task, struct nfs_read_data *data); |
1267 | __u64 mds_offset; | 1259 | __u64 mds_offset; |
@@ -1313,7 +1305,7 @@ struct nfs_write_data { | |||
1313 | struct nfs_fattr fattr; | 1305 | struct nfs_fattr fattr; |
1314 | struct nfs_writeverf verf; | 1306 | struct nfs_writeverf verf; |
1315 | struct nfs_pgio_args args; /* argument struct */ | 1307 | struct nfs_pgio_args args; /* argument struct */ |
1316 | struct nfs_writeres res; /* result struct */ | 1308 | struct nfs_pgio_res res; /* result struct */ |
1317 | unsigned long timestamp; /* For lease renewal */ | 1309 | unsigned long timestamp; /* For lease renewal */ |
1318 | int (*write_done_cb) (struct rpc_task *task, struct nfs_write_data *data); | 1310 | int (*write_done_cb) (struct rpc_task *task, struct nfs_write_data *data); |
1319 | __u64 mds_offset; /* Filelayout dense stripe */ | 1311 | __u64 mds_offset; /* Filelayout dense stripe */ |