175{
185
188
189retry_write:
192 reloffset = 0;
196
197 if (to_send > maxwritesize)
198 dprintf(1,
"handle_nfs41_write: writing %d in chunks of %d\n",
199 to_send, maxwritesize);
200
201 while(to_send > 0) {
203
205 args->offset + reloffset, stable, &bytes_written, &verf, &
info);
209 to_send -= bytes_written;
210 len += bytes_written;
211 reloffset += bytes_written;
214 break;
215 }
217 if (retries--) goto retry_write;
218 goto out_verify_failed;
219 }
220 }
222 dprintf(1,
"sending COMMIT for offset=%d and len=%d\n",
args->offset,
len);
226
228 if (retries--) goto retry_write;
229 goto out_verify_failed;
230 }
238 }
243
244out_verify_failed:
248}
#define MAX_WRITE_RETRIES
bool_t verify_write(IN nfs41_write_verf *verf, IN OUT enum stable_how4 *stable)
bool_t verify_commit(IN nfs41_write_verf *verf)
uint32_t max_write_size(IN const nfs41_session *session, IN const nfs41_fh *fh)
static __inline void nfs41_superblock_getattr_mask(IN const nfs41_superblock *superblock, OUT bitmap4 *attrs)
int nfs41_getattr(IN nfs41_session *session, IN OPTIONAL nfs41_path_fh *file, IN bitmap4 *attr_request, OUT nfs41_file_info *info)
int nfs41_write(IN nfs41_session *session, IN nfs41_path_fh *file, IN stateid_arg *stateid, IN unsigned char *data, IN uint32_t data_len, IN uint64_t offset, IN enum stable_how4 stable, OUT uint32_t *bytes_written, OUT nfs41_write_verf *verf, OUT nfs41_file_info *cinfo)
int nfs41_commit(IN nfs41_session *session, IN nfs41_path_fh *file, IN uint64_t offset, IN uint32_t count, IN bool_t do_getattr, OUT nfs41_write_verf *verf, OUT nfs41_file_info *cinfo)