Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: Enzo Matsumiya <ematsumiya@suse.de>
To: Paulo Alcantara <pc@cjr.nz>
Cc: smfrench@gmail.com, linux-cifs@vger.kernel.org
Subject: Re: [PATCH 1/2] cifs: ignore ipc reconnect failures during dfs failover
Date: Thu, 29 Dec 2022 17:10:29 -0300	[thread overview]
Message-ID: <20221229201029.lajhejwbbtca6poc@suse.de> (raw)
In-Reply-To: <20221229153356.8221-1-pc@cjr.nz>

On 12/29, Paulo Alcantara wrote:
>If it failed to reconnect ipc used for getting referrals, we can just
>ignore it as it is not required for reconnecting the share.  The worst
>case would be not being able to detect or chase nested links as long
>as dfs root server is unreachable.
>
>Before patch:
>
>  $ mount.cifs //root/dfs/link /mnt -o echo_interval=10,...
>    -> target share: /fs0/share
>
>  disconnect root & fs0
>
>  $ ls /mnt
>  ls: cannot access '/mnt': Host is down
>
>  connect fs0
>
>  $ ls /mnt
>  ls: cannot access '/mnt': Resource temporarily unavailable
>
>After patch:
>
>  $ mount.cifs //root/dfs/link /mnt -o echo_interval=10,...
>    -> target share: /fs0/share
>
>  disconnect root & fs0
>
>  $ ls /mnt
>  ls: cannot access '/mnt': Host is down
>
>  connect fs0
>
>  $ ls /mnt
>  bar.rtf  dir1  foo
>
>Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz>

Reviewed-by: Enzo Matsumiya <ematsumiya@suse.de>

>---
> fs/cifs/dfs.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
>diff --git a/fs/cifs/dfs.c b/fs/cifs/dfs.c
>index b541e68378f6..30086f2060a1 100644
>--- a/fs/cifs/dfs.c
>+++ b/fs/cifs/dfs.c
>@@ -401,8 +401,7 @@ static int __tree_connect_dfs_target(const unsigned int xid, struct cifs_tcon *t
> 		if (ipc->need_reconnect) {
> 			scnprintf(tree, MAX_TREE_SIZE, "\\\\%s\\IPC$", server->hostname);
> 			rc = ops->tree_connect(xid, ipc->ses, tree, ipc, cifs_sb->local_nls);
>-			if (rc)
>-				break;
>+			cifs_dbg(FYI, "%s: reconnect ipc: %d\n", __func__, rc);
> 		}
>
> 		scnprintf(tree, MAX_TREE_SIZE, "\\%s", share);
>-- 
>2.39.0
>

  parent reply	other threads:[~2022-12-29 20:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-29 15:33 [PATCH 1/2] cifs: ignore ipc reconnect failures during dfs failover Paulo Alcantara
2022-12-29 15:33 ` [PATCH 2/2] cifs: fix race in assemble_neg_contexts() Paulo Alcantara
2022-12-29 20:14   ` Enzo Matsumiya
     [not found]     ` <CAH2r5mso6PLpKpVxtcUHW4RQ1jc-Tmj5ALOEba2z+40uSDf0JA@mail.gmail.com>
2023-01-04  6:14       ` Steve French
2022-12-29 20:10 ` Enzo Matsumiya [this message]
     [not found]   ` <CAH2r5mv-2MPzd-zJSxDXh5avC4Bhp-BJG9nmr2f=1FR5m6B3Zg@mail.gmail.com>
2023-01-04  6:13     ` [PATCH 1/2] cifs: ignore ipc reconnect failures during dfs failover Steve French

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221229201029.lajhejwbbtca6poc@suse.de \
    --to=ematsumiya@suse.de \
    --cc=linux-cifs@vger.kernel.org \
    --cc=pc@cjr.nz \
    --cc=smfrench@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox