ea: refactor SetEaInfo for use on open
when open is given an ea buffer, pass it to new function nfs41_ea_set() after successful file creation. matches NTFS behavior on all dispositions: sets EAs on FILE_CREATE, FILE_OVERWRITE, FILE_OVERWRITE_IF, FILE_SUPERSEDE. does not set EAs on FILE_OPEN. only sets EAs on FILE_OPEN_IF if file did not previously exist. see new function create_with_ea() nfs41_ea_set() returns nfs error codes. uses NFS4ERR_FBIG when the EaValueLength exceeds NFS4_EASIZE (256). this gets mapped to windows error ERROR_FILE_TOO_LARGE, which the driver now converts to STATUS_EA_TOO_LARGE Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
parent
5a4439a894
commit
b2e6a60710
5 changed files with 151 additions and 83 deletions
|
|
@ -4524,6 +4524,7 @@ NTSTATUS map_setea_error(
|
|||
case ERROR_NOT_SUPPORTED: return STATUS_NOT_IMPLEMENTED;
|
||||
case ERROR_NETWORK_ACCESS_DENIED: return STATUS_NETWORK_ACCESS_DENIED;
|
||||
case ERROR_NETNAME_DELETED: return STATUS_NETWORK_NAME_DELETED;
|
||||
case ERROR_FILE_TOO_LARGE: return STATUS_EA_TOO_LARGE;
|
||||
case ERROR_BUFFER_OVERFLOW: return STATUS_INSUFFICIENT_RESOURCES;
|
||||
default:
|
||||
print_error("failed to map windows error %d to NTSTATUS; "
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue