pnfs: send GETATTR after FILE_SYNC ds writes
in the case of ds writes returning FILE_SYNC, we don't need to send a COMMIT or LAYOUTCOMMIT to the mds. COMMIT and LAYOUTCOMMIT, however, are the places where we do GETATTR(size) to update the attribute cache. so we must add a separate call to GETATTR to accomplish this after ds writes return FILE_SYNC Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
parent
1f7e560a9a
commit
7efeb31a16
1 changed files with 7 additions and 1 deletions
|
|
@ -571,6 +571,12 @@ enum pnfs_status pnfs_write(
|
|||
} else if (stable == DATA_SYNC4) {
|
||||
/* send LAYOUTCOMMIT to sync the metadata */
|
||||
status = layout_commit(state, layout, offset, *len_out);
|
||||
} else {
|
||||
/* send a GETATTR to update the cached size */
|
||||
nfs41_file_info info = { 0 };
|
||||
bitmap4 attr_request;
|
||||
init_getattr_request(&attr_request);
|
||||
nfs41_getattr(state->session, &state->file, &attr_request, &info);
|
||||
}
|
||||
out_free_pattern:
|
||||
pattern_free(&pattern);
|
||||
|
|
@ -578,4 +584,4 @@ out:
|
|||
dprintf(IOLVL, "<-- pnfs_write() returning %s\n",
|
||||
pnfs_error_string(status));
|
||||
return status;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue