Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b4e9181e authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Alex Elder
Browse files

xfs: remove unused delta tracking code in xfs_bmapi



This code was introduced four years ago in commit
3e57ecf6 without any review and has
been unused since.  Remove it just as the rest of the code introduced
in that commit to reduce that stack usage and complexity in this central
piece of code.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
parent cd8b0bb3
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -974,7 +974,7 @@ xfs_aops_discard_page(
		 */
		 */
		error = xfs_bmapi(NULL, ip, offset_fsb, 1,
		error = xfs_bmapi(NULL, ip, offset_fsb, 1,
				XFS_BMAPI_ENTIRE,  NULL, 0, &imap,
				XFS_BMAPI_ENTIRE,  NULL, 0, &imap,
				&nimaps, NULL, NULL);
				&nimaps, NULL);


		if (error) {
		if (error) {
			/* something screwed, just bail */
			/* something screwed, just bail */
@@ -1002,7 +1002,7 @@ xfs_aops_discard_page(
		 */
		 */
		xfs_bmap_init(&flist, &firstblock);
		xfs_bmap_init(&flist, &firstblock);
		error = xfs_bunmapi(NULL, ip, offset_fsb, 1, 0, 1, &firstblock,
		error = xfs_bunmapi(NULL, ip, offset_fsb, 1, 0, 1, &firstblock,
					&flist, NULL, &done);
					&flist, &done);


		ASSERT(!flist.xbf_count && !flist.xbf_first);
		ASSERT(!flist.xbf_count && !flist.xbf_first);
		if (error) {
		if (error) {
+2 −2
Original line number Original line Diff line number Diff line
@@ -414,7 +414,7 @@ xfs_zero_last_block(
	last_fsb = XFS_B_TO_FSBT(mp, isize);
	last_fsb = XFS_B_TO_FSBT(mp, isize);
	nimaps = 1;
	nimaps = 1;
	error = xfs_bmapi(NULL, ip, last_fsb, 1, 0, NULL, 0, &imap,
	error = xfs_bmapi(NULL, ip, last_fsb, 1, 0, NULL, 0, &imap,
			  &nimaps, NULL, NULL);
			  &nimaps, NULL);
	if (error) {
	if (error) {
		return error;
		return error;
	}
	}
@@ -509,7 +509,7 @@ xfs_zero_eof(
		nimaps = 1;
		nimaps = 1;
		zero_count_fsb = end_zero_fsb - start_zero_fsb + 1;
		zero_count_fsb = end_zero_fsb - start_zero_fsb + 1;
		error = xfs_bmapi(NULL, ip, start_zero_fsb, zero_count_fsb,
		error = xfs_bmapi(NULL, ip, start_zero_fsb, zero_count_fsb,
				  0, NULL, 0, &imap, &nimaps, NULL, NULL);
				  0, NULL, 0, &imap, &nimaps, NULL);
		if (error) {
		if (error) {
			ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL|XFS_IOLOCK_EXCL));
			ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL|XFS_IOLOCK_EXCL));
			return error;
			return error;
+2 −2
Original line number Original line Diff line number Diff line
@@ -385,7 +385,7 @@ xfs_qm_dqalloc(
			      XFS_BMAPI_METADATA | XFS_BMAPI_WRITE,
			      XFS_BMAPI_METADATA | XFS_BMAPI_WRITE,
			      &firstblock,
			      &firstblock,
			      XFS_QM_DQALLOC_SPACE_RES(mp),
			      XFS_QM_DQALLOC_SPACE_RES(mp),
			      &map, &nmaps, &flist, NULL))) {
			      &map, &nmaps, &flist))) {
		goto error0;
		goto error0;
	}
	}
	ASSERT(map.br_blockcount == XFS_DQUOT_CLUSTER_SIZE_FSB);
	ASSERT(map.br_blockcount == XFS_DQUOT_CLUSTER_SIZE_FSB);
@@ -501,7 +501,7 @@ xfs_qm_dqtobp(
		error = xfs_bmapi(NULL, quotip, dqp->q_fileoffset,
		error = xfs_bmapi(NULL, quotip, dqp->q_fileoffset,
				  XFS_DQUOT_CLUSTER_SIZE_FSB,
				  XFS_DQUOT_CLUSTER_SIZE_FSB,
				  XFS_BMAPI_METADATA,
				  XFS_BMAPI_METADATA,
				  NULL, 0, &map, &nmaps, NULL, NULL);
				  NULL, 0, &map, &nmaps, NULL);


		xfs_iunlock(quotip, XFS_ILOCK_SHARED);
		xfs_iunlock(quotip, XFS_ILOCK_SHARED);
		if (error)
		if (error)
+1 −1
Original line number Original line Diff line number Diff line
@@ -1490,7 +1490,7 @@ xfs_qm_dqiterate(
				  maxlblkcnt - lblkno,
				  maxlblkcnt - lblkno,
				  XFS_BMAPI_METADATA,
				  XFS_BMAPI_METADATA,
				  NULL,
				  NULL,
				  0, map, &nmaps, NULL, NULL);
				  0, map, &nmaps, NULL);
		xfs_iunlock(qip, XFS_ILOCK_SHARED);
		xfs_iunlock(qip, XFS_ILOCK_SHARED);
		if (error)
		if (error)
			break;
			break;
+5 −5
Original line number Original line Diff line number Diff line
@@ -1977,7 +1977,7 @@ xfs_attr_rmtval_get(xfs_da_args_t *args)
		error = xfs_bmapi(args->trans, args->dp, (xfs_fileoff_t)lblkno,
		error = xfs_bmapi(args->trans, args->dp, (xfs_fileoff_t)lblkno,
				  args->rmtblkcnt,
				  args->rmtblkcnt,
				  XFS_BMAPI_ATTRFORK | XFS_BMAPI_METADATA,
				  XFS_BMAPI_ATTRFORK | XFS_BMAPI_METADATA,
				  NULL, 0, map, &nmap, NULL, NULL);
				  NULL, 0, map, &nmap, NULL);
		if (error)
		if (error)
			return(error);
			return(error);
		ASSERT(nmap >= 1);
		ASSERT(nmap >= 1);
@@ -2056,7 +2056,7 @@ xfs_attr_rmtval_set(xfs_da_args_t *args)
				  XFS_BMAPI_ATTRFORK | XFS_BMAPI_METADATA |
				  XFS_BMAPI_ATTRFORK | XFS_BMAPI_METADATA |
							XFS_BMAPI_WRITE,
							XFS_BMAPI_WRITE,
				  args->firstblock, args->total, &map, &nmap,
				  args->firstblock, args->total, &map, &nmap,
				  args->flist, NULL);
				  args->flist);
		if (!error) {
		if (!error) {
			error = xfs_bmap_finish(&args->trans, args->flist,
			error = xfs_bmap_finish(&args->trans, args->flist,
						&committed);
						&committed);
@@ -2107,7 +2107,7 @@ xfs_attr_rmtval_set(xfs_da_args_t *args)
				  args->rmtblkcnt,
				  args->rmtblkcnt,
				  XFS_BMAPI_ATTRFORK | XFS_BMAPI_METADATA,
				  XFS_BMAPI_ATTRFORK | XFS_BMAPI_METADATA,
				  args->firstblock, 0, &map, &nmap,
				  args->firstblock, 0, &map, &nmap,
				  NULL, NULL);
				  NULL);
		if (error) {
		if (error) {
			return(error);
			return(error);
		}
		}
@@ -2172,7 +2172,7 @@ xfs_attr_rmtval_remove(xfs_da_args_t *args)
					args->rmtblkcnt,
					args->rmtblkcnt,
					XFS_BMAPI_ATTRFORK | XFS_BMAPI_METADATA,
					XFS_BMAPI_ATTRFORK | XFS_BMAPI_METADATA,
					args->firstblock, 0, &map, &nmap,
					args->firstblock, 0, &map, &nmap,
					args->flist, NULL);
					args->flist);
		if (error) {
		if (error) {
			return(error);
			return(error);
		}
		}
@@ -2210,7 +2210,7 @@ xfs_attr_rmtval_remove(xfs_da_args_t *args)
		error = xfs_bunmapi(args->trans, args->dp, lblkno, blkcnt,
		error = xfs_bunmapi(args->trans, args->dp, lblkno, blkcnt,
				    XFS_BMAPI_ATTRFORK | XFS_BMAPI_METADATA,
				    XFS_BMAPI_ATTRFORK | XFS_BMAPI_METADATA,
				    1, args->firstblock, args->flist,
				    1, args->firstblock, args->flist,
				    NULL, &done);
				    &done);
		if (!error) {
		if (!error) {
			error = xfs_bmap_finish(&args->trans, args->flist,
			error = xfs_bmap_finish(&args->trans, args->flist,
						&committed);
						&committed);
Loading