Bug 180979 - [netsmb][patch]: Fix large files handling
Summary: [netsmb][patch]: Fix large files handling
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 9.2-BETA2
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-31 20:00 UTC by Maxim Samsonov
Modified: 2017-12-31 22:27 UTC (History)
0 users

See Also:


Attachments
file.diff (1021 bytes, patch)
2013-07-31 20:00 UTC, Maxim Samsonov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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 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