Re: readdir and old cookie verifier

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 08, 2015 at 03:08:32PM +0200, Mkrtchyan, Tigran wrote:
> 
> Dear NFS gurus,
> 
> we run into situation, where client gets BAD_COOKIE on a readdir.
> Before I go and try to adopt our server to handle it, let me describe
> the situation.
> 
> A client node (we have seen it with RHEL6 and Ubuntu 12.04, but probably
> others affected as well) send a bunch of readdirs to the server. After some
> time (this many be hours, days ) client sends an other set of readdirs.

Starting over with cookie zero, or resuming using some cached cookie?

> But
> it reuses cookie verifier from the first readdir sequence. Server sends back
> BAD_COOKIE, but client never starts over with a cookie and verifier being zero.

I don't think it's really required to do that.  7530 suggests that might
indeed result in an error:

	It should be a rare occurrence that a server is unable to
	continue properly reading a directory with the provided
	cookie/cookieverf pair.  The server should make every effort to
	avoid this condition since the application at the client may not
	be able to properly handle this type of failure.

(Also, RFC 7530 16.24.4 says NOT_SAME is the error in this case.  Is
that really correct?  I would have expected BAD_COOKIE too.)

> As a result, inconsistent listing and anhappy user:
> 
> 
> [exflserv04] ~ $ ls /pnfs/desy.de/exfel/disk/LCLS/2015/RAW/XCS/xcsh8215/xtc/
> ls: reading directory /pnfs/desy.de/exfel/disk/LCLS/2015/RAW/XCS/xcsh8215/xtc/: Unknown error 523

That's EBADCOOKIE.

> Is this behavior of the client correct?

I think so.  It's a huge pain for filesystems, but unfortunately readdir
cookies (like filehandles) are forever.

--b.
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux