lkml.org 
[lkml]   [2013]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectCIFS 'cache=strict' breaks 'pv' utility
Greetings,

After the switch from 'cache=loose' to 'cache=strict' as the default
CIFS cache mount option, I am unable to use the 'pv' utility in place of
'cat' to read files beyond a certain size over CIFS. Mounting with
'cache=loose' works around the problem, but does not change the
breakage. If I mount with 'cache=strict' on 3.6.11 (the last stable
kernel that works out-of-the-box) the breakage occurs again.

I hit this problem on 32-bit and 64-bit kernels, pv-1.2.0 and the latest
pv-1.4.6, and the failure is tied to 'cache=strict' on all kernels from
3.6.11 through 3.8.

My testing with a command such as 'pv /mnt/cifs/file.tar.xz | wc -c'
indicates that 'pv' outputs the data up to a certain power-of-two point
and then fails with "pv: (stdin): read failed: Input/output error". I
have seen data stop transferring at 524288, 1048576, and 2097152 bytes
when I tried feeding it various file sizes.

I am able to use 'pv' with files on CIFS mounted as 'cache=strict' if I
reduce the buffer size on the command line (the -B xxx option) to 131072
or lower, while setting a buffer of 262144 or higher always fails.

I am sending this to the LKML as well as the 'pv' maintainer, since I do
not know the scope of the issue. If this exposes an unknown bug in the
kernel CIFS driver, I don't want it to fly under the radar. I am
available for testing and reporting as needed.

I don't subscribe to LKML, so please CC me on any responses.

--

Jody Lee Bruchon
Tritech Computer Solutions


\
 
 \ /
  Last update: 2013-02-20 18:21    [W:0.095 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site