From: Federico Sauter <fsauter-LVkJPw3T+odGBRGhe+f61g@public.gmane.org>
To: Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: Scott Lovenberg
<scott.lovenberg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
sjayaraman-IBi9RG/b67k@public.gmane.org
Subject: Re: [PATCH] Convert slashes in the UNC parameter to backslashes
Date: Thu, 08 Nov 2012 13:16:25 +0100 [thread overview]
Message-ID: <509BA299.4000805@innominate.com> (raw)
In-Reply-To: <20121107132107.007a031d-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
On 11/07/2012 07:21 PM, Jeff Layton wrote:
>>>
>>> The tricky part is how to get there from here. The mount helper
>>> provides this option pretty much unconditionally, though it generally
>>> generates it from the device string. Maybe something like this?
>>>
>>> 1) fix the kernel to parse a copy of the UNC out of the device string
>>>
>>> 2) compare that UNC to the one provided by the unc= option
>>>
>>> 3) if they differ, then printk a warning that mentions that there is a
>>> discrepancy and that the kernel is going to use the value of the unc=
>>> option for now, but that we'll change that default in two releases.
>>>
>>> Something like:
>>>
>>> "CIFS VFS: the unc= mount option differs from the device passed in. Using
>>> the value of the unc= option. The kernel will begin preferring the value
>>> in the device string in 3.10!"
>>>
>>> Then, have a patch ready to go for the 3.10 merge window that will make
>>> the kernel start ignoring the value of the unc= option. You might even
>>> be nice and keep the comparison and warning around for a little while,
>>> but switch it to mention that the kernel is going to ignore the value
>>> of the unc= option when there is a discrepancy.
>>>
>>> In another few releases, we can then get rid of the warning and
>>> comparison too.
>>>
>>> Sound reasonable?
>>>
>>
>> Would it be reasonable to deprecate the "UNC" / "path" / "target"
>> options (they all resolve to OPT_UNC from parse_opt_token()) in
>> mount.cifs if the kernel is going to do the heavy lifting? That would
>> break compatibility between mount.cifs and older kernels, though. I
>> guess it doesn't hurt anything to keep passing UNC even if it's not
>> being used, other than users not understanding the unexplained
>> behavior of the kernel deciding what the actual value of UNC is and
>> disregarding their explicit setting of it. After typing that out, it
>> sounds kind of bad.
>
> Eventually, yes...we'd stop the mount helper from providing a unc=
> option as well. That said, we'll have to contend with the old kernel +
> new userspace problem for quite a while, so that can't happen at the
> same time.
>
> The first step is to get the kernel to where it doesn't actually need
> the option. Once that's done we can formulate a plan to stop providing
> it.
>
I came across this issue precisely because I was using a mount helper
different than samba (busybox, to be precise.) Thus, the unc parameter
was being passed in a slightly different way and thus an error message
resulted. This is to say that, if we radically changed the
unc/path/target options interface, it would most likely break existing
mount implementations.
I suggest that we just copy the device name as UNC in the parse_options
function and ignore whatever the user had provided explicitly without
issuing any warnings. I personally like warnings, but the current
situation is that this option is implicitly passed by the mount helper,
and thus it would most likely confuse users more than it helps them.
Please let me know what you think. I can quickly provide a tested patch,
if you agree to the course of action.
Best regards,
--
Federico Sauter / Senior firmware programmer
Innominate Security Technologies AG / protecting industrial networks
tel: +49.30.921028-210 / fax: +49.30.921028-020
Rudower Chaussee 13 / D-12489 Berlin / http://www.innominate.com/
Register Court: AG Charlottenburg, HR B 81603
Management Board: Dirk Seewald
Chairman of the Supervisory Board: Christoph Leifer
next prev parent reply other threads:[~2012-11-08 12:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-06 12:29 [PATCH] Convert slashes in the UNC parameter to backslashes Federico Sauter
[not found] ` <509902BB.6020400-LVkJPw3T+odGBRGhe+f61g@public.gmane.org>
2012-11-07 12:02 ` Jeff Layton
[not found] ` <20121107070239.1140fe68-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2012-11-07 15:20 ` Federico Sauter
[not found] ` <509A7C36.8080800-LVkJPw3T+odGBRGhe+f61g@public.gmane.org>
2012-11-07 15:48 ` Jeff Layton
[not found] ` <20121107104853.12935810-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2012-11-07 16:42 ` Scott Lovenberg
[not found] ` <CAFB9KM02kdNwrNVO42r67emTaiRshSB1+sxDOwnOpNwSUyskZQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-11-07 18:21 ` Jeff Layton
[not found] ` <20121107132107.007a031d-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2012-11-08 12:16 ` Federico Sauter [this message]
[not found] ` <509BA299.4000805-LVkJPw3T+odGBRGhe+f61g@public.gmane.org>
2012-11-09 11:19 ` Jeff Layton
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=509BA299.4000805@innominate.com \
--to=fsauter-lvkjpw3t+odgbrghe+f61g@public.gmane.org \
--cc=jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=scott.lovenberg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=sjayaraman-IBi9RG/b67k@public.gmane.org \
--cc=smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
/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.