regression when opening directories on NFSv4

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

 



We had a regression reported against RHEL concerning the opening of
directories and it looks like that same problem is in current mainline
code too. If you do the following on a directory that is not yet in the
dcache you get an EISDIR error:

     open("/mnt/nfs/dir1", O_RDONLY)         = -1 EISDIR (Is a directory)

If however, you stat the directory first, the open works. The
difference seems to be that in the first case we're going through the
lookup codepath, and in the second we go through d_revalidate.

In the first case, we send an OPEN call to the server and it responds
with NFS4ERR_ISDIR. That gets translated to -EISDIR, and returned to
userspace. It wasn't always this way though, and I think the regression
was introduced in commit d953126a2.

That patch was added to fix an oops due to a buggy server, and I'm
unclear on how best to fix this. It seems like we need to allow the
server to fall back to doing a normal lookup when we get -EISDIR on the
OPEN call, but how do we ensure that we don't end up with the same oops
from that server bug?

Thoughts?
-- 
Jeff Layton <jlayton@xxxxxxxxxx>
--
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