dont set size of open for named attrs file

opens for create unchecked shouldn't have a non-zero size. if it does
it will either be ignored or flagged as an error.

casey notes that every open of named attributes is a create open.
even though we know the size of the file we are about to write,
we need to truncate it first, as setting the size will be ignored
by the server, leading to keeping the old size.
This commit is contained in:
Olga Kornievskaia 2012-06-11 12:12:26 -04:00
parent 896639df69
commit 1d47cba1af

View file

@ -73,7 +73,7 @@ static int set_ea_value(
createattrs.attrmask.count = 2; createattrs.attrmask.count = 2;
createattrs.attrmask.arr[0] = FATTR4_WORD0_SIZE; createattrs.attrmask.arr[0] = FATTR4_WORD0_SIZE;
createattrs.attrmask.arr[1] = FATTR4_WORD1_MODE; createattrs.attrmask.arr[1] = FATTR4_WORD1_MODE;
createattrs.size = ea->EaValueLength; createattrs.size = 0;
createattrs.mode = 0664; createattrs.mode = 0664;
status = nfs41_open(session, parent, &file, owner, &claim, status = nfs41_open(session, parent, &file, owner, &claim,