EINVAL on bulk access of CIFS mount

From: martin f krafft
Date: Wed Jun 12 2024 - 02:48:31 EST


Dear list,

I have a local CIFS mount on 6.8.9-amd64 (Debian unstable):

//fileserver/m on /server/m type cifs (rw,nosuid,nodev,relatime,vers=3.1.1,cache=strict,username=martin.krafft,domain=samba-ad,uid=1000,forceuid,gid=1000,forcegid,addr=192.168.231.42,file_mode=0660,dir_mode=02770,soft,nounix,mapposix,rsize=4194304,wsize=4194304,bsize=1048576,retrans=1,echo_interval=60,actimeo=1,closetimeo=1)

I am trying to tree-walk that mount (depth-first). Every couple of dozen files, I get EINVAL on file access. I modified my script to then wait a second and retry, and it generally works then, or on the next retry.

Accessing the same file directly (i.e. not as part of a bulk operation) works fine.

But also, restarting the bulk operation does seem to cause it to hit EINVAL on exactly the same files as before, though I am not 100% on that.

Access works fine from Windows, even in bulk, leading me to believe this is a cifs client-side problem.

How could I go about narrowing this down?

Thanks,

martin krafft | https://matrix.to/#/#madduck:madduck.net

“die menschen drängen sich zum lichte, nicht um besser zu sehen,
sondern um besser zu glänzen.”
- friedrich nietzsche

Attachment: digital_signature_gpg.asc
Description: Digital GPG signature (see http://martin-krafft.net/gpg/sig-policy/999bbcc4/current)