Bug 1176172

Summary: CIFS cannot write more than 2147483647 bytes on SMB2 (vers=2.0/2.1)
Product: Red Hat Enterprise Linux 7 Reporter: Ryan Crews <rcrews>
Component: kernelAssignee: Sachin Prabhu <sprabhu>
kernel sub component: CIFS QA Contact: xiaoli feng <xifeng>
Status: CLOSED DUPLICATE Docs Contact:
Severity: low    
Priority: medium CC: bdwheele, eguan, sprabhu, xifeng
Version: 7.0   
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-05-20 15:11:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ryan Crews 2014-12-19 15:42:01 UTC
Description of problem: Attempting to write a file larger than 2GB~ (2147483647 bytes) fails with 'File too large'/


Version-Release number of selected component (if applicable):
3.10.0-123.el7.x86_64, cifs-utils-6.2-6.el7.x86_64
also tested against: 3.10.0-123.13.1.el7.x86_64

How reproducible: 100%


Steps to Reproduce:
1. mount CIFS share with vers=2.0 or vers=2.1
2. dd if=/dev/zero of=/mnt/share/bigfile.bin bs=1M count=3000

Actual results:
[root@misuzu orz]# dd if=/dev/zero of=bigfile.bin bs=1M count=3000
dd: error writing ‘bigfile.bin’: File too large
2048+0 records in
2047+0 records out
2147483647 bytes (2.1 GB) copied, 143.139 s, 15.0 MB/s
[root@misuzu orz]# 


Expected results: Successful completion of write.

Additional info:
Each attempt only writes 2147483647 bytes (2.1 GB)
I've reproduced against Win 2008 R2; and customer has reproduced against Isilon NAS running OneFS 7.1.0.4

Comment 1 Brian Wheeler 2015-04-07 13:15:59 UTC
Is there any update to this?  I'm creating a system that's got to process around 14T of data a day and having SMB2 would help a lot.

This also fails when attaching to a windows 7 machine.

Comment 2 Sachin Prabhu 2015-04-13 08:55:47 UTC
Brian, 

Kernel version 3.10.0-150.el7 contains the upstream commit 
2f6c9479633780ba4a3484bba7eba5a721a5cf20 - cifs: Fix inability to write files >2GB to SMB2/3 shares

You will need to upgrade to the latest released version which contains the patch.
https://rhn.redhat.com/errata/RHSA-2015-0290.html

WRT SMB 2.0+, This part of the code is currently under active development upstream and lacks several essential features. This also affects RHEL 7 which depends on upstream. There is also a higher chance of hitting bugs in this code. I would therefore not recommend it for production use.

Sachin Prabhu