提交 0173c689 编写于 作者: C Christoph Hellwig 提交者: Darrick J. Wong

xfs: use correct state defines in xfs_bmap_del_extent_{cow,delay}

Use the _FILLING values to match the usage in the xfs_bmap_add_extent_*
helpers.  No change in behavior, just better naming in the code and
tracepoint output.
Signed-off-by: NChristoph Hellwig <hch@lst.de>
Reported-by: NBrian Foster <bfoster@redhat.com>
Reviewed-by: NBrian Foster <bfoster@redhat.com>
Reviewed-by: NDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
上级 1b24b633
......@@ -4895,19 +4895,19 @@ xfs_bmap_del_extent_delay(
state |= BMAP_COWFORK;
if (got->br_startoff == del->br_startoff)
state |= BMAP_LEFT_CONTIG;
state |= BMAP_LEFT_FILLING;
if (got_endoff == del_endoff)
state |= BMAP_RIGHT_CONTIG;
state |= BMAP_RIGHT_FILLING;
switch (state & (BMAP_LEFT_CONTIG | BMAP_RIGHT_CONTIG)) {
case BMAP_LEFT_CONTIG | BMAP_RIGHT_CONTIG:
switch (state & (BMAP_LEFT_FILLING | BMAP_RIGHT_FILLING)) {
case BMAP_LEFT_FILLING | BMAP_RIGHT_FILLING:
/*
* Matches the whole extent. Delete the entry.
*/
xfs_iext_remove(ip, *idx, 1, state);
--*idx;
break;
case BMAP_LEFT_CONTIG:
case BMAP_LEFT_FILLING:
/*
* Deleting the first part of the extent.
*/
......@@ -4920,7 +4920,7 @@ xfs_bmap_del_extent_delay(
xfs_iext_update_extent(ifp, *idx, got);
trace_xfs_bmap_post_update(ip, *idx, state, _THIS_IP_);
break;
case BMAP_RIGHT_CONTIG:
case BMAP_RIGHT_FILLING:
/*
* Deleting the last part of the extent.
*/
......@@ -5005,19 +5005,19 @@ xfs_bmap_del_extent_cow(
ASSERT(!isnullstartblock(got->br_startblock));
if (got->br_startoff == del->br_startoff)
state |= BMAP_LEFT_CONTIG;
state |= BMAP_LEFT_FILLING;
if (got_endoff == del_endoff)
state |= BMAP_RIGHT_CONTIG;
state |= BMAP_RIGHT_FILLING;
switch (state & (BMAP_LEFT_CONTIG | BMAP_RIGHT_CONTIG)) {
case BMAP_LEFT_CONTIG | BMAP_RIGHT_CONTIG:
switch (state & (BMAP_LEFT_FILLING | BMAP_RIGHT_FILLING)) {
case BMAP_LEFT_FILLING | BMAP_RIGHT_FILLING:
/*
* Matches the whole extent. Delete the entry.
*/
xfs_iext_remove(ip, *idx, 1, state);
--*idx;
break;
case BMAP_LEFT_CONTIG:
case BMAP_LEFT_FILLING:
/*
* Deleting the first part of the extent.
*/
......@@ -5028,7 +5028,7 @@ xfs_bmap_del_extent_cow(
xfs_iext_update_extent(ifp, *idx, got);
trace_xfs_bmap_post_update(ip, *idx, state, _THIS_IP_);
break;
case BMAP_RIGHT_CONTIG:
case BMAP_RIGHT_FILLING:
/*
* Deleting the last part of the extent.
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部