Bug 876449 - cant read from cifs share mounted with 'cache=none' (SMB response too short)
Summary: cant read from cifs share mounted with 'cache=none' (SMB response too short)
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 17
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Jeff Layton
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-14 07:42 UTC by Marina Fadeeva
Modified: 2014-06-18 07:42 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-08 01:14:32 UTC


Attachments (Terms of Use)
kernel log from 3.6 kernel (CIFS VFS: SMB response too short") (1.30 MB, application/octet-stream)
2012-11-14 07:42 UTC, Marina Fadeeva
no flags Details
successful read of the same file using 3.4 kernel (share mounted with directio) (54.19 KB, application/octet-stream)
2012-11-14 07:44 UTC, Marina Fadeeva
no flags Details


Links
System ID Priority Status Summary Last Updated
Samba Project 9422 None None None Never

Description Marina Fadeeva 2012-11-14 07:42:48 UTC
Created attachment 644607 [details]
kernel log from 3.6 kernel (CIFS VFS: SMB response too short")

Description of problem:

Cant read files from samba shares mounted with 'cache=none' option.

Version-Release number of selected component (if applicable):
Fedora 17. All 3.5.x - 3.6.x vanilla kernels.

How reproducible:
Always.

Steps to Reproduce:
1. Create smb share *(see additional info for details)

2. Create a file on this share, for example using dd:
dd if=/dev/urandom of=/smb_dir_path/dd_file bs=1024 count=1024

3. mount this share with 'cache=none' options from Fedora 17 or from any system that runs kernel starting from 3.5.0 version.
mount -t cifs //host/share /mount_point/ -o cache=none

4. try to read this file in the below way (note block size value):
dd if=/mount_point/dd_file of=/dev/null bs=131013 count=1

Actual results:
dd will never finish.
dmesg is constantly spammed by messages "CIFS VFS: SMB response too short"

Expected results:
read should succeed.

Additional info:
* smb shares controlled by Windows OS are not affected (they can be successfully read when mounted with cache=none), smb shares controlled by Centos 5 with samba 3.0.33 seems to be not affected also.
The problem is 100% reproducible with samba shares controlled by Centos 6 (samba-3.5.4-68, kernel 2.6.32), latest Fedora (16,17), latest ubuntu. So the problem could also be related to version of samba running on the samba server.

Mounting with 'cache=loose' workarounds the issue.

The problem does not exist with 3.4 and earlier kernels.

Important!
The problem was introduced by 'cifs: convert cifs_iovec_read to use async reads' patch (http://www.spinics.net/lists/linux-cifs/msg05802.html).
I've reverted this patch and everything is working fine again.

Attached you can find kernel logs created with cifsFYI enabled from unsuccessful read with 3.6.2 (messages.bad) kernel and from the same, but successful operation, with 3.4.5 kernel (messages.good).

Comment 1 Marina Fadeeva 2012-11-14 07:44:48 UTC
Created attachment 644608 [details]
successful read of the same file using 3.4 kernel (share mounted with directio)

Comment 2 Jeff Layton 2013-01-08 01:14:32 UTC
Almost certainly the same issue as reported here:

    https://bugzilla.kernel.org/show_bug.cgi?id=50841

Which turned out to be a server bug:

    https://bugzilla.samba.org/show_bug.cgi?id=9422


Note You need to log in before you can comment on or make changes to this bug.