xfs: Some bugfixes
commitca104cd54f6c6546cc3e542d98dbfa6d0be0f675
authorPaulo Alcantara <pcacjr@zytor.com>
Sat, 14 Jul 2012 09:41:18 +0000 (14 06:41 -0300)
committerPaulo Alcantara <pcacjr@zytor.com>
Sat, 21 Jul 2012 04:21:46 +0000 (21 01:21 -0300)
tree0625807e8b3e95c5cb55bc838b68631e9f611222
parentf65e6cbd5514d64e50a3d5cee7baab1172a7a239
xfs: Some bugfixes

XFS inodes never share filesystem blocks with anything else. The driver
used to calculate wrong the offset within a chunk of inode found in inode
B+trees. The correct calculation is to get the lower bits of the inode
number (which is the inode number within a chunk) and multiply by inode
size to get the right offset.

The "bb_rumrecs" and "bb_level" fields (found in leaf entries of inode
B+trees) were being read incorrectly, since they're all stored in
big-endian on disk and we did not convert them to litte-endian respectively.

Besides, fix some memory leaks.

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