lkml.org 
[lkml]   [1998]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Inode problem
> 	If between theses 2 ops. there is aafaiulure, I guess the inode is
> allocated on disk but cannot be accessed thru dir.
>
> So how can we access this inode?

You have to invoke e2fsck. This will go over the entire disk, and
locate the inode which is not connected to a directory. It will
then recover the inode, and put it into lost+found if appropriate.

> Can anyone direct me to the appropriate kernel code for this ...

Looking at fs/ext2/namei.c:ext2_create, you can see that the inode
is allocated with ext2_new_inode. Then, the directory is modified with
ext2_add_entry. Finally, if in synchronous mode, create waits for
the directory be written back to disk.

In asynchronous mode, the disk driver might chose to write back
in a different order, so all other kinds of corruptions might happen.

Regards,
Martin

\
 
 \ /
  Last update: 2005-03-22 13:41    [W:0.022 / U:0.472 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site