提交 ec90c556 编写于 作者: C Christoph Hellwig 提交者: Alex Elder

xfs: remove if_lastex

The if_lastex field in struct xfs_ifork is only used as a temporary
index during xfs_bmapi and xfs_bunmapi.  Instead of using the inode
fork to store it keep it local in the callchain.  Fortunately this
is very easy as we already pass a stack copy of it down the whole
chain which can simplify be changed to be passed by reference.
Signed-off-by: NChristoph Hellwig <hch@lst.de>
Signed-off-by: NAlex Elder <aelder@sgi.com>
上级 54893273
此差异已折叠。
...@@ -920,7 +920,6 @@ xfs_iread_extents( ...@@ -920,7 +920,6 @@ xfs_iread_extents(
/* /*
* We know that the size is valid (it's checked in iformat_btree) * We know that the size is valid (it's checked in iformat_btree)
*/ */
ifp->if_lastex = NULLEXTNUM;
ifp->if_bytes = ifp->if_real_bytes = 0; ifp->if_bytes = ifp->if_real_bytes = 0;
ifp->if_flags |= XFS_IFEXTENTS; ifp->if_flags |= XFS_IFEXTENTS;
xfs_iext_add(ifp, 0, nextents); xfs_iext_add(ifp, 0, nextents);
...@@ -3191,7 +3190,6 @@ xfs_iext_add( ...@@ -3191,7 +3190,6 @@ xfs_iext_add(
} }
ifp->if_u1.if_extents = ifp->if_u2.if_inline_ext; ifp->if_u1.if_extents = ifp->if_u2.if_inline_ext;
ifp->if_real_bytes = 0; ifp->if_real_bytes = 0;
ifp->if_lastex = nextents + ext_diff;
} }
/* /*
* Otherwise use a linear (direct) extent list. * Otherwise use a linear (direct) extent list.
......
...@@ -67,7 +67,6 @@ typedef struct xfs_ifork { ...@@ -67,7 +67,6 @@ typedef struct xfs_ifork {
short if_broot_bytes; /* bytes allocated for root */ short if_broot_bytes; /* bytes allocated for root */
unsigned char if_flags; /* per-fork flags */ unsigned char if_flags; /* per-fork flags */
unsigned char if_ext_max; /* max # of extent records */ unsigned char if_ext_max; /* max # of extent records */
xfs_extnum_t if_lastex; /* last if_extents used */
union { union {
xfs_bmbt_rec_host_t *if_extents;/* linear map file exts */ xfs_bmbt_rec_host_t *if_extents;/* linear map file exts */
xfs_ext_irec_t *if_ext_irec; /* irec map file exts */ xfs_ext_irec_t *if_ext_irec; /* irec map file exts */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册