Re: [PATCH] Check for beginning '/' in the mount path

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

 



On 02/03/2012 04:29 PM, Malahal Naineni wrote:
> NeilBrown [neilb@xxxxxxx] wrote:
>> On Fri, 3 Feb 2012 13:15:12 +0200 Boaz Harrosh <bharrosh@xxxxxxxxxxx> wrote:
>>
>>> On 02/03/2012 03:42 AM, Malahal Naineni wrote:
>>>> NFSv4 gladly accepts and mounts "hostname:path" instead of
>>>> "hostname:/path". This causes mount entry mistmatch between /etc/mtab
>>>> and /proc/mounts files. The former will have "hostname:path" but the
>>>> latter will have "hostname:/path". This causes umount not work at all.
>>>>
>>>
>>> NACK
>>>
>>> like it or not you are changing ABI. Bunch of systems will not work now.
>>>
>>> Also some other NFS servers/clients support it fine. Actually some servers
>>> make it a special case. (It's called mount by tag)
>>>
>>> The bug is else where fix it there. Either add the preceding '/' to
>>> /etc/mtab or remove it from /proc/mounts (I prefer the later). Or
>>                                             ^^^^^^^^^^^^^^^^^^
>>> fix umount to work with that case.
>>
>> Agreed.  And while we are at it we should remove the trailing '/' too.
>> If you
>>   mount host:/path /somewhere
>> /proc/mounts will show
>>     host:/path/
>>
>> which also confused mount.
> 
> Thank you Neil and Boaz. Since there is already a fix in umount to take
> care of trailing slash, I will post a patch to take care of leading
> slash.
> 
> Any reason(s) why trailing slash is fixed in umount rather than in
> /proc/mounts?
> 

Thank you Malahal.

I think that both fixes to umount are important for future/backward compatibility
with Kernel, And general code resilience. 

But some kind sole should fix both breakages in /proc/mounts, for sure.
Would you know how to fix it?

> Thanks, Malahal.
> 

Thanks
Boaz
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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