@@ -196,6 +196,13 @@ dblock_help(void)
));
}
+static inline bool
+is_rtfile(
+ struct xfs_dinode *dip)
+{
+ return dip->di_flags & cpu_to_be16(XFS_DIFLAG_REALTIME);
+}
+
static int
dblock_f(
int argc,
@@ -235,8 +242,14 @@ dblock_f(
ASSERT(typtab[type].typnm == type);
if (nex > 1)
make_bbmap(&bbmap, nex, bmp);
- set_cur(&typtab[type], (int64_t)XFS_FSB_TO_DADDR(mp, dfsbno),
- nb * blkbb, DB_RING_ADD, nex > 1 ? &bbmap : NULL);
+ if (is_rtfile(iocur_top->data))
+ set_rt_cur(&typtab[type], (int64_t)dfsbno << mp->m_blkbb_log,
+ nb * blkbb, DB_RING_ADD,
+ nex > 1 ? &bbmap : NULL);
+ else
+ set_cur(&typtab[type], (int64_t)XFS_FSB_TO_DADDR(mp, dfsbno),
+ nb * blkbb, DB_RING_ADD,
+ nex > 1 ? &bbmap : NULL);
free(bmp);
return 0;
}
@@ -323,7 +323,9 @@ fa_drtbno(
dbprintf(_("null block number, cannot set new addr\n"));
return;
}
- /* need set_cur to understand rt subvolume */
+
+ set_rt_cur(&typtab[next], (int64_t)XFS_FSB_TO_BB(mp, bno), blkbb,
+ DB_RING_ADD, NULL);
}
/*ARGSUSED*/