> @@ -737,8 +738,8 @@ xfs_getfsmap_rtdev_rtbitmap_helper( > * we calculated from userspace's high key to synthesize the record. > * Note that if the btree query found a mapping, there won't be a gap. > */ > - if (info->last && info->end_daddr != XFS_BUF_DADDR_NULL) { > - frec.start_daddr = info->end_daddr; > + if (info->last) { > + frec.start_daddr = info->end_daddr + 1; > } else { > frec.start_daddr = xfs_rtb_to_daddr(mp, start_rtb); > } Nit: no need for the braces here. Otherwise looks good: Reviewed-by: Christoph Hellwig <hch@xxxxxx>