tech-kern archive

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

Re: GSoC-2016



by posting code you mean I send it to you, on email right? or tech-kern mailing list?

And in ext2fs_lookup.c
in function ext2fs_dirbadentry()
else if (reclen % 4 != 0)
	error_msg = "rec_len % 4 != 0";

why does this part of code necessary ?


On Sun, Jul 24, 2016 at 10:56 PM, Christos Zoulas <christos%zoulas.com@localhost> wrote:
On Jul 24,  5:52pm, hrishi.goyal%gmail.com@localhost (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



Home | Main Index | Thread Index | Old Index