public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jody - Tritech Computer Solutions <jody@nctritech.com>
To: linux-kernel@vger.kernel.org, andrew.wood@ivarch.com
Subject: CIFS 'cache=strict' breaks 'pv' utility
Date: Wed, 20 Feb 2013 11:35:13 -0500	[thread overview]
Message-ID: <5124FB41.5000106@nctritech.com> (raw)

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

             reply	other threads:[~2013-02-20 16:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-20 16:35 Jody - Tritech Computer Solutions [this message]
     [not found] ` <20130220205159.GA1417@ivarch.com>
2013-02-20 21:14   ` CIFS 'cache=strict' breaks 'pv' utility Jody - Tritech Computer Solutions

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5124FB41.5000106@nctritech.com \
    --to=jody@nctritech.com \
    --cc=andrew.wood@ivarch.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox