Moode Forum
CIFS readahead messages - Printable Version

+- Moode Forum (https://moodeaudio.org/forum)
+-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3)
+--- Forum: Support (https://moodeaudio.org/forum/forumdisplay.php?fid=7)
+--- Thread: CIFS readahead messages (/showthread.php?tid=5567)



CIFS readahead messages - TheOldPresbyope - 05-06-2023

@Tim Curtis 

A curious issue was brought to light in a thread about playback dropouts started yesterday.  @yage2046  mentioned almost as an afterthought

Quote:I also had some strange messages in my logs related to CIFS (my music folder is being shared from a Mac mini). It was writing 'CIFS: __readahead_batch() returned' repeatedly to /var/log/messages as I was streaming a file.

I can repro this on various moOde 8.3.2 players running on different Pi models. The messages are journaled to /var/log/kern.log and, as mentioned, mirrored to /var/log/messages. I'm seeing 3 to 4 messages per second as I play a track from a SAMBA share on my NAS.

A casual search on the InterWeb™ turned up a number hits on the topic, all informative, but none definitive. The readahead feature was apparently introduced to the Linux CIFS code last summer and the message occurs because the contents of the local read cache are suspect (consult the CACHE COHERENCY section in man mount.cifs). I don't recall seeing them before.

It seems to me mitigation possibilities include
  • just change the journaling rules so the message isn't logged. This doesn't feel right to me - too much like putting a piece of black tape over the "check engine" light. However, if the messages are just an alert that the cache is being bypassed, then maybe no harm/no foul. That's one possible reading of the man page. (If only I understood "oplocks")
  • change the SMB mount options to force cache=none instead of the default cache=strict. This made the messages go away on my test system (I just appended ,cache=none to the list of mount options in the Advanced section of the Music source configuration panel). Does this cause a noticeable degradation of performance? I don't know. Note that I also tried cache=loose but still saw a flow of messages to the logs
  • no idea what else might be done.

Regards,
Kent


RE: CIFS readahead messages - Tim Curtis - 05-06-2023

I stopped using Samba as soon as I implemented the NFS server feature :-) because I always got tons of weird log spam from SMB mounts.

Given that playing a track is a read-only operation it would suggest that cache=none would be the best option. I can add to the TODO list to investigate.