(gdb) bt
#0 0x000002aa0001baa4 in ocfs2_image_mark_bitmap (ofs=0x2aa0005a2c0, blkno=236353) at image.c:254
#1 0x000002aa00007678 in traverse_extents (ofs=0x2aa0005a2c0, el=0x2aa0007a8c0) at o2image.c:117
#2 0x000002aa00007faa in traverse_inode (ofs=0x2aa0005a2c0, inode=10) at o2image.c:317
#3 0x000002aa00007474 in traverse_group_desc (ofs=0x2aa0005a2c0, grp=0x2aa00077c00, dump_type=2, bpc=4) at o2image.c:76
#4 0x000002aa00007876 in traverse_chains (ofs=0x2aa0005a2c0, cl=0x2aa00076cc0, dump_type=2) at o2image.c:155
#5 0x000002aa00007e7c in traverse_inode (ofs=0x2aa0005a2c0, inode=12) at o2image.c:291
#6 0x000002aa00008f38 in scan_raw_disk (ofs=0x2aa0005a2c0) at o2image.c:633
#7 0x000002aa000096fc in main (argc=3, argv=0x3fffffffc18) at o2image.c:780
and its pointer is passed along the stack trace since frame #1 (scan_raw_disk).
It comes from:
* ocfs2_open is modified to be aware of OCFS2_FLAG_IMAGE_FILE.
* open routine allocates ocfs2_image_state and loads the bitmap if
* OCFS2_FLAG_IMAGE_FILE flag is passed in
ret = ocfs2_open(src_file,OCFS2_FLAG_RO|OCFS2_FLAG_NO_ECC_CHECKS|open_flags, 0,0, &ofs);
And likely related to how bitmap is disposed in the image file for a big endian arch.
ofs->ost pointer is not broken, because it comes from a malloc call after ofs was "allegedly" correctly read (which is not true in big endian arches):
ret = ocfs2_malloc0(sizeof(struct ocfs2_image_state),&ofs->ost);
(gdb) bt mark_bitmap (ofs=0x2aa0005a2c0, blkno=236353) at image.c:254
#0 0x000002aa0001baa4 in ocfs2_image_
#1 0x000002aa00007678 in traverse_extents (ofs=0x2aa0005a2c0, el=0x2aa0007a8c0) at o2image.c:117
#2 0x000002aa00007faa in traverse_inode (ofs=0x2aa0005a2c0, inode=10) at o2image.c:317
#3 0x000002aa00007474 in traverse_group_desc (ofs=0x2aa0005a2c0, grp=0x2aa00077c00, dump_type=2, bpc=4) at o2image.c:76
#4 0x000002aa00007876 in traverse_chains (ofs=0x2aa0005a2c0, cl=0x2aa00076cc0, dump_type=2) at o2image.c:155
#5 0x000002aa00007e7c in traverse_inode (ofs=0x2aa0005a2c0, inode=12) at o2image.c:291
#6 0x000002aa00008f38 in scan_raw_disk (ofs=0x2aa0005a2c0) at o2image.c:633
#7 0x000002aa000096fc in main (argc=3, argv=0x3fffffffc18) at o2image.c:780
ofs seems to be broken:
(gdb) print *(ofs) fff>, 51615, 51615, 51615, 51615, inode_alloc = 0xffffffffffffffff, eb_alloc = 0xffffffffffffffff,
dqi_free_ blk = 0,
dqi_free_ entry = 0
dqi_free_ blk = 0,
dqi_free_ entry = 0
$6 = {
fs_devname = 0xffffffffffffffff <error: Cannot access memory at address 0xfffffffffffff
fs_flags = 4294967295,
fs_io = 0xffffffffffffffff,
fs_super = 0xffffffffffffffff,
fs_orig_super = 0xffffffffffffffff,
fs_blocksize = 4294967295,
fs_clustersize = 4294967295,
fs_clusters = 4294967295,
fs_blocks = 184467440737095
fs_umask = 4294967295,
fs_root_blkno = 184467440737095
fs_sysdir_blkno = 184467440737095
fs_first_cg_blkno = 184467440737095
uuid_str = '\377' <repeats 33 times>,
fs_cluster_alloc = 0xffffffffffffffff,
fs_inode_allocs = 0xffffffffffffffff,
fs_system_
fs_eb_allocs = 0xffffffffffffffff,
fs_system_
fs_dlm_ctxt = 0xffffffffffffffff,
ost = 0x10002aa0005d040,
qinfo = {{
qi_inode = 0x0,
flags = 0,
qi_info = {
dqi_bgrace = 0,
dqi_igrace = 0,
dqi_syncms = 0,
dqi_blocks = 0,
}
}, {
qi_inode = 0x0,
flags = 0,
qi_info = {
dqi_bgrace = 0,
dqi_igrace = 0,
dqi_syncms = 0,
dqi_blocks = 0,
}
}},
fs_private = 0x0
}
and its pointer is passed along the stack trace since frame #1 (scan_raw_disk).
It comes from:
* ocfs2_open is modified to be aware of OCFS2_FLAG_ IMAGE_FILE. IMAGE_FILE flag is passed in
* open routine allocates ocfs2_image_state and loads the bitmap if
* OCFS2_FLAG_
ret = ocfs2_open( src_file, OCFS2_FLAG_ RO|OCFS2_ FLAG_NO_ ECC_CHECKS| open_flags, 0,0, &ofs);
And likely related to how bitmap is disposed in the image file for a big endian arch.
ofs->ost pointer is not broken, because it comes from a malloc call after ofs was "allegedly" correctly read (which is not true in big endian arches):
ret = ocfs2_malloc0( sizeof( struct ocfs2_image_ state), &ofs->ost) ;