Re: [PATCH] Get normalized paths for comparing NFS export paths

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2012-03-04 at 17:58 -0500, Steve Dickson wrote:
> On 03/04/2012 05:31 PM, Steve Dickson wrote:
> >> NFSv4 is the only protocol that has a standard mount path syntax, and
> >> that is because the client performs the job of interpreting the path
> >> name and translating it into PUTROOTFH followed by a bunch of LOOKUPs.
> >> IOW: the standard syntax there is the one imposed by the client.
> >>
> >> There is nothing in the NFSv2/v3 MOUNT spec that states that a path
> >> needs to start with '/'. Nor is there even anything in the spec that
> >> states that '/' is required to be used as the directory component
> >> separator. The X/OPEN docs state that '/' is recommended for
> >> portability, but do not make it a requirement. See
> >> http://pubs.opengroup.org/onlinepubs/9629799/chap8.htm#tagcjh_09_02_02_03 
> >>
> >> IOW: I'm perfectly allowed to set up a 'mountd' server that uses '\' or
> >> even something like '|' as a path component separator. This kind of
> >> patch would break the client's existing ability to mount from such a
> >> server.
> > And where does an server like this exist? One that uses '|' as its
> > path component separator?? ;-)
> > 
> > Just to be clear, you are ok with striping the multiple slashes, for
> > all protocol versions, but its only kosher to added the leading 
> > slash for v4 mounts. Correct?  
> After further review... it appears this is only a v4 issue since
> v3 mounts with multiple slashes appear in /proc/mounts with the
> multiple slashes (unlike v4 mounts)... 
> 
> So to restate... this normalizing of the path names (aka striping 
> multiple slashes or added the leading slash) only need to occur on 
> (successful) v4 mounts... Although the former would not be an 
> problem with v2/v3 mounts but its not needed....

Normalising for v4 only is OK as far as I'm concerned, but as an
alternative: is there any reason why you can't just grab the path from
'/proc/mounts'?

-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@xxxxxxxxxx
www.netapp.com

��.n��������+%������w��{.n�����{��w���jg��������ݢj����G�������j:+v���w�m������w�������h�����٥



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux