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:
Casey Bodley 2012-04-06 16:15:24 -04:00 committed by unknown
parent 5a4439a894
commit b2e6a60710
5 changed files with 151 additions and 83 deletions

View file

@ -1250,6 +1250,9 @@ int nfs41_remove(
if (compound_error(status = compound.res.status))
goto out;
if (info.type == NF4ATTRDIR)
goto out;
/* update the attributes of the parent directory */
memcpy(&info.attrmask, &getattr_res.obj_attributes.attrmask,
sizeof(bitmap4));