On Fri, Jul 11, 2008 at 10:32:57AM +1000, Timothy Shimmin wrote:
> Christoph Hellwig wrote:
> > On Wed, Jul 09, 2008 at 06:58:21PM +1000, Timothy Shimmin wrote:
> >>> - if (ia_valid & (ATTR_MTIME_SET | ATTR_ATIME_SET))
> >>> - flags |= ATTR_UTIME;
> >>> -#ifdef ATTR_NO_BLOCK
> >>> - if ((ia_valid & ATTR_NO_BLOCK))
> >>> - flags |= ATTR_NONBLOCK;
> >>> -#endif
> >>> -
> >> So this code looks different.
> >> We are now dropping the flags. Why is that?
> >> Presumably because we were mapping ia_valid's:
> >> ATTR_MTIME_SET or ATTR_ATIME_SET --> ATTR_UTIME
> >> ATTR_NO_BLOCK -> ATTR_NONBLOCK
> >> But now we pass ATTR_?TIME_SET and ATTR_NO_BLOCK straight thru.
> >> So previously we didn't map them onto va_mask bits but as separate flags
> >> instead.
> > Yeah, not that ATTR_NO_BLOCK doesn't actually exist in any tree I have
> > access to, and thus it's not actually handled in the new xfs_setattr.
Look in SLES9 and SLES10. It's used to enable the NFS server to
return EAGAIN for truncates that might block for a long time. This
can occur if a file migration to/from HSM is in progress. This will
return EJUKEBOX to NFS clients to prevent them from unnecessarily
resending the truncate over the wire due to timeouts and blocking
multiple (potentially all) nfsds trying to service the truncate....
It's just that someone here NACKed the mainline patches to the
NFS server to set this flag.... ;)