lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1228263715.7852.80.camel@heimdal.trondhjem.org>
Date:	Tue, 02 Dec 2008 19:21:55 -0500
From:	Trond Myklebust <trond.myklebust@....uio.no>
To:	Russell Miller <duskglow@...il.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: NFS directory listing hang on write.

On Tue, 2008-12-02 at 16:05 -0800, Russell Miller wrote:
> Hi, all.  We're having some NFS problems here that I don't understand.
> 
> The arguments are standard.  wsize=32768,rsize=32768,tcp.  Nothing
> else out of the ordinary.  Test case is easy too:
> 
> mount a filesystem.
> cd into the directory.
> create a 1G file and background the creation, so 1G is being written
> into the directory.
> Then, try to ls the directory.
> 
> The ls will hang, sometimes for a few seconds, sometimes for the
> entire length of the write.  This happens on every NFS server I've
> tried, including an acopia, bluearc, onstor, and a generic linux box
> running on the other end.

That is known and expected behaviour. It is not a bug.

The reason is that your 'ls' is also trying to stat() the file, and so
the client has to flush out all those writes in order to ensure that the
mtime/ctime are posixly correct.
By this, I mean that POSIX requires the filesystem to update the
mtime/ctime every time you issue a write() call. In the case of NFS,
this update is actually done when the client sends the WRITE rpc call to
to the server. IOW: in order to ensure that your mtime/ctime doesn't
change after you've issued the stat() call, we actually need to flush
out those backgrounded writes and wait for them to complete.

Cheers
  Trond

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ