xfs: Add xfs_iget() to filesystem ops
commit533d97658da0fb3ae0930c58520bf7a27177fa8f
authorPaulo Alcantara <pcacjr@zytor.com>
Fri, 13 Jul 2012 19:45:56 +0000 (13 16:45 -0300)
committerPaulo Alcantara <pcacjr@zytor.com>
Sat, 21 Jul 2012 04:21:46 +0000 (21 01:21 -0300)
tree3474424a78c24f6c2b6334b6e42c0f765cb4e6e9
parent15b96c3fa40825b2469e3e86fd820d58976631d9
xfs: Add xfs_iget() to filesystem ops

xfs_iget() function is responsible for finding an entry from a given
filename and parent inode of the entry being looked up.

XFS_INO_TO_FSB() returns a sparse enconding of the disk location, and not
the right filesystem block number we expected to have from the wrong byte
offset.

Now, there is a ino_to_bytes() macro who calculates correctly the block
offset from a given inode number, and then we get the *right* filesystem
block number we expected.

Also, use agnumber_to_bytes() in order to get the right filesystem block
where the given AG number resides.

Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
core/fs/xfs/xfs.c
core/fs/xfs/xfs.h