* [PATCH 0/7] Add mount option parsing facility to text-based mount.nfs
@ 2007-09-25 17:31 Chuck Lever
2007-09-26 0:59 ` Neil Brown
0 siblings, 1 reply; 4+ messages in thread
From: Chuck Lever @ 2007-09-25 17:31 UTC (permalink / raw)
To: neilb; +Cc: nfs
Hi Neil-
Seven more patches for text-based mount.nfs.
I found that it is necessary to do some rather advanced lexical parsing of
the mount option string in order to handle version/protocol fallback. So I've
implemented a data structure that can handle the parsing requirements, and
some wrapper logic to convert the mount option string to the new data
structure and then convert it back to a string before calling mount(2).
This series introduces the new facility and makes use of it for existing text-
based mount option processing (like adding "addr=" and so on). In subsequent
patches I will make more use of the new facility.
--
corporate: <chuck dot lever at oracle dot com>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 0/7] Add mount option parsing facility to text-based mount.nfs
2007-09-25 17:31 [PATCH 0/7] Add mount option parsing facility to text-based mount.nfs Chuck Lever
@ 2007-09-26 0:59 ` Neil Brown
2007-09-26 15:11 ` Chuck Lever
2007-09-27 17:31 ` Chuck Lever
0 siblings, 2 replies; 4+ messages in thread
From: Neil Brown @ 2007-09-26 0:59 UTC (permalink / raw)
To: Chuck Lever; +Cc: nfs
On Tuesday September 25, chuck.lever@oracle.com wrote:
> Hi Neil-
>
> Seven more patches for text-based mount.nfs.
>
> I found that it is necessary to do some rather advanced lexical parsing of
> the mount option string in order to handle version/protocol fallback. So I've
> implemented a data structure that can handle the parsing requirements, and
> some wrapper logic to convert the mount option string to the new data
> structure and then convert it back to a string before calling mount(2).
>
> This series introduces the new facility and makes use of it for existing text-
> based mount option processing (like adding "addr=" and so on). In subsequent
> patches I will make more use of the new facility.
Nice.
However: The current parsing of mount options (parse_opts,
parse_options) allows for "quotes" around options so that an option
can contain a comma (Gumble SELinux Grumble context=foo,bar Grumble).
Your mount option parsing doesn't allow for this. Should it?
NeilBrown
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 0/7] Add mount option parsing facility to text-based mount.nfs
2007-09-26 0:59 ` Neil Brown
@ 2007-09-26 15:11 ` Chuck Lever
2007-09-27 17:31 ` Chuck Lever
1 sibling, 0 replies; 4+ messages in thread
From: Chuck Lever @ 2007-09-26 15:11 UTC (permalink / raw)
To: Neil Brown; +Cc: nfs
[-- Attachment #1: Type: text/plain, Size: 1321 bytes --]
Neil Brown wrote:
> On Tuesday September 25, chuck.lever@oracle.com wrote:
>> Hi Neil-
>>
>> Seven more patches for text-based mount.nfs.
>>
>> I found that it is necessary to do some rather advanced lexical parsing of
>> the mount option string in order to handle version/protocol fallback. So I've
>> implemented a data structure that can handle the parsing requirements, and
>> some wrapper logic to convert the mount option string to the new data
>> structure and then convert it back to a string before calling mount(2).
>>
>> This series introduces the new facility and makes use of it for existing text-
>> based mount option processing (like adding "addr=" and so on). In subsequent
>> patches I will make more use of the new facility.
>
> Nice.
>
> However: The current parsing of mount options (parse_opts,
> parse_options) allows for "quotes" around options so that an option
> can contain a comma (Gumble SELinux Grumble context=foo,bar Grumble).
> Your mount option parsing doesn't allow for this. Should it?
I thought it did, but I didn't test this explicitly. It uses the same
tokenization logic that legacy NFSv4 does, so I assumed quoting would
work correctly.
Should I copy the ugly logic from nfsmount.c ?
(At this point, not sure the kernel option parser would support quoting
either...)
[-- Attachment #2: chuck.lever.vcf --]
[-- Type: text/x-vcard, Size: 315 bytes --]
begin:vcard
fn:Chuck Lever
n:Lever;Chuck
org:Oracle Corporation;Corporate Architecture: Linux Projects Group
adr:;;1015 Granger Avenue;Ann Arbor;MI;48104;USA
email;internet:chuck dot lever at nospam oracle dot com
title:Principal Member of Staff
tel;work:+1 248 614 5091
x-mozilla-html:FALSE
version:2.1
end:vcard
[-- Attachment #3: Type: text/plain, Size: 228 bytes --]
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
[-- Attachment #4: Type: text/plain, Size: 140 bytes --]
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 0/7] Add mount option parsing facility to text-based mount.nfs
2007-09-26 0:59 ` Neil Brown
2007-09-26 15:11 ` Chuck Lever
@ 2007-09-27 17:31 ` Chuck Lever
1 sibling, 0 replies; 4+ messages in thread
From: Chuck Lever @ 2007-09-27 17:31 UTC (permalink / raw)
To: Neil Brown; +Cc: nfs
[-- Attachment #1: Type: text/plain, Size: 1278 bytes --]
Neil Brown wrote:
> On Tuesday September 25, chuck.lever@oracle.com wrote:
>> Hi Neil-
>>
>> Seven more patches for text-based mount.nfs.
>>
>> I found that it is necessary to do some rather advanced lexical parsing of
>> the mount option string in order to handle version/protocol fallback. So I've
>> implemented a data structure that can handle the parsing requirements, and
>> some wrapper logic to convert the mount option string to the new data
>> structure and then convert it back to a string before calling mount(2).
>>
>> This series introduces the new facility and makes use of it for existing text-
>> based mount option processing (like adding "addr=" and so on). In subsequent
>> patches I will make more use of the new facility.
>
> Nice.
>
> However: The current parsing of mount options (parse_opts,
> parse_options) allows for "quotes" around options so that an option
> can contain a comma (Gumble SELinux Grumble context=foo,bar Grumble).
> Your mount option parsing doesn't allow for this. Should it?
Well, amusingly, the strtok(3) man page states this in its BUGS section:
"Avoid using these functions."
The mount option parser should definitely be aware of quotes. I'll
rework po_split() to handle quotes correctly, and resubmit the patches.
[-- Attachment #2: chuck.lever.vcf --]
[-- Type: text/x-vcard, Size: 315 bytes --]
begin:vcard
fn:Chuck Lever
n:Lever;Chuck
org:Oracle Corporation;Corporate Architecture: Linux Projects Group
adr:;;1015 Granger Avenue;Ann Arbor;MI;48104;USA
email;internet:chuck dot lever at nospam oracle dot com
title:Principal Member of Staff
tel;work:+1 248 614 5091
x-mozilla-html:FALSE
version:2.1
end:vcard
[-- Attachment #3: Type: text/plain, Size: 228 bytes --]
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
[-- Attachment #4: Type: text/plain, Size: 140 bytes --]
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-09-27 17:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-25 17:31 [PATCH 0/7] Add mount option parsing facility to text-based mount.nfs Chuck Lever
2007-09-26 0:59 ` Neil Brown
2007-09-26 15:11 ` Chuck Lever
2007-09-27 17:31 ` Chuck Lever
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox