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

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

 



On 03/02/2012 02:27 PM, Malahal Naineni wrote:
>> Question, How does this patch stop the mtab from getting polluted with
>> the device name with multiple "/"? 
> 
> It doesn't. Is that a problem? It only matches entries in /etc/mtab and
> /proc/mounts correctly for unmount to work.
> 
Well the problem I was working on was when a mount like
the following is done:
    mount server://export /mnt 

the umount /mnt will fail because the device name was written to 
/proc/mounts has the // stripped:

    server:/export /mnt nfs4 rw,relatime,vers=4...
 
but the device name in the mtab did not:

    rhelhat://home /mnt/home nfs rw,vers=4,... 

So what my patch does is "normalizes" the device name early
on in main, so the correct name used used through the mount
and when its written the mtab. Plus, for better or worses, 
since the new device name will always be shorter, I just 
reuse/rewrite the memory allocated for the argv vector.. 
Meaning there is no allocation... 

steved.
--
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