[Box Backup] Question about mount-point parsing

Ben Summers boxbackup@fluffy.co.uk
Mon, 13 Dec 2004 21:08:43 +0000


On 13 Dec 2004, at 21:04, Joe Krahn wrote:

> Ben Summers wrote:
>> On 13 Dec 2004, at 17:18, Joe Krahn wrote:
>>> Is the mount-point lookup in BackupDaemon.cpp related to avoiding 
>>> 'one filesystem' problems?
>> No.
>>>
>>> The comment says:
>>> // Linux can't tell you where a directory is mounted. So we have to
>>> // read the mount entries from /etc/mtab! Bizarre that the OS itself
>>> // can't tell you, but there you go.
>>>
>>> This is sort of what the stat.st_dev field is for, but not exactly. 
>>> Depends what you're trying to do.
>> For this purpose, the integer device ID isn't good enough and the 
>> actual name is required.
>>
> OK, but what is the purpose of determining the mount point?

To know which of file and directory tracking database to use. The inode 
numbers are used to track files so that if they're renamed, it can 
issue a rename command instead of uploading the data again.

Ben