xfs
[Top] [All Lists]

Re: [PATCH 2/3] simplify xfs_setattr

To: Timothy Shimmin <tes@xxxxxxx>
Subject: Re: [PATCH 2/3] simplify xfs_setattr
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Fri, 11 Jul 2008 11:07:59 +1000
Cc: Christoph Hellwig <hch@xxxxxx>, xfs@xxxxxxxxxxx
In-reply-to: <4876AA39.804@xxxxxxx>
Mail-followup-to: Timothy Shimmin <tes@xxxxxxx>, Christoph Hellwig <hch@xxxxxx>, xfs@xxxxxxxxxxx
References: <20080627154557.GB31476@xxxxxx> <20080705172021.GA7177@xxxxxx> <48747DAD.7060501@xxxxxxx> <20080709162914.GA16308@xxxxxx> <4876AA39.804@xxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.17+20080114 (2008-01-14)
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.... ;)

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx


<Prev in Thread] Current Thread [Next in Thread>