When the client is reading or writing using pNFS, and hits an error on the DS, then it typically sends a LAYOUTERROR and/or LAYOUTRETURN to the MDS, before redirtying the failed pages, and going for a new round of reads/writebacks. The problem is that if the server has no way to fix the DS, then we may need a way to interrupt this loop after a set number of attempts have been made. This patch adds an optional module parameter that allows the admin to specify how many times to retry the read/writeback process before failing with a fatal error. The default behaviour is to retry forever.
Showing the changes to include/linux (1 of 5 files). Show all
Unified · Split
| @@ -53,6 +53,7 @@ struct nfs_page { · 52 unmodified lines | |||
| 53 | struct nfs_write_verifier wb_verf; /* Commit cookie */ | 53 | struct nfs_write_verifier wb_verf; /* Commit cookie */ |
| 54 | struct nfs_page *wb_this_page; /* list of reqs for this page */ | 54 | struct nfs_page *wb_this_page; /* list of reqs for this page */ |
| 55 | struct nfs_page *wb_head; /* head pointer for req list */ | 55 | struct nfs_page *wb_head; /* head pointer for req list */ |
| 56 | unsigned short wb_nio; /* Number of I/O attempts */ | ||
| 56 | }; | 57 | }; |
| 57 | 58 | ||
| 58 | struct nfs_pageio_descriptor; | 59 | struct nfs_pageio_descriptor; |
| @@ -87,7 +88,6 @@ struct nfs_pgio_mirror { · 28 unmodified lines | |||
| 87 | }; | 88 | }; |
| 88 | 89 | ||
| 89 | struct nfs_pageio_descriptor { | 90 | struct nfs_pageio_descriptor { |
| 90 | unsigned char pg_moreio : 1; | ||
| 91 | struct inode *pg_inode; | 91 | struct inode *pg_inode; |
| 92 | const struct nfs_pageio_ops *pg_ops; | 92 | const struct nfs_pageio_ops *pg_ops; |
| 93 | const struct nfs_rw_ops *pg_rw_ops; | 93 | const struct nfs_rw_ops *pg_rw_ops; |
| @@ -105,6 +105,8 @@ struct nfs_pageio_descriptor { · 11 unmodified lines | |||
| 105 | struct nfs_pgio_mirror pg_mirrors_static[1]; | 105 | struct nfs_pgio_mirror pg_mirrors_static[1]; |
| 106 | struct nfs_pgio_mirror *pg_mirrors_dynamic; | 106 | struct nfs_pgio_mirror *pg_mirrors_dynamic; |
| 107 | u32 pg_mirror_idx; /* current mirror */ | 107 | u32 pg_mirror_idx; /* current mirror */ |
| 108 | unsigned short pg_maxretrans; | ||
| 109 | unsigned char pg_moreio : 1; | ||
| 108 | }; | 110 | }; |
| 109 | 111 | ||
| 110 | /* arbitrarily selected limit to number of mirrors */ | 112 | /* arbitrarily selected limit to number of mirrors */ |