--- linux-2.6-xfs.orig/fs/xfs/xfsidbg.c 2008-09-16 00:10:26.000000000 -0500 +++ linux-2.6-xfs/fs/xfs/xfsidbg.c 2008-09-16 09:44:52.000000000 -0500 @@ -2054,6 +2054,7 @@ kdbm_bp(int argc, const char **argv) static int kdbm_bpdelay(int argc, const char **argv) { +#if 0 struct list_head *xfs_buftarg_list = xfs_get_buftarg_list(); struct list_head *curr, *next; xfs_buftarg_t *tp, *n; @@ -2091,6 +2092,7 @@ kdbm_bpdelay(int argc, const char **argv } } } +#endif return 0; } @@ -3831,21 +3833,32 @@ xfs_rw_trace_entry(ktrace_entry_t *ktep) static void xfs_xexlist_fork(xfs_inode_t *ip, int whichfork) { - int nextents, i; + int nextents, nlists, i; xfs_ifork_t *ifp; xfs_bmbt_irec_t irec; + xfs_bmbt_rec_host_t *rec_h; ifp = XFS_IFORK_PTR(ip, whichfork); if (ifp->if_flags & XFS_IFEXTENTS) { nextents = ifp->if_bytes / (uint)sizeof(xfs_bmbt_rec_t); - kdb_printf("inode 0x%p %cf extents 0x%p nextents 0x%x\n", + nlists = ifp->if_real_bytes / XFS_IEXT_BUFSZ; + kdb_printf("inode 0x%p %cf extents 0x%p nextents %d nlists %d\n", ip, "da"[whichfork], xfs_iext_get_ext(ifp, 0), - nextents); + nextents,nlists); for (i = 0; i < nextents; i++) { - xfs_bmbt_get_all(xfs_iext_get_ext(ifp, i), &irec); + rec_h = xfs_iext_get_ext(ifp, i); + + if (ifp->if_flags & XFS_IFEXTIREC) { + xfs_ext_irec_t *erp; /* irec pointer */ + int erp_idx = 0; /* irec index */ + xfs_extnum_t page_idx = i; /* ext index in target list */ + erp = xfs_iext_idx_to_irec(ifp, &page_idx, &erp_idx, 0); + kdb_printf("page_idx %d erp_idx %d\t",page_idx,erp_idx); + } + xfs_bmbt_get_all(rec_h, &irec); kdb_printf( - "%d: startoff %Ld startblock %s blockcount %Ld flag %d\n", - i, irec.br_startoff, + "%d: addr 0x%p startoff %Ld startblock %s blockcount %Ld flag %d\n", + i, rec_h, irec.br_startoff, xfs_fmtfsblock(irec.br_startblock, ip->i_mount), irec.br_blockcount, irec.br_state); }