From: Pavel Shilovsky <piastryyy@gmail.com>
To: Paulo Alcantara <pc@cjr.nz>
Cc: "Aurélien Aptel" <aaptel@suse.com>,
linux-cifs <linux-cifs@vger.kernel.org>
Subject: Re: [PATCH cifs-utils] mount.cifs: handle multiple ip addresses per hostname
Date: Thu, 8 Jul 2021 16:00:19 -0700 [thread overview]
Message-ID: <CAKywueQV6AeQmN7v489oudW7NYQuJmt1xryuQvUZnpR+MjXLXQ@mail.gmail.com> (raw)
In-Reply-To: <877dk5jfny.fsf@cjr.nz>
Hi Paulo,
Are you planning to post another version of this patch? If there is
already one HI which I missed, please let me know.
--
Best regards,
Pavel Shilovsky
вт, 11 мая 2021 г. в 11:20, Paulo Alcantara <pc@cjr.nz>:
>
> Aurélien Aptel <aaptel@suse.com> writes:
>
> > I would put in the commit msg that this requires recent kernel.
>
> Agreed.
>
> > We should probably merge kernel code first so we can reference it here
> > in the commit msg, and say in the man page when did the kernel change.
>
> Agreed.
>
> > There can be cases where cifs-utils is more recent than kernel and
> > mount.cifs will pass all the ip instead of trying them before passing
> > the good one to the kernel but since it's an old kernel it won't try
> > them all.
>
> Good point! Yes, we should handle both cases.
>
> > We could add an option to enable new behavior or check the kernel
> > version from within mount.cifs.. thoughts?
>
> I don't like the idea of checking the version because the running kernel
> might not have the expected patches.
>
> Perhaps a new option would be better... I'll think more about it.
>
> > Paulo Alcantara <pc@cjr.nz> writes:
> >>
> >> +static void set_ip_params(char *options, size_t options_size, char *addrlist)
> >> +{
> >> + char *s = addrlist + strlen(addrlist), *q = s;
> >> + char tmp;
> >> +
> >> + do {
> >> + for (; s >= addrlist && *s != ','; s--);
> >> + tmp = *q;
> >> + *q = '\0';
> >> + strlcat(options, *options ? ",ip=" : "ip=", options_size);
> >> + strlcat(options, s + 1, options_size);
> >> + *q = tmp;
> >> + } while (q = s--, s >= addrlist);
> >> +}
> >
> > I think you should write this in a clearer way and comment, this is hard
> > to read.
>
> That's horrible, indeed. I'll definitely make it readable in next
> version.
>
> > I was going to say should we return errors if we truncate the ips, but
> > none of the mount.cifs.c code checks for truncation so I guess we can
> > ignore.
>
> IIRC, yes.
next prev parent reply other threads:[~2021-07-08 23:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-11 16:39 [PATCH cifs-utils] mount.cifs: handle multiple ip addresses per hostname Paulo Alcantara
2021-05-11 17:46 ` Aurélien Aptel
2021-05-11 18:06 ` Steve French
2021-05-11 18:20 ` Paulo Alcantara
2021-07-08 23:00 ` Pavel Shilovsky [this message]
2021-07-09 14:50 ` 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=CAKywueQV6AeQmN7v489oudW7NYQuJmt1xryuQvUZnpR+MjXLXQ@mail.gmail.com \
--to=piastryyy@gmail.com \
--cc=aaptel@suse.com \
--cc=linux-cifs@vger.kernel.org \
--cc=pc@cjr.nz \
/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;
as well as URLs for NNTP newsgroup(s).