1. 01 Feb, 2024 2 commits
    • Shyam Prasad N's avatar
      cifs: do not search for channel if server is terminating · 88675b22
      Shyam Prasad N authored
      In order to scale down the channels, the following sequence
      of operations happen:
      1. server struct is marked for terminate
      2. the channel is deallocated in the ses->chans array
      3. at a later point the cifsd thread actually terminates the server
      
      Between 2 and 3, there can be calls to find the channel for
      a server struct. When that happens, there can be an ugly warning
      that's logged. But this is expected.
      
      So this change does two things:
      1. in cifs_ses_get_chan_index, if server->terminate is set, return
      2. always make sure server->terminate is set with chan_lock held
      Signed-off-by: default avatarShyam Prasad N <sprasad@microsoft.com>
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      88675b22
    • Shyam Prasad N's avatar
      cifs: avoid redundant calls to disable multichannel · e77e15fa
      Shyam Prasad N authored
      When the server reports query network interface info call
      as unsupported following a tree connect, it means that
      multichannel is unsupported, even if the server capabilities
      report otherwise.
      
      When this happens, cifs_chan_skip_or_disable is called to
      disable multichannel on the client. However, we only need
      to call this when multichannel is currently setup.
      
      Fixes: f591062b ("cifs: handle servers that still advertise multichannel after disabling")
      Signed-off-by: default avatarShyam Prasad N <sprasad@microsoft.com>
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      e77e15fa
  2. 31 Jan, 2024 1 commit
    • Shyam Prasad N's avatar
      cifs: make sure that channel scaling is done only once · ee36a3b3
      Shyam Prasad N authored
      Following a successful cifs_tree_connect, we have the code
      to scale up/down the number of channels in the session.
      However, it is not protected by a lock today.
      
      As a result, this code can be executed by several processes
      that select the same channel. The core functions handle this
      well, as they pick chan_lock. However, we've seen cases where
      smb2_reconnect throws some warnings.
      
      To fix that, this change introduces a flags bitmap inside the
      cifs_ses structure. A new flag type is used to ensure that
      only one process enters this section at any time.
      Signed-off-by: default avatarShyam Prasad N <sprasad@microsoft.com>
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      ee36a3b3
  3. 29 Jan, 2024 1 commit
  4. 28 Jan, 2024 7 commits
  5. 27 Jan, 2024 9 commits
  6. 26 Jan, 2024 20 commits