15 Oct, 2016
2 commits
-
New mount option "idsfromsid" indicates to cifs.ko that
it should try to retrieve the uid and gid owner fields
from special sids. This patch adds the code to parse the owner
sids in the ACL to see if they match, and if so populate the
uid and/or gid from them. This is faster than upcalling for
them and asking winbind, and is a fairly common case, and is
also helpful when cifs.upcall and idmapping is not configured.Signed-off-by: Steve French
Reviewed-by: Shirish Pargaonkar
Reviewed-by: Jeff Layton
Reviewed-by: Pavel Shilovsky -
Add "idsfromsid" mount option to indicate to cifs.ko that it should
try to retrieve the uid and gid owner fields from special sids in the
ACL if present. This first patch just adds the parsing for the mount
option.Signed-off-by: Steve French
Reviewed-by: Shirish Pargaonkar
Reviewed-by: Pavel Shilovsky
14 Oct, 2016
8 commits
-
We are already doing the same thing for an ordinary open case:
we can't keep read oplock on a file if we have mandatory byte-range
locks because pagereading can conflict with these locks on a server.
Fix it by setting oplock level to NONE.Signed-off-by: Pavel Shilovsky
Signed-off-by: Steve French -
openFileList of tcon can be changed while cifs_reopen_file() is called
that can lead to an unexpected behavior when we return to the loop.
Fix this by introducing a temp list for keeping all file handles that
need to be reopen.Signed-off-by: Pavel Shilovsky
Signed-off-by: Steve French -
We split the rawntlmssp authentication into negotiate and
authencate parts. We also clean up the code and add helpers.Signed-off-by: Sachin Prabhu
Signed-off-by: Steve French
Reviewed-by: Pavel Shilovsky -
Add helper functions and split Kerberos authentication off
SMB2_sess_setup.Signed-off-by: Sachin Prabhu
Signed-off-by: Steve French
Reviewed-by: Pavel Shilovsky -
/sys/module/cifs/parameters should display the three
other module load time configuration settings for cifs.koSigned-off-by: Germano Percossi
Signed-off-by: Steve French -
Cleanup some missing mem frees on some cifs ioctls, and
clarify others to make more obvious that no data is returned.CC: Stable
Signed-off-by: Steve French
Acked-by: Sachin Prabhu -
Add ioctl to query previous versions of file
Allows listing snapshots on files on SMB3 mounts.
Signed-off-by: Steve French
-
[CIFS] We had cases where we sent a SMB2/SMB3 setinfo request with all
timestamp (and DOS attribute) fields marked as 0 (ie do not change)
e.g. on chmod or chown.Signed-off-by: Steve French
CC: Stable
13 Oct, 2016
11 commits
-
Add mount option "max_credits" to allow setting maximum SMB3
credits to any value from 10 to 64000 (default is 32000).
This can be useful to workaround servers with problems allocating
credits, or to throttle the client to use smaller amount of
simultaneous i/o or to workaround server performance issues.Also adds a cap, so that even if the server granted us more than
65000 credits due to a server bug, we would not use that many.Signed-off-by: Steve French
-
Continuous Availability features like persistent handles
require that clients reconnect their open files, not
just the sessions, soon after the network connection comes
back up, otherwise the server will throw away the state
(byte range locks, leases, deny modes) on those handles
after a timeout.Add code to reconnect handles when use_persistent set
(e.g. Continuous Availability shares) after tree reconnect.Signed-off-by: Aurelien Aptel
Reviewed-by: Germano Percossi
Signed-off-by: Steve French -
Remove the global file_list_lock to simplify cifs/smb3 locking and
have spinlocks that more closely match the information they are
protecting.Add new tcon->open_file_lock and file->file_info_lock spinlocks.
Locks continue to follow a heirachy,
cifs_socket --> cifs_ses --> cifs_tcon --> cifs_file
where global tcp_ses_lock still protects socket and cifs_ses, while the
the newer locks protect the lower level structure's information
(tcon and cifs_file respectively).CC: Stable
Signed-off-by: Steve French
Signed-off-by: Pavel Shilovsky
Reviewed-by: Aurelien Aptel
Reviewed-by: Germano Percossi -
Patch a6b5058 results in -EREMOTE returned by is_path_accessible() in
cifs_mount() to be ignored which breaks DFS mounting.Signed-off-by: Sachin Prabhu
Reviewed-by: Aurelien Aptel
CC: Stable
Signed-off-by: Steve French -
When we open a durable handle we give a Globally Unique
Identifier (GUID) to the server which we must keep for later reference
e.g. when reopening persistent handles on reconnection.Without this the GUID generated for a new persistent handle was lost and
16 zero bytes were used instead on re-opening.Signed-off-by: Aurelien Aptel
CC: Stable
Signed-off-by: Steve French -
GUIDs although random, and 16 bytes, need to be generated as
proper uuids.Signed-off-by: Steve French
Reviewed-by: Aurelien Aptel
Reported-by: David Goebels
CC: Stable -
Signed-off-by: Steve French
CC: Stable
Reported-by: David Goebel -
The kernel client requests 2 credits for many operations even though
they only use 1 credit (presumably to build up a buffer of credit).
Some servers seem to give the client as much credit as is requested. In
this case, the amount of credit the client has continues increasing to
the point where (server->credits * MAX_BUFFER_SIZE) overflows in
smb2_wait_mtu_credits().Fix this by throttling the credit requests if an set limit is reached.
For async requests where the credit charge may be > 1, request as much
credit as what is charged.
The limit is chosen somewhat arbitrarily. The Windows client
defaults to 128 credits, the Windows server allows clients up to
512 credits (or 8192 for Windows 2016), and the NetApp server
(and at least one other) does not limit clients at all.
Choose a high enough value such that the client shouldn't limit
performance.This behavior was seen with a NetApp filer (NetApp Release 9.0RC2).
Signed-off-by: Ross Lagerwall
CC: Stable
Signed-off-by: Steve French -
In debugging smb3, it is useful to display the number
of credits available, so we can see when the server has not granted
sufficient operations for the client to make progress, or alternatively
the client has requested too many credits (as we saw in a recent bug)
so we can compare with the number of credits the server thinks
we have.Add a /proc/fs/cifs/DebugData line to display the client view
on how many credits are available.Signed-off-by: Steve French
Reported-by: Germano Percossi
CC: Stable -
Add parsing for new pseudo-xattr user.cifs.creationtime file
attribute to allow backup and test applications to view
birth time of file on cifs/smb3 mounts.Signed-off-by: Steve French
-
Add parsing for new pseudo-xattr user.cifs.dosattrib file attribute
so tools can recognize what kind of file it is, and verify if common
SMB3 attributes (system, hidden, archive, sparse, indexed etc.) are
set.Signed-off-by: Steve French
Reviewed-by: Pavel Shilovsky
11 Oct, 2016
3 commits
-
Pull more vfs updates from Al Viro:
">rename2() work from Miklos + current_time() from Deepa"* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
fs: Replace current_fs_time() with current_time()
fs: Replace CURRENT_TIME_SEC with current_time() for inode timestamps
fs: Replace CURRENT_TIME with current_time() for inode timestamps
fs: proc: Delete inode time initializations in proc_alloc_inode()
vfs: Add current_time() api
vfs: add note about i_op->rename changes to porting
fs: rename "rename2" i_op to "rename"
vfs: remove unused i_op->rename
fs: make remaining filesystems use .rename2
libfs: support RENAME_NOREPLACE in simple_rename()
fs: support RENAME_NOREPLACE for local filesystems
ncpfs: fix unused variable warning -
Pull vfs xattr updates from Al Viro:
"xattr stuff from AndreasThis completes the switch to xattr_handler ->get()/->set() from
->getxattr/->setxattr/->removexattr"* 'work.xattr' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
vfs: Remove {get,set,remove}xattr inode operations
xattr: Stop calling {get,set,remove}xattr inode operations
vfs: Check for the IOP_XATTR flag in listxattr
xattr: Add __vfs_{get,set,remove}xattr helpers
libfs: Use IOP_XATTR flag for empty directory handling
vfs: Use IOP_XATTR flag for bad-inode handling
vfs: Add IOP_XATTR inode operations flag
vfs: Move xattr_resolve_name to the front of fs/xattr.c
ecryptfs: Switch to generic xattr handlers
sockfs: Get rid of getxattr iop
sockfs: getxattr: Fail with -EOPNOTSUPP for invalid attribute names
kernfs: Switch to generic xattr handlers
hfs: Switch to generic xattr handlers
jffs2: Remove jffs2_{get,set,remove}xattr macros
xattr: Remove unnecessary NULL attribute name check
08 Oct, 2016
3 commits
-
These inode operations are no longer used; remove them.
Signed-off-by: Andreas Gruenbacher
Signed-off-by: Al Viro
28 Sep, 2016
4 commits
-
they used to be used, but...
Signed-off-by: Al Viro
-
Remove the unnecessary typedefs and the zero-length a_entries array in
struct posix_acl_xattr_header.Signed-off-by: Andreas Gruenbacher
Signed-off-by: Al Viro -
current_fs_time() uses struct super_block* as an argument.
As per Linus's suggestion, this is changed to take struct
inode* as a parameter instead. This is because the function
is primarily meant for vfs inode timestamps.
Also the function was renamed as per Arnd's suggestion.Change all calls to current_fs_time() to use the new
current_time() function instead. current_fs_time() will be
deleted.Signed-off-by: Deepa Dinamani
Signed-off-by: Al Viro -
it's not 70s anymore.
Signed-off-by: Al Viro
27 Sep, 2016
1 commit
-
Generated patch:
sed -i "s/\.rename2\t/\.rename\t\t/" `git grep -wl rename2`
sed -i "s/\brename2\b/rename/g" `git grep -wl rename2`Signed-off-by: Miklos Szeredi
22 Sep, 2016
1 commit
-
inode_change_ok() will be resposible for clearing capabilities and IMA
extended attributes and as such will need dentry. Give it as an argument
to inode_change_ok() instead of an inode. Also rename inode_change_ok()
to setattr_prepare() to better relect that it does also some
modifications in addition to checks.Reviewed-by: Christoph Hellwig
Signed-off-by: Jan Kara
16 Sep, 2016
1 commit
-
Use d_fsdata instead, which is the same size. Introduce helpers to hide
the typecasts.Signed-off-by: Miklos Szeredi
Cc: Steve French
10 Sep, 2016
3 commits
-
Signed-off-by: Sachin Prabhu
Tested-by: Aurelien Aptel
Signed-off-by: Steve French -
The patch
fs/cifs: make share unaccessible at root level mountable
makes use of prepaths when any component of the underlying path is
inaccessible.When mounting 2 separate shares having different prepaths but are other
wise similar in other respects, we end up sharing superblocks when we
shouldn't be doing so.Signed-off-by: Sachin Prabhu
Tested-by: Aurelien Aptel
Signed-off-by: Steve French -
Fix memory leaks introduced by the patch
fs/cifs: make share unaccessible at root level mountableAlso move allocation of cifs_sb->prepath to cifs_setup_cifs_sb().
Signed-off-by: Sachin Prabhu
Tested-by: Aurelien Aptel
Signed-off-by: Steve French
01 Aug, 2016
1 commit
-
Signed-off-by: Al Viro
30 Jul, 2016
2 commits
-
dentry->d_sb is just as good as parent->d_sb
Signed-off-by: Al Viro
-
Pull CIFS/SMB3 fixes from Steve French:
"Various CIFS/SMB3 fixes, most for stable"* 'for-next' of git://git.samba.org/sfrench/cifs-2.6:
CIFS: Fix a possible invalid memory access in smb2_query_symlink()
fs/cifs: make share unaccessible at root level mountable
cifs: fix crash due to race in hmac(md5) handling
cifs: unbreak TCP session reuse
cifs: Check for existing directory when opening file with O_CREAT
Add MF-Symlinks support for SMB 2.0