mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
xfs: add a xfs_rmap_inode_owner helper
Add a small wrapper for initializing the rmap owner to i_ino. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com> Reviewed-by: "Darrick J. Wong" <djwong@kernel.org> Signed-off-by: Carlos Maiolino <cem@kernel.org>
This commit is contained in:
parent
ee237a900c
commit
f882fc7dd9
|
|
@ -819,7 +819,7 @@ xfs_bmap_local_to_extents(
|
|||
args.mp = ip->i_mount;
|
||||
args.total = total;
|
||||
args.minlen = args.maxlen = args.prod = 1;
|
||||
xfs_rmap_ino_owner(&args.oinfo, ip->i_ino, whichfork, 0);
|
||||
xfs_rmap_inode_owner(&args.oinfo, ip, whichfork, 0);
|
||||
|
||||
/*
|
||||
* Allocate a block. We know we need only one, since the
|
||||
|
|
|
|||
|
|
@ -37,6 +37,8 @@ xfs_rmap_ino_owner(
|
|||
if (whichfork == XFS_ATTR_FORK)
|
||||
oi->oi_flags |= XFS_OWNER_INFO_ATTR_FORK;
|
||||
}
|
||||
#define xfs_rmap_inode_owner(oi, ip, whichfork, offset) \
|
||||
xfs_rmap_ino_owner(oi, (ip)->i_ino, whichfork, offset)
|
||||
|
||||
static inline bool
|
||||
xfs_rmap_should_skip_owner_update(
|
||||
|
|
|
|||
|
|
@ -352,7 +352,7 @@ xchk_bmap_rt_iextent_xref(
|
|||
case XFS_DATA_FORK:
|
||||
xchk_bmap_xref_rmap(info, irec, rgbno);
|
||||
if (!xfs_is_reflink_inode(info->sc->ip)) {
|
||||
xfs_rmap_ino_owner(&oinfo, info->sc->ip->i_ino,
|
||||
xfs_rmap_inode_owner(&oinfo, info->sc->ip,
|
||||
info->whichfork, irec->br_startoff);
|
||||
xchk_xref_is_only_rt_owned_by(info->sc, rgbno,
|
||||
irec->br_blockcount, &oinfo);
|
||||
|
|
@ -407,7 +407,7 @@ xchk_bmap_iextent_xref(
|
|||
case XFS_DATA_FORK:
|
||||
xchk_bmap_xref_rmap(info, irec, agbno);
|
||||
if (!xfs_is_reflink_inode(info->sc->ip)) {
|
||||
xfs_rmap_ino_owner(&oinfo, info->sc->ip->i_ino,
|
||||
xfs_rmap_inode_owner(&oinfo, info->sc->ip,
|
||||
info->whichfork, irec->br_startoff);
|
||||
xchk_xref_is_only_owned_by(info->sc, agbno,
|
||||
irec->br_blockcount, &oinfo);
|
||||
|
|
@ -419,7 +419,7 @@ xchk_bmap_iextent_xref(
|
|||
break;
|
||||
case XFS_ATTR_FORK:
|
||||
xchk_bmap_xref_rmap(info, irec, agbno);
|
||||
xfs_rmap_ino_owner(&oinfo, info->sc->ip->i_ino,
|
||||
xfs_rmap_inode_owner(&oinfo, info->sc->ip,
|
||||
info->whichfork, irec->br_startoff);
|
||||
xchk_xref_is_only_owned_by(info->sc, agbno, irec->br_blockcount,
|
||||
&oinfo);
|
||||
|
|
|
|||
|
|
@ -1249,8 +1249,7 @@ xreap_bmapi_select(
|
|||
cur = xfs_rmapbt_init_cursor(sc->mp, sc->tp, sc->sa.agf_bp,
|
||||
sc->sa.pag);
|
||||
|
||||
xfs_rmap_ino_owner(&oinfo, rs->ip->i_ino, rs->whichfork,
|
||||
imap->br_startoff);
|
||||
xfs_rmap_inode_owner(&oinfo, rs->ip, rs->whichfork, imap->br_startoff);
|
||||
error = xfs_rmap_has_other_keys(cur, agbno, 1, &oinfo, crosslinked);
|
||||
if (error)
|
||||
goto out_cur;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user