On Jul 24,  5:52pm, hrishi.go...@gmail.com (HRISHIKESH GOYAL) wrote:
-- Subject: Re: GSoC-2016

| Hello,
| 
| sir, I am still struggling with htree index directory write support. The
| problem that I am facing currently is in  reading a directory file before
| writing a new entry. During reading a directory, for validating purpose
| kernel calls ext2fs_dirbadentry(). Issues were following:
| 1. By giving certain printfs I got to know that actual length of filename
| and e2d_namlen doesnot match.
| 2. For some files their partial names is only saved ( like a entry has file
| name "newf" which is supposed to be "newfile10") .
| 3. And at the end ext2fs_dirbadentry() fail to validate an entry ( file
| Name- "yyyy"  and inode no - some big number. other details is in the
| attached pic)
| 
| 
| might be problem is due to bad writing of entries by my htree directory
| code which has corrupted the entire directory structure. I am trying
| creating a new file-system disc image during each testing phase.

I think thst the best way is to write code that verifies that the directory
structure is valid after every index write. This could be done by a specialized
routine, or by calling the readdir routine after each write making sure
that it works.

| Another thing is I might consider building kernel by commenting DIAGNOSTIC
| in kernel configuration file which may avoid full validation check. But
| again its not the solution.

This would be moving in the wrong direction.

| Any suggestion will be helpful

Also you can post your code and tests with instructions how to reproduce the
problem and we can help you debug.

christos

Reply via email to