|
Re: inode allocation: msg#00019file-systems.ext2.devel
On Mon, 27 Oct 2003, Andreas Dilger wrote: >On Oct 27, 2003 19:43 +0000, Drew P. Vogel wrote: >> Currently inodes are allocated in a way that a file created will be >> assigned the inode of the last file removed, assuming no other files have >> been created since the file was removed. >> >> In shell scrict terms, after running this: >> >> touch file >> a=`stat -c %i file` >> rm file >> touch file >> b=`stat -c %i file` >> >> $a eq $b. This makes it difficult to determine if those two files are >> different. > >Doing "cp /etc/hosts file" also makes them different but keeps the same >name and inode number. What exactly are you trying to achieve? In the >rm/create case, the inode generation will be different, but that isn't >exported via fstat - you need to do ioctl(fd, EXT2_IOC_GETVERSION, &version) >to know that, and it still doesn't help you if the file was modified but >not unlinked. Given two lists of files I'm trying to determine which files are new, removed, or modified. On ext2 there isn't a straight-foward way to determine whether a file is modified or removed and recreated if the removal and creation happens between the times the two lists are created. Regards, Drew Vogel ------------------------------------------------------- This SF.net email is sponsored by: The SF.net Donation Program. Do you like what SourceForge.net is doing for the Open Source Community? Make a contribution, and help us add new features and functionality. Click here: http://sourceforge.net/donate/ |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: inode allocation: 00019, Andreas Dilger |
|---|---|
| Next by Date: | Re: inode allocation: 00019, Andreas Dilger |
| Previous by Thread: | Re: inode allocationi: 00019, Andreas Dilger |
| Next by Thread: | Re: inode allocation: 00019, Andreas Dilger |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |