Re: [NFS] [PATCH] NFS server does not update mtime on setattr request

From: Peter Staubach
Date: Wed Jun 07 2006 - 12:55:23 EST


J. Bruce Fields wrote:

On Wed, Jun 07, 2006 at 11:50:31AM -0400, Peter Staubach wrote:


The Red Hat BZ number is 193621.



"You are not authorized to access bug #193621", it tells me....




Hmm. That ones seems to be restricted for some reason. I think that
this happens when we get escalated bugzillas from customers.


The description is that when zero length files are copied, even over
an existing zero length file, the mtime on the target file does not
change.



Is the server-side patch sufficient on its own?



The server side patch isn't quite sufficient on its own. A RHEL-4 patch
is also required for the client side. I could construct the RHEL-4 patch
so that it alone would be sufficient to address the particular problem
that that customer is having, but that isn't the entire situation.
Non-Linux clients would still have a problem with the current upstream
Linux server. For example, in my testing, a Solaris 10 client mounting
an FC-5 server fails. When running the attached script, the mtime on
the file, bar, should change by about 1 minute, 3 times.

Thanx...

ps #!/bin/sh

rm -f foo bar

set -x

touch foo

cp foo bar

stat --format="%n %y" foo bar

sleep 60

cp foo bar

stat --format="%n %y" foo bar

sleep 60

cp foo bar

stat --format="%n %y" foo bar

sleep 60

rm foo

touch foo

cp foo bar

stat --format="%n %y" foo bar