From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1ED0FC3A5A0 for ; Mon, 20 Apr 2020 18:21:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C38FE206B8 for ; Mon, 20 Apr 2020 18:21:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=cjr.nz header.i=@cjr.nz header.b="JeY6U99P" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728064AbgDTSVh (ORCPT ); Mon, 20 Apr 2020 14:21:37 -0400 Received: from mx.cjr.nz ([51.158.111.142]:21034 "EHLO mx.cjr.nz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727980AbgDTSVd (ORCPT ); Mon, 20 Apr 2020 14:21:33 -0400 Received: from authenticated-user (mx.cjr.nz [51.158.111.142]) (Authenticated sender: pc) by mx.cjr.nz (Postfix) with ESMTPSA id 701BB7FCFC; Mon, 20 Apr 2020 18:21:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cjr.nz; s=dkim; t=1587406891; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=XLtiuMGzfer0pae2SDTC3iJPxGcLgbM+htJ0fXQblHE=; b=JeY6U99PmBoc7K2kOj51HYcjWJeX3//jnLGabU3mmTwXpybaIMRJQSxLX8x/+7gxTOCSTr Hv9mwFQRIWgFkU0lT98JLFFXxsnrL4qfqJunWNNOnIL/KrXOyC5lZOjKcC3YlFTbGDQtU6 xiDiGgZdH4R3VvQD3aMCGUX/PVZDmGHawAflJgUTW+n36YLIYoSEEDxOfqo/4tk0toZJoJ QvV5XbHnd5OBz63WIKMLqBxjEsMaOct1YcZv5TRbzGMxha3OUejx3dbWx7r5NQRWS/QhUO DPFmdQUzLUwfD0GPDW+5vaZskSiTqXTNvqVn7Ckm/7Bq1RKQO5JmzPsQb+bzrA== From: Paulo Alcantara To: David Howells Cc: dhowells@redhat.com, Steve French , linux-nfs , CIFS , linux-afs@lists.infradead.org, ceph-devel@vger.kernel.org, keyrings@vger.kernel.org, Network Development , LKML , fweimer@redhat.com Subject: Re: What's a good default TTL for DNS keys in the kernel In-Reply-To: <1136024.1587388420@warthog.procyon.org.uk> References: <87imhvj7m6.fsf@cjr.nz> <3865908.1586874010@warthog.procyon.org.uk> <927453.1587285472@warthog.procyon.org.uk> <1136024.1587388420@warthog.procyon.org.uk> Date: Mon, 20 Apr 2020 15:21:23 -0300 Message-ID: <878siq587w.fsf@cjr.nz> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org David Howells writes: > Paulo Alcantara wrote: > >> >> For SMB3/CIFS mounts, Paulo added support last year for automatic >> >> reconnect if the IP address of the server changes. It also is helpful >> >> when DFS (global name space) addresses change. >> > >> > What happens if the IP address the superblock is going to changes, then >> > another mount is made back to the original IP address? Does the second mount >> > just pick the original superblock? >> >> It is going to transparently reconnect to the new ip address, SMB share, >> and cifs superblock is kept unchanged. We, however, update internal >> TCP_Server_Info structure to reflect new destination ip address. >> >> For the second mount, since the hostname (extracted out of the UNC path >> at mount time) resolves to a new ip address and that address was saved earlier >> in TCP_Server_Info structure during reconnect, we will end up >> reusing same cifs superblock as per fs/cifs/connect.c:cifs_match_super(). > > Would that be a bug? Probably. I'm not sure how that code is supposed to work, TBH.