Re: new regression from cifs open on lookup patches

Jeff Layton <[email protected]>
Newsgroups gmane.linux.file-systems.cifs
Message-ID <[email protected]>
On Fri, 22 May 2009 07:48:44 -0400
Jeff Layton <[email protected]> wrote:

> I've run across a new regression due to the open on lookup patches when
> working against a server with functioning posix open calls. Prior to
> those patches, opening a directory would simply result in a
> revalidation of the dir, at most this would mean a QPathInfo call would
> go out on the wire.
> 
> Since the introduction of these patches, opening a directory causes an
> actual open call to go out on the wire for the directory. In general,
> the server will then return a status of NT_STATUS_FILE_IS_A_DIRECTORY
> that gets translated to -EACCES.
> 
> The main place I've noticed this is when trying recursively remove a
> directory (rm -rf). rm will openat(AT_FDCWD, ...) the dir, and then try
> to walk the subdirectories. That fails. Backing out the open intent
> patches fixes the problem.
> 
> This will definitely need to be fixed before 2.6.30 is released, as I'm
> certain this will break more than "rm". Attaching a testcase that can
> be used to test this.
> 

I should note that it doesn't always have this behavior. It seems to
depend on either the inode or dentry caches to some degree. For
instance:

[root@rawhide ~]# ./opendir /mnt/cifs/fsstress
openat returned 13

[root@rawhide ~]# stat !$
stat /mnt/cifs/fsstress
  File: `/mnt/cifs/fsstress'
  Size: 0         	Blocks: 0          IO Block: 16384  directory
Device: 13h/19d	Inode: 197227      Links: 9
Access: (0755/drwxr-xr-x)  Uid: (   99/  nobody)   Gid: (   99/  nobody)
Access: 2009-05-22 07:57:11.849080800 -0400
Modify: 2009-05-22 07:45:24.342983400 -0400
Change: 2009-05-22 07:45:24.342983400 -0400

[root@rawhide ~]# ./opendir /mnt/cifs/fsstress
success

-- 
Jeff Layton <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.