kernel-hacking-2024-linux-s.../fs/cifs
Steve French 3d1a3745d8 Add sparse file support to SMB2/SMB3 mounts
Many Linux filesystes make a file "sparse" when extending
a file with ftruncate. This does work for CIFS to Samba
(only) but not for SMB2/SMB3 (to Samba or Windows) since
there is a "set sparse" fsctl which is supposed to be
sent to mark a file as sparse.

This patch marks a file as sparse by sending this simple
set sparse fsctl if it is extended more than 2 pages.
It has been tested to Windows 8.1, Samba and various
SMB2/SMB3 servers which do support setting sparse (and
MacOS which does not appear to support the fsctl yet).
If a server share does not support setting a file
as sparse, then we do not retry setting sparse on that
share.

The disk space savings for sparse files can be quite
large (even more significant on Windows servers than Samba).

Signed-off-by: Steve French <smfrench@gmail.com>
Reviewed-by: Shirish Pargaonkar <spargaonkar@suse.com>
2014-08-13 13:18:35 -05:00
..
asn1.c
cache.c
cifs_debug.c [CIFS] Fix incorrect hex vs. decimal in some debug print statements 2014-08-02 21:16:48 -05:00
cifs_debug.h
cifs_dfs_ref.c
cifs_fs_sb.h
cifs_spnego.c
cifs_spnego.h
cifs_unicode.c [CIFS] fix mount failure with broken pathnames when smb3 mount with mapchars option 2014-06-24 08:10:24 -05:00
cifs_unicode.h
cifs_uniupr.h
cifsacl.c
cifsacl.h
cifsencrypt.c
cifsfs.c cifs: revalidate mapping prior to satisfying read_iter request with cache=loose 2014-06-19 13:34:04 -05:00
cifsfs.h Update cifs version 2014-08-02 01:23:04 -05:00
cifsglob.h Add sparse file support to SMB2/SMB3 mounts 2014-08-13 13:18:35 -05:00
cifspdu.h Add missing definitions for CIFS File System Attributes 2014-08-12 23:47:14 -05:00
cifsproto.h CIFS: Use multicredits for SMB 2.1/3 writes 2014-08-02 01:23:03 -05:00
cifssmb.c CIFS: Optimize cifs_user_read() in a short read case on reconnects 2014-08-02 01:23:04 -05:00
connect.c Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6 2014-08-09 13:03:34 -07:00
dir.c
dns_resolve.c
dns_resolve.h
export.c
file.c Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6 2014-08-09 13:03:34 -07:00
fscache.c
fscache.h
inode.c sched: Allow wait_on_bit_action() functions to support a timeout 2014-07-16 15:10:41 +02:00
ioctl.c fs: cifs: new helper: file_inode(file) 2014-05-21 10:18:05 -07:00
Kconfig
link.c fs/cifs: fix regression in cifs_create_mf_symlink() 2014-06-16 13:50:11 -05:00
Makefile
misc.c cifs: remove unused function cifs_oplock_break_wait 2014-08-11 01:31:03 -05:00
netmisc.c fs/cifs/netmisc.c: convert printk to pr_foo() 2014-05-21 10:18:05 -07:00
nterr.c
nterr.h
ntlmssp.h
readdir.c
rfc1002pdu.h
sess.c Remove sparse build warning 2014-08-02 01:23:01 -05:00
smb1ops.c CIFS: Use multicredits for SMB 2.1/3 writes 2014-08-02 01:23:03 -05:00
smb2file.c
smb2glob.h
smb2inode.c Add worker function to set allocation size 2014-08-05 12:53:37 -05:00
smb2maperror.c CIFS: Fix STATUS_CANNOT_DELETE error mapping for SMB2 2014-08-02 01:23:04 -05:00
smb2misc.c [CIFS] Fix incorrect hex vs. decimal in some debug print statements 2014-08-02 21:16:48 -05:00
smb2ops.c Add sparse file support to SMB2/SMB3 mounts 2014-08-13 13:18:35 -05:00
smb2pdu.c Add sparse file support to SMB2/SMB3 mounts 2014-08-13 13:18:35 -05:00
smb2pdu.h Clarify SMB2/SMB3 create context and add missing ones 2014-05-21 10:18:06 -07:00
smb2proto.h Add worker function to set allocation size 2014-08-05 12:53:37 -05:00
smb2status.h
smb2transport.c CIFS: Use multicredits for SMB 2.1/3 writes 2014-08-02 01:23:03 -05:00
smbencrypt.c
smberr.h
smbfsctl.h
transport.c CIFS: Use multicredits for SMB 2.1/3 writes 2014-08-02 01:23:03 -05:00
winucase.c
xattr.c