Patch "cifs: failure to add channel on iface should bump up weight" has been added to the 6.7-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    cifs: failure to add channel on iface should bump up weight

to the 6.7-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     cifs-failure-to-add-channel-on-iface-should-bump-up-.patch
and it can be found in the queue-6.7 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 1c924483f8e6d59b7d3b248c7ffab3e0b50fdab7
Author: Shyam Prasad N <sprasad@xxxxxxxxxxxxx>
Date:   Thu Feb 1 11:15:29 2024 +0000

    cifs: failure to add channel on iface should bump up weight
    
    [ Upstream commit 6aac002bcfd554aff6d3ebb55e1660d078d70ab0 ]
    
    After the interface selection policy change to do a weighted
    round robin, each iface maintains a weight_fulfilled. When the
    weight_fulfilled reaches the total weight for the iface, we know
    that the weights can be reset and ifaces can be allocated from
    scratch again.
    
    During channel allocation failures on a particular channel,
    weight_fulfilled is not incremented. If a few interfaces are
    inactive, we could end up in a situation where the active
    interfaces are all allocated for the total_weight, and inactive
    ones are all that remain. This can cause a situation where
    no more channels can be allocated further.
    
    This change fixes it by increasing weight_fulfilled, even when
    channel allocation failure happens. This could mean that if
    there are temporary failures in channel allocation, the iface
    weights may not strictly be adhered to. But that's still okay.
    
    Fixes: a6d8fb54a515 ("cifs: distribute channels across interfaces based on speed")
    Signed-off-by: Shyam Prasad N <sprasad@xxxxxxxxxxxxx>
    Signed-off-by: Steve French <stfrench@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/smb/client/sess.c b/fs/smb/client/sess.c
index a16e175731eb..a1b973456471 100644
--- a/fs/smb/client/sess.c
+++ b/fs/smb/client/sess.c
@@ -269,6 +269,8 @@ int cifs_try_adding_channels(struct cifs_ses *ses)
 					 &iface->sockaddr,
 					 rc);
 				kref_put(&iface->refcount, release_iface);
+				/* failure to add chan should increase weight */
+				iface->weight_fulfilled++;
 				continue;
 			}
 




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux