tux3: Support ->f_namelen for statfs()

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Daniel Phillips <daniel@tux3.org>
tux3: Use #define MAX_GROUP_ENTRIES 255 for kernel

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Daniel Phillips <daniel@tux3.org>
tux3: Change set_buffer_dirty() to mark_buffer_dirty()

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Daniel Phillips <daniel@tux3.org>
tux3: Call mark_buffer_dirty() after modification for new_leaf()

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Daniel Phillips <daniel@tux3.org>
tux3: Call mark_buffer_dirty() after modification for new_node()

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Daniel Phillips <daniel@tux3.org>
tux3: Add write_inode() handler without sync mode

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Daniel Phillips <daniel@tux3.org>
tux3: Respell "struct tux_path" as "struct cursor" in line with btree locking design note, and "levels" as "depth" for consistency.

Signed-off-by: Daniel Phillips <daniel@tux3.org>
tux3: Also release leaf buffer on error path in leaf_split

Signed-off-by: Daniel Phillips <daniel@tux3.org>
tux3: Caller pass &sb->itable, so just use it

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Daniel Phillips <daniel@tux3.org>
tux3: Fix dwalk_back() to pass dleaf test

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Daniel Phillips <daniel@tux3.org>
tux3: Introduce get_index() helper

group_keyhi() is unsigned, it is right. But, to create index we have
to keyhi << 24, so it will be overflow.

To avoid it, we use this helper to creates index, and this return
index with proper cast.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Daniel Phillips <daniel@tux3.org>
tux3: Move dwalk stuff to bottom of dleaf.c

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Daniel Phillips <daniel@tux3.org>
tux3: Add the comment for dwalk

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Daniel Phillips <daniel@tux3.org>
tux3: Remove unneeded release_cursor() in filemap_extent_io()

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Daniel Phillips <daniel@tux3.org>
tux3: Fix error path in blockread()

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Daniel Phillips <daniel@tux3.org>
tux3: Use inum_t instead of unsigned for tux_create_entry()

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Daniel Phillips <daniel@tux3.org>
tux3: Fix tux_create_entry(), and returns proper error number

This checks existing entries, but it uses blockget(), we should use
blockread() for it.

And if error, it returns -EIO.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Daniel Phillips <daniel@tux3.org>
tux3: Fix tux_readdir, check buffer == NULL before use it

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Daniel Phillips <daniel@tux3.org>
tux3: Support metadata write

To write metadata this uses pdflush or something like normal file. For
it, this adds ->writepage* handlers.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Daniel Phillips <daniel@tux3.org>
tux3: Change tux3_dir_* to tux3_blk_*

Now, tux3_dir_* handlers is used for other metadatas.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Daniel Phillips <daniel@tux3.org>