History log of /openbmc/linux/fs/smb/client/smb2pdu.c (Results 1 – 25 of 186)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v6.6.35, v6.6.34, v6.6.33, v6.6.32, v6.6.31, v6.6.30, v6.6.29, v6.6.28, v6.6.27, v6.6.26, v6.6.25
# 07e76ea1 04-Apr-2024 David Howells <dhowells@redhat.com>

cifs: Add tracing for the cifs_tcon struct refcounting

[ Upstream commit afc23febd51c7e24361e3a9c09f3e892eb0a41ea ]

Add tracing for the refcounting/lifecycle of the cifs_tcon struct, marking
differ

cifs: Add tracing for the cifs_tcon struct refcounting

[ Upstream commit afc23febd51c7e24361e3a9c09f3e892eb0a41ea ]

Add tracing for the refcounting/lifecycle of the cifs_tcon struct, marking
different events with different labels and giving each tcon its own debug
ID so that the tracelines corresponding to individual tcons can be
distinguished. This can be enabled with:

echo 1 >/sys/kernel/debug/tracing/events/cifs/smb3_tcon_ref/enable

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Paulo Alcantara (Red Hat) <pc@manguebit.com>
cc: Shyam Prasad N <nspmangalore@gmail.com>
cc: linux-cifs@vger.kernel.org
cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>

show more ...


Revision tags: v6.6.24, v6.6.23
# e8aee4f4 23-Feb-2024 Enzo Matsumiya <ematsumiya@suse.de>

smb: client: negotiate compression algorithms

[ Upstream commit 8fe7062b7d11fcd21c4dcb5f530eaa1a099b24e7 ]

Change "compress=" mount option to a boolean flag, that, if set,
will enable negotiating c

smb: client: negotiate compression algorithms

[ Upstream commit 8fe7062b7d11fcd21c4dcb5f530eaa1a099b24e7 ]

Change "compress=" mount option to a boolean flag, that, if set,
will enable negotiating compression algorithms with the server.

Do not de/compress anything for now.

Signed-off-by: Enzo Matsumiya <ematsumiya@suse.de>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>

show more ...


Revision tags: v6.6.16, v6.6.15
# df0a8a19 26-Jan-2024 Paulo Alcantara <pc@manguebit.com>

smb: client: add support for WSL reparse points

[ Upstream commit 5a4b09ecf8e8ad26ea03a37e52e310fe13f15b49 ]

Add support for creating special files via WSL reparse points when
using 'reparse=wsl' m

smb: client: add support for WSL reparse points

[ Upstream commit 5a4b09ecf8e8ad26ea03a37e52e310fe13f15b49 ]

Add support for creating special files via WSL reparse points when
using 'reparse=wsl' mount option. They're faster than NFS reparse
points because they don't require extra roundtrips to figure out what
->d_type a specific dirent is as such information is already stored in
query dir responses and then making getdents() calls faster.

Signed-off-by: Paulo Alcantara <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>

show more ...


# 1b5f2928 28-Apr-2024 Steve French <stfrench@microsoft.com>

cifs: update the same create_guid on replay

[ Upstream commit 79520587fe42cd4988aff8695d60621e689109cb ]

File open requests made to the server contain a
CreateGuid, which is used by the server to i

cifs: update the same create_guid on replay

[ Upstream commit 79520587fe42cd4988aff8695d60621e689109cb ]

File open requests made to the server contain a
CreateGuid, which is used by the server to identify
the open request. If the same request needs to be
replayed, it needs to be sent with the same CreateGuid
in the durable handle v2 context.

Without doing so, we could end up leaking handles on
the server when:
1. multichannel is used AND
2. connection goes down, but not for all channels

This is because the replayed open request would have a
new CreateGuid and the server will treat this as a new
request and open a new handle.

This change fixes this by reusing the existing create_guid
stored in the cached fid struct.

REF: MS-SMB2 4.9 Replay Create Request on an Alternate Channel

Fixes: 4f1fffa23769 ("cifs: commands that are retried should have replay flag set")
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>

show more ...


Revision tags: v6.6.14, v6.6.13
# cdd7870a 18-Jan-2024 Shyam Prasad N <sprasad@microsoft.com>

cifs: set replay flag for retries of write command

[ Upstream commit 4cdad80261862c8cdcbb5fd232aa713d0bdefe24 ]

Similar to the rest of the commands, this is a change
to add replay flags on retry. T

cifs: set replay flag for retries of write command

[ Upstream commit 4cdad80261862c8cdcbb5fd232aa713d0bdefe24 ]

Similar to the rest of the commands, this is a change
to add replay flags on retry. This one does not add a
back-off, considering that we may want to flush a write
ASAP to the server. Considering that this will be a
flush of cached pages, the retrans value is also not
honoured.

Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>

show more ...


# 433042a9 20-Jan-2024 Shyam Prasad N <sprasad@microsoft.com>

cifs: commands that are retried should have replay flag set

[ Upstream commit 4f1fffa2376922f3d1d506e49c0fd445b023a28e ]

MS-SMB2 states that the header flag SMB2_FLAGS_REPLAY_OPERATION
needs to be

cifs: commands that are retried should have replay flag set

[ Upstream commit 4f1fffa2376922f3d1d506e49c0fd445b023a28e ]

MS-SMB2 states that the header flag SMB2_FLAGS_REPLAY_OPERATION
needs to be set when a command needs to be retried, so that
the server is aware that this is a replay for an operation that
appeared before.

This can be very important, for example, for state changing
operations and opens which get retried following a reconnect;
since the client maybe unaware of the status of the previous
open.

This is particularly important for multichannel scenario, since
disconnection of one connection does not mean that the session
is lost. The requests can be replayed on another channel.

This change also makes use of exponential back-off before replays
and also limits the number of retries to "retrans" mount option
value.

Also, this change does not modify the read/write codepath.

Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>

show more ...


Revision tags: v6.6.12, v6.6.11
# b96ea433 10-Jan-2024 Shyam Prasad N <sprasad@microsoft.com>

cifs: pick channel for tcon and tdis

[ Upstream commit 268b8b5797becb242013fcd63173eb28c007c8ae ]

Today, the tree connect and disconnect requests are
sent on the primary channel only. However, the

cifs: pick channel for tcon and tdis

[ Upstream commit 268b8b5797becb242013fcd63173eb28c007c8ae ]

Today, the tree connect and disconnect requests are
sent on the primary channel only. However, the new
multichannel logic allows the session to remain active
even if one of the channels are alive. So a tree connect
can now be triggered during a reconnect on any of
its channels.

This change changes tcon and tdis calls to pick an
active channel instead of the first one.

Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>

show more ...


# 8358f46b 16-Jan-2024 Colin Ian King <colin.i.king@gmail.com>

cifs: remove redundant variable tcon_exist

[ Upstream commit 8ca5d2641be217a78a891d4dbe2a46232d1d8eb9 ]

The variable tcon_exist is being assigned however it is never read, the
variable is redundant

cifs: remove redundant variable tcon_exist

[ Upstream commit 8ca5d2641be217a78a891d4dbe2a46232d1d8eb9 ]

The variable tcon_exist is being assigned however it is never read, the
variable is redundant and can be removed.

Cleans up clang scan build warning:
warning: Although the value stored to 'tcon_exist' is used in
the enclosing expression, the value is never actually readfrom
'tcon_exist' [deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>

show more ...


Revision tags: v6.6.10
# 774c6452 01-Jan-2024 David Howells <dhowells@redhat.com>

cifs: Pass unbyteswapped eof value into SMB2_set_eof()

[ Upstream commit 6ebfede8d57a615dcbdec7e490faed585153f7f1 ]

Change SMB2_set_eof() to take eof as CPU order rather than __le64 and pass
it dir

cifs: Pass unbyteswapped eof value into SMB2_set_eof()

[ Upstream commit 6ebfede8d57a615dcbdec7e490faed585153f7f1 ]

Change SMB2_set_eof() to take eof as CPU order rather than __le64 and pass
it directly rather than by pointer. This moves the conversion down into
SMB_set_eof() rather than all of its callers and means we don't need to
undo it for the traceline.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Jeff Layton <jlayton@kernel.org>
cc: linux-cifs@vger.kernel.org
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>

show more ...


# 08bedfbc 04-Apr-2024 Steve French <stfrench@microsoft.com>

smb3: fix broken reconnect when password changing on the server by allowing password rotation

[ Upstream commit 35f834265e0dc78b003aa0d1af65cafb89666b76 ]

There are various use cases that are becom

smb3: fix broken reconnect when password changing on the server by allowing password rotation

[ Upstream commit 35f834265e0dc78b003aa0d1af65cafb89666b76 ]

There are various use cases that are becoming more common in which password
changes are scheduled on a server(s) periodically but the clients connected
to this server need to stay connected (even in the face of brief network
reconnects) due to mounts which can not be easily unmounted and mounted at
will, and servers that do password rotation do not always have the ability
to tell the clients exactly when to the new password will be effective,
so add support for an alt password ("password2=") on mount (and also
remount) so that we can anticipate the upcoming change to the server
without risking breaking existing mounts.

An alternative would have been to use the kernel keyring for this but the
processes doing the reconnect do not have access to the keyring but do
have access to the ses structure.

Reviewed-by: Bharath SM <bharathsm@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>

show more ...


Revision tags: v6.6.35, v6.6.34, v6.6.33, v6.6.32, v6.6.31, v6.6.30, v6.6.29, v6.6.28, v6.6.27, v6.6.26, v6.6.25
# 07e76ea1 04-Apr-2024 David Howells <dhowells@redhat.com>

cifs: Add tracing for the cifs_tcon struct refcounting

[ Upstream commit afc23febd51c7e24361e3a9c09f3e892eb0a41ea ]

Add tracing for the refcounting/lifecycle of the cifs_tcon struct, marking
differ

cifs: Add tracing for the cifs_tcon struct refcounting

[ Upstream commit afc23febd51c7e24361e3a9c09f3e892eb0a41ea ]

Add tracing for the refcounting/lifecycle of the cifs_tcon struct, marking
different events with different labels and giving each tcon its own debug
ID so that the tracelines corresponding to individual tcons can be
distinguished. This can be enabled with:

echo 1 >/sys/kernel/debug/tracing/events/cifs/smb3_tcon_ref/enable

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Paulo Alcantara (Red Hat) <pc@manguebit.com>
cc: Shyam Prasad N <nspmangalore@gmail.com>
cc: linux-cifs@vger.kernel.org
cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>

show more ...


Revision tags: v6.6.24, v6.6.23
# e8aee4f4 23-Feb-2024 Enzo Matsumiya <ematsumiya@suse.de>

smb: client: negotiate compression algorithms

[ Upstream commit 8fe7062b7d11fcd21c4dcb5f530eaa1a099b24e7 ]

Change "compress=" mount option to a boolean flag, that, if set,
will enable negotiating c

smb: client: negotiate compression algorithms

[ Upstream commit 8fe7062b7d11fcd21c4dcb5f530eaa1a099b24e7 ]

Change "compress=" mount option to a boolean flag, that, if set,
will enable negotiating compression algorithms with the server.

Do not de/compress anything for now.

Signed-off-by: Enzo Matsumiya <ematsumiya@suse.de>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>

show more ...


Revision tags: v6.6.16, v6.6.15
# df0a8a19 26-Jan-2024 Paulo Alcantara <pc@manguebit.com>

smb: client: add support for WSL reparse points

[ Upstream commit 5a4b09ecf8e8ad26ea03a37e52e310fe13f15b49 ]

Add support for creating special files via WSL reparse points when
using 'reparse=wsl' m

smb: client: add support for WSL reparse points

[ Upstream commit 5a4b09ecf8e8ad26ea03a37e52e310fe13f15b49 ]

Add support for creating special files via WSL reparse points when
using 'reparse=wsl' mount option. They're faster than NFS reparse
points because they don't require extra roundtrips to figure out what
->d_type a specific dirent is as such information is already stored in
query dir responses and then making getdents() calls faster.

Signed-off-by: Paulo Alcantara <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>

show more ...


# 1b5f2928 28-Apr-2024 Steve French <stfrench@microsoft.com>

cifs: update the same create_guid on replay

[ Upstream commit 79520587fe42cd4988aff8695d60621e689109cb ]

File open requests made to the server contain a
CreateGuid, which is used by the server to i

cifs: update the same create_guid on replay

[ Upstream commit 79520587fe42cd4988aff8695d60621e689109cb ]

File open requests made to the server contain a
CreateGuid, which is used by the server to identify
the open request. If the same request needs to be
replayed, it needs to be sent with the same CreateGuid
in the durable handle v2 context.

Without doing so, we could end up leaking handles on
the server when:
1. multichannel is used AND
2. connection goes down, but not for all channels

This is because the replayed open request would have a
new CreateGuid and the server will treat this as a new
request and open a new handle.

This change fixes this by reusing the existing create_guid
stored in the cached fid struct.

REF: MS-SMB2 4.9 Replay Create Request on an Alternate Channel

Fixes: 4f1fffa23769 ("cifs: commands that are retried should have replay flag set")
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>

show more ...


Revision tags: v6.6.14, v6.6.13
# cdd7870a 18-Jan-2024 Shyam Prasad N <sprasad@microsoft.com>

cifs: set replay flag for retries of write command

[ Upstream commit 4cdad80261862c8cdcbb5fd232aa713d0bdefe24 ]

Similar to the rest of the commands, this is a change
to add replay flags on retry. T

cifs: set replay flag for retries of write command

[ Upstream commit 4cdad80261862c8cdcbb5fd232aa713d0bdefe24 ]

Similar to the rest of the commands, this is a change
to add replay flags on retry. This one does not add a
back-off, considering that we may want to flush a write
ASAP to the server. Considering that this will be a
flush of cached pages, the retrans value is also not
honoured.

Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>

show more ...


# 433042a9 20-Jan-2024 Shyam Prasad N <sprasad@microsoft.com>

cifs: commands that are retried should have replay flag set

[ Upstream commit 4f1fffa2376922f3d1d506e49c0fd445b023a28e ]

MS-SMB2 states that the header flag SMB2_FLAGS_REPLAY_OPERATION
needs to be

cifs: commands that are retried should have replay flag set

[ Upstream commit 4f1fffa2376922f3d1d506e49c0fd445b023a28e ]

MS-SMB2 states that the header flag SMB2_FLAGS_REPLAY_OPERATION
needs to be set when a command needs to be retried, so that
the server is aware that this is a replay for an operation that
appeared before.

This can be very important, for example, for state changing
operations and opens which get retried following a reconnect;
since the client maybe unaware of the status of the previous
open.

This is particularly important for multichannel scenario, since
disconnection of one connection does not mean that the session
is lost. The requests can be replayed on another channel.

This change also makes use of exponential back-off before replays
and also limits the number of retries to "retrans" mount option
value.

Also, this change does not modify the read/write codepath.

Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>

show more ...


Revision tags: v6.6.12, v6.6.11
# b96ea433 10-Jan-2024 Shyam Prasad N <sprasad@microsoft.com>

cifs: pick channel for tcon and tdis

[ Upstream commit 268b8b5797becb242013fcd63173eb28c007c8ae ]

Today, the tree connect and disconnect requests are
sent on the primary channel only. However, the

cifs: pick channel for tcon and tdis

[ Upstream commit 268b8b5797becb242013fcd63173eb28c007c8ae ]

Today, the tree connect and disconnect requests are
sent on the primary channel only. However, the new
multichannel logic allows the session to remain active
even if one of the channels are alive. So a tree connect
can now be triggered during a reconnect on any of
its channels.

This change changes tcon and tdis calls to pick an
active channel instead of the first one.

Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>

show more ...


# 8358f46b 16-Jan-2024 Colin Ian King <colin.i.king@gmail.com>

cifs: remove redundant variable tcon_exist

[ Upstream commit 8ca5d2641be217a78a891d4dbe2a46232d1d8eb9 ]

The variable tcon_exist is being assigned however it is never read, the
variable is redundant

cifs: remove redundant variable tcon_exist

[ Upstream commit 8ca5d2641be217a78a891d4dbe2a46232d1d8eb9 ]

The variable tcon_exist is being assigned however it is never read, the
variable is redundant and can be removed.

Cleans up clang scan build warning:
warning: Although the value stored to 'tcon_exist' is used in
the enclosing expression, the value is never actually readfrom
'tcon_exist' [deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>

show more ...


Revision tags: v6.6.10
# 774c6452 01-Jan-2024 David Howells <dhowells@redhat.com>

cifs: Pass unbyteswapped eof value into SMB2_set_eof()

[ Upstream commit 6ebfede8d57a615dcbdec7e490faed585153f7f1 ]

Change SMB2_set_eof() to take eof as CPU order rather than __le64 and pass
it dir

cifs: Pass unbyteswapped eof value into SMB2_set_eof()

[ Upstream commit 6ebfede8d57a615dcbdec7e490faed585153f7f1 ]

Change SMB2_set_eof() to take eof as CPU order rather than __le64 and pass
it directly rather than by pointer. This moves the conversion down into
SMB_set_eof() rather than all of its callers and means we don't need to
undo it for the traceline.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Jeff Layton <jlayton@kernel.org>
cc: linux-cifs@vger.kernel.org
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>

show more ...


# 08bedfbc 04-Apr-2024 Steve French <stfrench@microsoft.com>

smb3: fix broken reconnect when password changing on the server by allowing password rotation

[ Upstream commit 35f834265e0dc78b003aa0d1af65cafb89666b76 ]

There are various use cases that are becom

smb3: fix broken reconnect when password changing on the server by allowing password rotation

[ Upstream commit 35f834265e0dc78b003aa0d1af65cafb89666b76 ]

There are various use cases that are becoming more common in which password
changes are scheduled on a server(s) periodically but the clients connected
to this server need to stay connected (even in the face of brief network
reconnects) due to mounts which can not be easily unmounted and mounted at
will, and servers that do password rotation do not always have the ability
to tell the clients exactly when to the new password will be effective,
so add support for an alt password ("password2=") on mount (and also
remount) so that we can anticipate the upcoming change to the server
without risking breaking existing mounts.

An alternative would have been to use the kernel keyring for this but the
processes doing the reconnect do not have access to the keyring but do
have access to the ses structure.

Reviewed-by: Bharath SM <bharathsm@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>

show more ...


Revision tags: v6.6.35, v6.6.34, v6.6.33, v6.6.32, v6.6.31, v6.6.30, v6.6.29, v6.6.28, v6.6.27, v6.6.26, v6.6.25
# 07e76ea1 04-Apr-2024 David Howells <dhowells@redhat.com>

cifs: Add tracing for the cifs_tcon struct refcounting

[ Upstream commit afc23febd51c7e24361e3a9c09f3e892eb0a41ea ]

Add tracing for the refcounting/lifecycle of the cifs_tcon struct, marking
differ

cifs: Add tracing for the cifs_tcon struct refcounting

[ Upstream commit afc23febd51c7e24361e3a9c09f3e892eb0a41ea ]

Add tracing for the refcounting/lifecycle of the cifs_tcon struct, marking
different events with different labels and giving each tcon its own debug
ID so that the tracelines corresponding to individual tcons can be
distinguished. This can be enabled with:

echo 1 >/sys/kernel/debug/tracing/events/cifs/smb3_tcon_ref/enable

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Paulo Alcantara (Red Hat) <pc@manguebit.com>
cc: Shyam Prasad N <nspmangalore@gmail.com>
cc: linux-cifs@vger.kernel.org
cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>

show more ...


Revision tags: v6.6.24, v6.6.23
# e8aee4f4 23-Feb-2024 Enzo Matsumiya <ematsumiya@suse.de>

smb: client: negotiate compression algorithms

[ Upstream commit 8fe7062b7d11fcd21c4dcb5f530eaa1a099b24e7 ]

Change "compress=" mount option to a boolean flag, that, if set,
will enable negotiating c

smb: client: negotiate compression algorithms

[ Upstream commit 8fe7062b7d11fcd21c4dcb5f530eaa1a099b24e7 ]

Change "compress=" mount option to a boolean flag, that, if set,
will enable negotiating compression algorithms with the server.

Do not de/compress anything for now.

Signed-off-by: Enzo Matsumiya <ematsumiya@suse.de>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>

show more ...


Revision tags: v6.6.16, v6.6.15
# df0a8a19 26-Jan-2024 Paulo Alcantara <pc@manguebit.com>

smb: client: add support for WSL reparse points

[ Upstream commit 5a4b09ecf8e8ad26ea03a37e52e310fe13f15b49 ]

Add support for creating special files via WSL reparse points when
using 'reparse=wsl' m

smb: client: add support for WSL reparse points

[ Upstream commit 5a4b09ecf8e8ad26ea03a37e52e310fe13f15b49 ]

Add support for creating special files via WSL reparse points when
using 'reparse=wsl' mount option. They're faster than NFS reparse
points because they don't require extra roundtrips to figure out what
->d_type a specific dirent is as such information is already stored in
query dir responses and then making getdents() calls faster.

Signed-off-by: Paulo Alcantara <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>

show more ...


# 1b5f2928 28-Apr-2024 Steve French <stfrench@microsoft.com>

cifs: update the same create_guid on replay

[ Upstream commit 79520587fe42cd4988aff8695d60621e689109cb ]

File open requests made to the server contain a
CreateGuid, which is used by the server to i

cifs: update the same create_guid on replay

[ Upstream commit 79520587fe42cd4988aff8695d60621e689109cb ]

File open requests made to the server contain a
CreateGuid, which is used by the server to identify
the open request. If the same request needs to be
replayed, it needs to be sent with the same CreateGuid
in the durable handle v2 context.

Without doing so, we could end up leaking handles on
the server when:
1. multichannel is used AND
2. connection goes down, but not for all channels

This is because the replayed open request would have a
new CreateGuid and the server will treat this as a new
request and open a new handle.

This change fixes this by reusing the existing create_guid
stored in the cached fid struct.

REF: MS-SMB2 4.9 Replay Create Request on an Alternate Channel

Fixes: 4f1fffa23769 ("cifs: commands that are retried should have replay flag set")
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>

show more ...


Revision tags: v6.6.14, v6.6.13
# cdd7870a 18-Jan-2024 Shyam Prasad N <sprasad@microsoft.com>

cifs: set replay flag for retries of write command

[ Upstream commit 4cdad80261862c8cdcbb5fd232aa713d0bdefe24 ]

Similar to the rest of the commands, this is a change
to add replay flags on retry. T

cifs: set replay flag for retries of write command

[ Upstream commit 4cdad80261862c8cdcbb5fd232aa713d0bdefe24 ]

Similar to the rest of the commands, this is a change
to add replay flags on retry. This one does not add a
back-off, considering that we may want to flush a write
ASAP to the server. Considering that this will be a
flush of cached pages, the retrans value is also not
honoured.

Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>

show more ...


12345678