Re: A Question on inode - ext3FS

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

 



>It's an application issue.

Thank you all.Here is detailed info. of what i did:

I have created two files file7 and file8 using vi :
[root@localhost ~]# vi file7
[root@localhost ~]# vi file8

and added content "this "
and here is the ls output :

[root@localhost ~]# ls -il file7
6933339 -rw-r--r-- 1 root root 5 2008-11-26 20:56 file7
[root@localhost ~]# ls -il file8
6933340 -rw-r--r-- 1 root root 5 2008-11-26 20:56 file8

Now i changed the permission for file8 :
[root@localhost ~]# chmod 777 file8
[root@localhost ~]# ls -il file8
6933340 -rwxrwxrwx 1 root root 5 2008-11-26 20:56 file8


(After changing chmod inode remains same,since file8 data block are
not modified.)

Now i added / appended new character to both files using vi command

[root@localhost ~]# vi file7
[root@localhost ~]# ls -il file7
6933311 -rw-r--r-- 1 root root 7 2008-11-26 20:58 file7

As expected size and timestamp are updated . And along with inode
numbers.(Earlier it was 6933339 -- now it is 6933311)

[root@localhost ~]# vi file8
[root@localhost ~]# ls -il file8
6933340 -rwxrwxrwx 1 root root 7 2008-11-26 20:58 file8
[root@localhost ~]#

But see here ,the inode remains the same(6933340) - though the content
is modified

Is

Now i changed the file mode to 644 :

[root@localhost ~]# chmod 644 file8
[root@localhost ~]# ls -il file8
6933340 -rw-r--r-- 1 root root 7 2008-11-26 20:58 file8

and appended a new character

[root@localhost ~]# ls -il file8
6933451 -rw-r--r-- 1 root root 8 2008-11-26 21:07 file8
...now the inode is also changed.(from 6933340 to 6933451)


My doubts are :
1)Does files permission play any role in determining inode number of
file when it's getting editted?
2)How application can decide on whether new inode / older inode,so far
i thought it depends on functionality of filesystem/kernel.
(I found edit files using different application like gedit doesn't
change the inode.but vi changes inodes)

(I have written little ext3 undelete tools,understanding these
concepts will help me lot,If my assumption are wrong please correct
me.)

-- 
Cheers,
Lakshmipathi.G

_______________________________________________
Ext3-users mailing list
Ext3-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/ext3-users

[Index of Archives]         [Linux RAID]     [Kernel Development]     [Red Hat Install]     [Video 4 Linux]     [Postgresql]     [Fedora]     [Gimp]     [Yosemite News]

  Powered by Linux