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

Re: [NFS] Re: Is ext3 kernel nfsd friendly?

Neil Brown writes:
> I haven't looked at ext3 or played with it but in order for a
> filesystem to work with knfsd (in it's current form) it must:

Neil, I sent Stephen a patch to update ext3 with the same changes that
went into ext2 2.2.17 and 2.2.18, which include your NFS changes.

>   Support the read_inode super_operation and 
>    1/ recognise if the inode number refers to a currently active inode
>        or not
>    2a/ if not, must return an is_bad_inode() inode.

The (2a - return bad_inode for deleted inodes) step unfortunately breaks
ext3 recovery.  It is somewhat difficult to fix, because one of the ext3
recovery steps involves cleaning up "orphan" inodes - inodes which were
previously unlinked but held open by a process, so not deleted.  The
cleanup involves doing an iget() and iput() on the inode to re-delete it.
If iget() returns bad_inode, then the orphan cleanup step will fail.

I think I have fixed this, so I will submit it to Stephen.

>    2b/ if so must provide a completely filled-in inode (nfs doesn't for
>        example. ext2 does, ext3 almost certainly does).
>    3/ The "delete_inode" super_operation must cope gracefully with
>       being given an is_bad_inode.
>    4/ Should keep a "generation" number in the inode-on-disk, should
>       assigned a "new" value to this when the inode is allocated, and
>       should store this value in the i_generation field of the "struct
>       inode".

My patch should clean all of this up for ext3, assuming it all works in
ext2.  It should make it into ext3-0.0.6.

Cheers, Andreas
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert

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