// SPDX-License-Identifier: GPL-2.0+/* * Copyright (C) 2017 Oracle. All Rights Reserved. * Author: Darrick J. Wong <darrick.wong@oracle.com> */#include"xfs.h"#include"xfs_fs.h"#include"xfs_shared.h"#include"xfs_format.h"#include"xfs_log_format.h"#include"xfs_trans_resv.h"#include"xfs_mount.h"#include"xfs_inode.h"#include"xfs_trans.h"#include"xfs_btree.h"#include"xfs_rmap_btree.h"#include"xfs_trace.h"#include"xfs_rmap.h"#include"xfs_alloc.h"#include"xfs_bit.h"#include<linux/fsmap.h>#include"xfs_fsmap.h"#include"xfs_refcount.h"#include"xfs_refcount_btree.h"#include"xfs_alloc_btree.h"#include"xfs_rtbitmap.h"#include"xfs_ag.h"#include"xfs_rtgroup.h"#include"xfs_rtrmap_btree.h"#include"xfs_rtrefcount_btree.h"/* Convert an xfs_fsmap to an fsmap. */staticvoidxfs_fsmap_from_internal(structfsmap*dest,structxfs_fsmap*src){dest->fmr_device=src->fmr_device;dest->fmr_flags=src->fmr_flags;dest->fmr_physical=BBTOB(src->fmr_physical);dest->fmr_owner=src->fmr_owner;dest->fmr_offset=BBTOB(src->fmr_offset);dest->fmr_length=BBTOB(src->fmr_length);dest->fmr_reserved[0]=0;dest->fmr_reserved[1]=0;dest->fmr_reserved[2]=0;}/* Convert an fsmap to an xfs_fsmap. */staticvoidxfs_fsmap_to_internal(structxfs_fsmap*dest,structfsmap*src){dest->fmr_device=src->fmr_device;dest->fmr_flags=src->fmr_flags;dest->fmr_physical=BTOBBT(src->fmr_physical);dest