Bug 180979

Summary: [netsmb][patch]: Fix large files handling
Product: Base System Reporter: Maxim Samsonov <xors>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Open ---    
Severity: Affects Only Me Keywords: patch
Priority: Normal    
Version: 9.2-BETA2   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Maxim Samsonov 2013-07-31 20:00:00 UTC
NETSMB should honour SMB_CAP_LARGE_FILES capability as well as SMB_CAP_LARGE_READX and SMB_CAP_LARGE_WRITEX capabilities in order to read/write large files (over 4G) correctly.
So 64-bit file offsets are supported if SMB_CAP_LARGE_FILES capability is detected.

This fix was inspired from the following NetBSD patch:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/netsmb/smb_smb.c?rev=1.31&content-type=text/x-cvsweb-markup&only_with_tag=MAIN
..
Fix detection of SMB capabilities according to the CIFS spec:
1.) SMB_CAP_LARGE_FILES advertises support for 64-bit file offsets.
2.) SMB_CAP_LARGE_READX and SMB_CAP_LARGE_WRITEX advertise support for
    large reads and writes (larger than 64KB).
The code previously only used SMB_CAP_LARGE_READX and SMB_CAP_LARGE_WRITEX
which is not correct and doesn't work for the Apple Time Capsule which
only supports SMB_CAP_LARGE_FILES.
..

Fix: Patch attached with submission follows:
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2013-08-02 03:51:29 UTC
State Changed
From-To: open->open

sorry, wrong PR edited.  Please ignore. 


Comment 2 Mark Linimon freebsd_committer freebsd_triage 2013-08-02 03:51:29 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-bugs
Comment 3 Remko Lodder freebsd_committer freebsd_triage 2013-08-02 08:04:08 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-fs

Filesystem related -> -fs
Comment 4 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:00:29 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 5 Graham Perrin freebsd_committer freebsd_triage 2022-10-17 12:39:12 UTC
Keyword: 

    patch
or  patch-ready

– in lieu of summary line prefix: 

    [patch]

* bulk change for the keyword
* summary lines may be edited manually (not in bulk). 

Keyword descriptions and search interface: 

    <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>