Post-r248567, there were times when the client would return a
truncated directory for some NFS servers. This turned out to be because the size of a directory reported by an NFS server can be smaller that the ufs-like directory created from the RPC XDR in the client. This patch fixes the problem by changing r248567 so that vnode_pager_setsize() is only done for regular files. Reported and tested by: hartmut.brandt@dlr.de Reviewed by: kib MFC after: 1 week
This commit is contained in:
parent
c2cfcb6063
commit
734b03c38d
@ -448,12 +448,10 @@ nfscl_loadattrcache(struct vnode **vpp, struct nfsvattr *nap, void *nvaper,
|
|||||||
np->n_size = vap->va_size;
|
np->n_size = vap->va_size;
|
||||||
np->n_flag |= NSIZECHANGED;
|
np->n_flag |= NSIZECHANGED;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
np->n_size = vap->va_size;
|
|
||||||
}
|
|
||||||
if (vap->va_type == VREG || vap->va_type == VDIR) {
|
|
||||||
setnsize = 1;
|
setnsize = 1;
|
||||||
nsize = vap->va_size;
|
nsize = vap->va_size;
|
||||||
|
} else {
|
||||||
|
np->n_size = vap->va_size;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user