Shyam Prasad N <nspmangalore@xxxxxxxxx> writes: > Please consider the attached patch for performing the DNS query again > on reconnect. > This is important when connecting to Azure file shares. The UNC > generally contains the server name as a FQDN, and the IP address which > the name resolves to can change over time. > > After our last conversation about this, I discovered that for the > non-DFS scenario, we never do DNS resolutions in cifs.ko, since > mount.cifs already resolves the name and passes the "addr=" arg during > mount. Yeah, this should happen for both cases. Good catch! > I noticed that you had a patch for this long back. But I don't see > that call happening in the latest code. Any idea why that was done? I don't know. Maybe some other patch broke it. We should probably mark it for stable as well. > From 289f7f0fa229ea181094821c309a2ba9358791a3 Mon Sep 17 00:00:00 2001 > From: Shyam Prasad N <sprasad@xxxxxxxxxxxxx> > Date: Wed, 31 Mar 2021 14:35:24 +0000 > Subject: [PATCH] cifs: On cifs_reconnect, resolve the hostname again. > > On cifs_reconnect, make sure that DNS resolution happens again. > It could be the cause of connection to go dead in the first place. > > Signed-off-by: Shyam Prasad N <sprasad@xxxxxxxxxxxxx> > --- > fs/cifs/connect.c | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) This patch breaks when CONFIG_CIFS_DFS_UPCALL isn't set. Please declare reconn_set_ipaddr_from_hostname() outside the "#ifdef CONFIG_CIFS_DFS_UPCALL" in connect.c. Otherwise, Reviewed-by: Paulo Alcantara (SUSE) <pc@xxxxxx>