Daniel,
Looks like we have some work cut out to make recovery work correctly now.
As an example look at the code for recovering inodes from the log:
It reads in the inode buffer and gets the inode log item, it then
directly copies one onto the other and writes it back out to disk.
The inode log item is recorded in xfs_inode_item_format() from the ip->i_d
part of the incore inode - which is in machine byte order. During recovery
this is directly copied into the inode buffer and written out to disk - so
we just byte flipped the inode core.
We could just use xfs_xlate_dinode_core() on the inode core to convert it,
we then need to look at all the other fields in the inode which can get logged
and do the byte flipping on those too, which looks like a lot of the
contents of xfs_iflush_fork(). I don't know if structures other than the
inode will have this problem.
I think we were under the impression that recovery was working when run on
the same architecture as previously mounted on, the only issues being when
we moved a disk from one architecture to another. As it stands, development
on the rest of xfs got more painful at the moment - since we cannot recovery
from the crashes we invariably create!
Steve
|