All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shyam Prasad N <nspmangalore@gmail.com>
To: "Steve French" <smfrench@gmail.com>,
	"Paulo Alcantara" <pc@cjr.nz>, "Aurélien Aptel" <aaptel@suse.com>,
	CIFS <linux-cifs@vger.kernel.org>
Subject: [PATCH] cifs: use the expiry output of dns_query to schedule next resolution
Date: Thu, 20 May 2021 23:30:42 +0530	[thread overview]
Message-ID: <CANT5p=qzxhOjAY_s9NMsiS5F4FtsNJXytHbihF+esv+n4ytDvw@mail.gmail.com> (raw)

Hi,

We recently fixed DNS resolution of the server hostname during reconnect.
However, server IP address may change, even when the old one continues
to server (although sub-optimally).

We should schedule the next DNS resolution based on the TTL of
the DNS record used for the last resolution. This way, we resolve the
server hostname again when a DNS record expires.

Please review the changes.

@Paulo Alcantara I know this can create merge conflicts when your
patch gets merged.
I can rebase my changes on top of yours when it gets merged.

@David Howells
Something worth noting here is that the keyutils key.dns_resolver
upcall resolves the hostname, but does not return the expiry time. I'm
falling back to a default value of 600s for now.

I assumed that this commit of yours was a workaround to this exact
problem in getaddrinfo().
https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git/commit/?id=75e7568dc516db698093b33ea273e1b4a30b70be
Have you since been able derive the TTL field from the DNS records?

https://github.com/sprasad-microsoft/smb-kernel-client/pull/1

-- 
Regards,
Shyam

             reply	other threads:[~2021-05-20 18:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-20 18:00 Shyam Prasad N [this message]
2021-05-20 18:09 ` [PATCH] cifs: use the expiry output of dns_query to schedule next resolution Paulo Alcantara

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='CANT5p=qzxhOjAY_s9NMsiS5F4FtsNJXytHbihF+esv+n4ytDvw@mail.gmail.com' \
    --to=nspmangalore@gmail.com \
    --cc=aaptel@suse.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.