Hi @Hmpf,

Thanks for filing a bug report.

I had a look at the changes between 5.4.0-70-generic and
5.4.0-71-generic, and I found three patches for CIFS:

$ git log --grep "cifs" Ubuntu-5.4.0-70.78..Ubuntu-5.4.0-71.79
https://paste.ubuntu.com/p/YgrZcN8B6j/

I had a read of the patches, and I think that this one is causing
problems for you.

commit 21b200d091826a83aafc95d847139b2b0582f6d1
Author: Aurelien Aptel <aap...@suse.com>
Date:   Fri Feb 5 15:42:48 2021 +0100
Subject: cifs: report error instead of invalid when revalidating a dentry fails
Link: 
https://github.com/torvalds/linux/commit/21b200d091826a83aafc95d847139b2b0582f6d1

This was backported to 5.4.0-71-generic through upstream stable in the
below patch:

https://paste.ubuntu.com/p/8FWhRNr8KW/

Now, I think it is that commit due to the error message you are seeing:

CIFS VFS: cifs_read_super: get root inode failed

The commit changes how errors are passed back to the VFS. What it did
before was just return 0 (invalid) on any error at all, when
cifs_revalidate_dentry() failed.

What it does now is send 0 on ENOENT and ESTALE, and the actual error
number on any other error. I think you are getting an "other" error, and
cifs isn't sure what to do with it.

Now, looking at cifs_read_super(), where the error message came from:

 150 static int
 151 cifs_read_super(struct super_block *sb)
 152 {
 ...
 205     rc = super_setup_bdi(sb);
 206     if (rc)
 207         goto out_no_root;
 ...
 213     inode = cifs_root_iget(sb);
 214 
 215     if (IS_ERR(inode)) {
 216         rc = PTR_ERR(inode);
 217         goto out_no_root;
 218     }
 ...
 225     sb->s_root = d_make_root(inode);
 226     if (!sb->s_root) {
 227         rc = -ENOMEM;
 228         goto out_no_root;
 229     }
 ...
 240 out_no_root:
 241     cifs_dbg(VFS, "%s: get root inode failed\n", __func__);
 242     return rc;
 243 }
 
We see the out_no_root label is really just a catch-all error handler, and 
doesn't really tell us what happened, or try to handle the error.

Looking at the code added by the commit, it added a new debug string:

737 static int
738 cifs_d_revalidate(struct dentry *direntry, unsigned int flags)
739 {
...
751         rc = cifs_revalidate_dentry(direntry);
752         if (rc) {
753             cifs_dbg(FYI, "cifs_revalidate_dentry failed with rc=%d", rc);

We can use this string to see what the actual error is, but it is turned
off by default, which is why it doesn't appear in dmesg.

Would you be able to turn on this extra error message so we can keep
helping you to figure out what is happening?

You can turn on extra debugging with instruction from:
https://wiki.samba.org/index.php/LinuxCIFS_troubleshooting

1) sudo -s
2) echo 'module cifs +p' > /sys/kernel/debug/dynamic_debug/control
3) echo 'file fs/cifs/* +p' > /sys/kernel/debug/dynamic_debug/control
4) echo 7 > /proc/fs/cifs/cifsFYI
5) exit

Then, try your mount command and then try ls on that dentry file.

If you check dmesg, you will get much more logging. What we are
interested in will be a line with "cifs_revalidate_dentry failed with
rc" and then an error number.

We can then look up what the number is, and try go from there.

The easiest way to turn off the extra debug logging is to reboot your
system. Or you can run:

1) sudo -s
2) echo 0 > /proc/fs/cifs/cifsFYI
3) exit

But rebooting is probably easier for you.

Attach your new dmesg to the launchpad bug, and I will have a look. You
might want to remove the URL of your company cifs share and any
usernames before you upload.

Let me know if you have any questions.

Thanks,
Matthew

** Tags added: seg

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1923670

Title:
  CIFS DFS entries not accessible with 5.4.0-71.74-generic

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1923670/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to