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 Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1923670

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

Status in linux package in Ubuntu:
  Confirmed

Bug description:
  When booting 5.4.0-71-generic I can not access DFS entries anymore,
  with 5.4.0-70-generic this still works. Some details:

  fstab entry:

  //example.com/public /home/user/remote    cifs
  
noauto,vers=default,noserverino,users,_netdev,user=remote_user,domain=example.com
  0    0

  shell session
  ~$ mount /home/user/remote
  Password for remote_user@//example.com/public:
  ~$ ls /home/user/remote/dfs-folder
  dfs-subfolder dfs-entry
  ~$ ls /home/user/remote/dfs-folder/dfs-entry
  ls: cannot access '/home/user/remote/dfs-folder/dfs-entry': No such file or 
directory

  dmesg excerpt
  [ 1219.568778] CIFS: Attempting to mount 
//DC01.example.com/Public/dfs-folder/dfs-entry
  [ 1219.584975] FS-Cache: Duplicate cookie detected
  [ 1219.584986] FS-Cache: O-cookie c=000000006e995395 [p=00000000f4725c61 
fl=222 nc=0 na=1]
  [ 1219.584990] FS-Cache: O-cookie d=00000000a11c1428 n=0000000071ab21ba
  [ 1219.584993] FS-Cache: O-key=[6] '5075626c6963'
  [ 1219.585001] FS-Cache: N-cookie c=00000000a0608786 [p=00000000f4725c61 fl=2 
nc=0 na=1]
  [ 1219.585004] FS-Cache: N-cookie d=00000000a11c1428 n=00000000901f6a53
  [ 1219.585007] FS-Cache: N-key=[6] '5075626c6963'
  [ 1219.725834] FS-Cache: Duplicate cookie detected
  [ 1219.725847] FS-Cache: O-cookie c=000000006e995395 [p=00000000f4725c61 
fl=222 nc=0 na=1]
  [ 1219.725851] FS-Cache: O-cookie d=00000000a11c1428 n=0000000071ab21ba
  [ 1219.725854] FS-Cache: O-key=[6] '5075626c6963'
  [ 1219.725864] FS-Cache: N-cookie c=000000000509709f [p=00000000f4725c61 fl=2 
nc=0 na=1]
  [ 1219.725868] FS-Cache: N-cookie d=00000000a11c1428 n=00000000556f158b
  [ 1219.725870] FS-Cache: N-key=[6] '5075626c6963'
  [ 1220.216524] CIFS VFS: cifs_read_super: get root inode failed

  The dmesg from 5.4.0-70-generic does not have the line
  CIFS VFS: cifs_read_super: get root inode failed

  
  ~$ lsb_release -rd
  Description:    KDE neon User Edition 5.21
  Release:   ~$ lsb_release -rd
  Description:    KDE neon User Edition 5.21
  Release:        20.04
       20.04
  ~$ apt-cache policy linux-image-generic
  linux-image-generic:
    Installed: 5.4.0.71.74
    Candidate: 5.4.0.71.74
    Version table:
   *** 5.4.0.71.74 500
          500 http://de.archive.ubuntu.com/ubuntu focal-updates/main amd64 
Packages
          500 http://security.ubuntu.com/ubuntu focal-security/main amd64 
Packages
          100 /var/lib/dpkg/status
       5.4.0.26.32 500
          500 http://de.archive.ubuntu.com/ubuntu focal/main amd64 Packages
  --- 
  ProblemType: Bug
  ApportVersion: 2.20.11-0ubuntu27.16
  Architecture: amd64
  AudioDevicesInUse:
   USER        PID ACCESS COMMAND
   /dev/snd/controlC2:  dirk       2946 F.... pulseaudio
   /dev/snd/controlC1:  dirk       2946 F.... pulseaudio
   /dev/snd/controlC0:  dirk       2946 F.... pulseaudio
  CasperMD5CheckResult: skip
  CurrentDesktop: KDE
  DistroRelease: KDE neon 20.04
  InstallationDate: Installed on 2017-07-27 (1356 days ago)
  InstallationMedia: neon userlts "Xenial" - Build amd64 LIVE Binary 
20170614-00:52
  MachineType: LENOVO 20HMS00T00
  Package: linux (not installed)
  ProcFB: 0 i915drmfb
  ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-5.4.0-71-generic 
root=/dev/mapper/vg00-lv_root ro intel_iommu=off
  ProcVersionSignature: Ubuntu 5.4.0-71.79-generic 5.4.101
  RelatedPackageVersions:
   linux-restricted-modules-5.4.0-71-generic N/A
   linux-backports-modules-5.4.0-71-generic  N/A
   linux-firmware                            1.187.10
  Tags:  focal
  Uname: Linux 5.4.0-71-generic x86_64
  UnreportableReason: In diesem Bericht geht es um ein Paket, welches nicht 
installiert ist.
  UpgradeStatus: Upgraded to focal on 2020-11-22 (142 days ago)
  UserGroups: adm cdrom davfs2 dialout dip kvm libvirt lpadmin plugdev roccat 
sambashare scanner sudo vboxusers
  _MarkForUpload: False
  dmi.bios.date: 04/20/2020
  dmi.bios.vendor: LENOVO
  dmi.bios.version: R0IET61W (1.39 )
  dmi.board.asset.tag: Not Available
  dmi.board.name: 20HMS00T00
  dmi.board.vendor: LENOVO
  dmi.board.version: Not Defined
  dmi.chassis.asset.tag: No Asset Information
  dmi.chassis.type: 10
  dmi.chassis.vendor: LENOVO
  dmi.chassis.version: None
  dmi.modalias: 
dmi:bvnLENOVO:bvrR0IET61W(1.39):bd04/20/2020:svnLENOVO:pn20HMS00T00:pvrThinkPadX270:rvnLENOVO:rn20HMS00T00:rvrNotDefined:cvnLENOVO:ct10:cvrNone:
  dmi.product.family: ThinkPad X270
  dmi.product.name: 20HMS00T00
  dmi.product.sku: LENOVO_MT_20HM_BU_Think_FM_ThinkPad X270
  dmi.product.version: ThinkPad X270
  dmi.sys.vendor: LENOVO

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

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to