On Wed, Apr 09, 2025 at 09:55:44AM +0200, Christoph Hellwig wrote: > Handle the synthetic fmr_device values for fsmap. > > Signed-off-by: Christoph Hellwig <hch@xxxxxx> Looks correct to me Reviewed-by: "Darrick J. Wong" <djwong@xxxxxxxxxx> --D > --- > spaceman/freesp.c | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) > > diff --git a/spaceman/freesp.c b/spaceman/freesp.c > index dfbec52a7160..9ad321c4843f 100644 > --- a/spaceman/freesp.c > +++ b/spaceman/freesp.c > @@ -140,12 +140,19 @@ scan_ag( > if (agno != NULLAGNUMBER) { > l->fmr_physical = cvt_agbno_to_b(xfd, agno, 0); > h->fmr_physical = cvt_agbno_to_b(xfd, agno + 1, 0); > - l->fmr_device = h->fmr_device = file->fs_path.fs_datadev; > + if (file->xfd.fsgeom.rtstart) > + l->fmr_device = XFS_DEV_DATA; > + else > + l->fmr_device = file->fs_path.fs_datadev; > } else { > l->fmr_physical = 0; > h->fmr_physical = ULLONG_MAX; > - l->fmr_device = h->fmr_device = file->fs_path.fs_rtdev; > + if (file->xfd.fsgeom.rtstart) > + l->fmr_device = XFS_DEV_RT; > + else > + l->fmr_device = file->fs_path.fs_rtdev; > } > + h->fmr_device = l->fmr_device; > h->fmr_owner = ULLONG_MAX; > h->fmr_flags = UINT_MAX; > h->fmr_offset = ULLONG_MAX; > -- > 2.47.2 > >