Re: [Tux3] symlink, truncate, unlink, link, and some bug fixes

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Daniel Phillips <phillips@...>
Cc: <tux3@...>
Date: Sunday, December 7, 2008 - 12:13 pm

Daniel Phillips writes:

> It all looks beautiful, and as usual, it builds cleanly, passes all the

Thanks

> One idea on the links count attribute: as a later optimization, how

Sounds good. I think we can use that rule for all inode attributes.

Store attribute only if it is not initial value.

For internal inodes, we can use 1, or 2 if dir (just use initial value).
i_mode, i_uid, i_gid are 0 as initial value, so internal inodes don't
need MODE_OWNER_ATTR too. Well, finally, I guess the internal inode will
have only DATA_BTREE_ATTR.

Maybe, the issue would be overhead. I think this optimization means it
may change total data size in ileaf to store. So, it may become cause
of changing the btree depth (I'm not sure this cost is cheap or not).

> Link count for a directory is always 2 + number of subdirectories.

FWIW, as just FYI, The following is fs/isofs/inode.c:1262

if (de->flags[-high_sierra] & 2) {
inode->i_mode = sbi->s_dmode | S_IFDIR;
inode->i_nlink = 1; /*
* Set to 1. We know there are 2, but
* the find utility tries to optimize
* if it is 2, and it screws up. It is
* easier to give 1 which tells find to
* do it the hard way.
*/

It seems to use 1 for find command.

Well, I think we can do - if is_dir && inode->i_link != 2, it is stored.

> Then we also would not have to store the size attribute for a

This is about phtree? Well, anyway, we would have to cleanup present
flags, because we are using CTIME_SIZE_BIT (ctime + size).
--
OGAWA Hirofumi

_______________________________________________
Tux3 mailing list
Tux3@tux3.org
http://mailman.tux3.org/cgi-bin/mailman/listinfo/tux3

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[Tux3] Tux3 kernel port - introduction, Daniel Phillips, (Tue Aug 26, 7:04 pm)
Re: [Tux3] symlink, truncate, unlink, link, and some bug fixes, OGAWA Hirofumi, (Sun Dec 7, 12:13 pm)
Re: [Tux3] Tux3 kernel port - about ext2_get_inode, Daniel Phillips, (Wed Aug 27, 1:42 am)
Re: [Tux3] Tux3 kernel port - about ext2_get_inode, Daniel Phillips, (Sat Aug 30, 7:49 pm)