Hi I am trying all the ways to get htree write fixed. But there are few things in code that conceptually seems wrong like while loading a vnode for a given inode-number, code doesn't load all the informations in the struct inode. Specifically while reading a disk-inode for given inode-number returning vnode of corresponding disk-inode, which also has a pointer to struct inode of corresponding disk-inode. All the common(with disk-inode) fields of struct inode must be initialized with their corresponding value in disk-inode.
Another thing is since in NetBSD ext2fs share inode struct with ufs. But the i_flags bits may be representing different functionality in both. so I can't directly map e2di_flags in struct ext2fs_dinode to i_flags in struct inode. ideally we should be able to do inode->i_flags= ext2fs_dinode->e2di_flags likewise for other common fields Should I create a separate inode struct for ext2fs? That will rise the code to a nice structure, but for that we will need to do many other changes in the code that may cross gsoc time limit. Hrishikesh On Mon, Jul 25, 2016 at 1:46 AM, Christos Zoulas <[email protected]> wrote: > On Jul 24, 11:22pm, [email protected] (HRISHIKESH GOYAL) wrote: > -- Subject: Re: GSoC-2016 > > | > in function ext2fs_dirbadentry() > | > > | > else if (reclen % 4 != 0) > | > error_msg = "rec_len % 4 != 0"; > | > > | > why does this part of code necessary ? > | > > | > AFAIK its not only unnecessary but wrong also because in ext2fs > directory > | entry size is not necessarily be multiple of 4. (for eg if file name > length > | is 255 characters then also record length would be 255 + 8 = 263 bytes > | which is not multiple of 4. like that many other lengths are possible.) > > Most filesystems round up entries to a multiple of something. As far > as posting the code, sure post it to tech-kern. > > hcristos >
