From: Brian Foster <bfoster@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 13/14] xfs: remove xfs_bmap_search_extents
Date: Thu, 17 Nov 2016 14:12:47 -0500 [thread overview]
Message-ID: <20161117191246.GO49658@bfoster.bfoster> (raw)
In-Reply-To: <1479143565-30615-14-git-send-email-hch@lst.de>
On Mon, Nov 14, 2016 at 06:12:44PM +0100, Christoph Hellwig wrote:
> Now that all users are gone.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
Reviewed-by: Brian Foster <bfoster@redhat.com>
> fs/xfs/libxfs/xfs_bmap.c | 91 ------------------------------------------------
> fs/xfs/libxfs/xfs_bmap.h | 4 ---
> 2 files changed, 95 deletions(-)
>
> diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
> index 4aa9c07..856d98d 100644
> --- a/fs/xfs/libxfs/xfs_bmap.c
> +++ b/fs/xfs/libxfs/xfs_bmap.c
> @@ -1370,97 +1370,6 @@ xfs_bmap_read_extents(
> return -EFSCORRUPTED;
> }
>
> -
> -/*
> - * Search the extent records for the entry containing block bno.
> - * If bno lies in a hole, point to the next entry. If bno lies
> - * past eof, *eofp will be set, and *prevp will contain the last
> - * entry (null if none). Else, *lastxp will be set to the index
> - * of the found entry; *gotp will contain the entry.
> - */
> -STATIC xfs_bmbt_rec_host_t * /* pointer to found extent entry */
> -xfs_bmap_search_multi_extents(
> - xfs_ifork_t *ifp, /* inode fork pointer */
> - xfs_fileoff_t bno, /* block number searched for */
> - int *eofp, /* out: end of file found */
> - xfs_extnum_t *lastxp, /* out: last extent index */
> - xfs_bmbt_irec_t *gotp, /* out: extent entry found */
> - xfs_bmbt_irec_t *prevp) /* out: previous extent entry found */
> -{
> - xfs_bmbt_rec_host_t *ep; /* extent record pointer */
> - xfs_extnum_t lastx; /* last extent index */
> -
> - /*
> - * Initialize the extent entry structure to catch access to
> - * uninitialized br_startblock field.
> - */
> - gotp->br_startoff = 0xffa5a5a5a5a5a5a5LL;
> - gotp->br_blockcount = 0xa55a5a5a5a5a5a5aLL;
> - gotp->br_state = XFS_EXT_INVALID;
> - gotp->br_startblock = 0xffffa5a5a5a5a5a5LL;
> - prevp->br_startoff = NULLFILEOFF;
> -
> - ep = xfs_iext_bno_to_ext(ifp, bno, &lastx);
> - if (lastx > 0) {
> - xfs_bmbt_get_all(xfs_iext_get_ext(ifp, lastx - 1), prevp);
> - }
> - if (lastx < xfs_iext_count(ifp)) {
> - xfs_bmbt_get_all(ep, gotp);
> - *eofp = 0;
> - } else {
> - if (lastx > 0) {
> - *gotp = *prevp;
> - }
> - *eofp = 1;
> - ep = NULL;
> - }
> - *lastxp = lastx;
> - return ep;
> -}
> -
> -/*
> - * Search the extents list for the inode, for the extent containing bno.
> - * If bno lies in a hole, point to the next entry. If bno lies past eof,
> - * *eofp will be set, and *prevp will contain the last entry (null if none).
> - * Else, *lastxp will be set to the index of the found
> - * entry; *gotp will contain the entry.
> - */
> -xfs_bmbt_rec_host_t * /* pointer to found extent entry */
> -xfs_bmap_search_extents(
> - xfs_inode_t *ip, /* incore inode pointer */
> - xfs_fileoff_t bno, /* block number searched for */
> - int fork, /* data or attr fork */
> - int *eofp, /* out: end of file found */
> - xfs_extnum_t *lastxp, /* out: last extent index */
> - xfs_bmbt_irec_t *gotp, /* out: extent entry found */
> - xfs_bmbt_irec_t *prevp) /* out: previous extent entry found */
> -{
> - xfs_ifork_t *ifp; /* inode fork pointer */
> - xfs_bmbt_rec_host_t *ep; /* extent record pointer */
> -
> - XFS_STATS_INC(ip->i_mount, xs_look_exlist);
> - ifp = XFS_IFORK_PTR(ip, fork);
> -
> - ep = xfs_bmap_search_multi_extents(ifp, bno, eofp, lastxp, gotp, prevp);
> -
> - if (unlikely(!(gotp->br_startblock) && (*lastxp != NULLEXTNUM) &&
> - !(XFS_IS_REALTIME_INODE(ip) && fork == XFS_DATA_FORK))) {
> - xfs_alert_tag(ip->i_mount, XFS_PTAG_FSBLOCK_ZERO,
> - "Access to block zero in inode %llu "
> - "start_block: %llx start_off: %llx "
> - "blkcnt: %llx extent-state: %x lastx: %x",
> - (unsigned long long)ip->i_ino,
> - (unsigned long long)gotp->br_startblock,
> - (unsigned long long)gotp->br_startoff,
> - (unsigned long long)gotp->br_blockcount,
> - gotp->br_state, *lastxp);
> - *lastxp = NULLEXTNUM;
> - *eofp = 1;
> - return NULL;
> - }
> - return ep;
> -}
> -
> /*
> * Returns the file-relative block number of the first unused block(s)
> * in the file with at least "len" logically contiguous blocks free.
> diff --git a/fs/xfs/libxfs/xfs_bmap.h b/fs/xfs/libxfs/xfs_bmap.h
> index e3c2b5a..ffed1f9 100644
> --- a/fs/xfs/libxfs/xfs_bmap.h
> +++ b/fs/xfs/libxfs/xfs_bmap.h
> @@ -237,10 +237,6 @@ int xfs_bmap_shift_extents(struct xfs_trans *tp, struct xfs_inode *ip,
> struct xfs_defer_ops *dfops, enum shift_direction direction,
> int num_exts);
> int xfs_bmap_split_extent(struct xfs_inode *ip, xfs_fileoff_t split_offset);
> -struct xfs_bmbt_rec_host *
> - xfs_bmap_search_extents(struct xfs_inode *ip, xfs_fileoff_t bno,
> - int fork, int *eofp, xfs_extnum_t *lastxp,
> - struct xfs_bmbt_irec *gotp, struct xfs_bmbt_irec *prevp);
> int xfs_bmapi_reserve_delalloc(struct xfs_inode *ip, int whichfork,
> xfs_fileoff_t aoff, xfs_filblks_t len,
> struct xfs_bmbt_irec *got, xfs_extnum_t *lastx, int eof);
> --
> 2.1.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-11-17 19:12 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-14 17:12 new helpers to clean up extent tree lookups Christoph Hellwig
2016-11-14 17:12 ` [PATCH 01/14] xfs: new inode extent list lookup helpers Christoph Hellwig
2016-11-17 18:11 ` Brian Foster
2016-11-14 17:12 ` [PATCH 02/14] xfs: cleanup xfs_bmap_last_before Christoph Hellwig
2016-11-17 18:11 ` Brian Foster
2016-11-18 8:16 ` Christoph Hellwig
2016-11-14 17:12 ` [PATCH 03/14] xfs: use new extent lookup helpers in xfs_bmapi_read Christoph Hellwig
2016-11-17 18:11 ` Brian Foster
2016-11-14 17:12 ` [PATCH 04/14] xfs: use new extent lookup helpers in xfs_bmapi_write Christoph Hellwig
2016-11-17 18:12 ` Brian Foster
2016-11-14 17:12 ` [PATCH 05/14] xfs: use new extent lookup helpers in __xfs_bunmapi Christoph Hellwig
2016-11-17 18:12 ` Brian Foster
2016-11-14 17:12 ` [PATCH 06/14] xfs: remove prev argument to xfs_bmapi_reserve_delalloc Christoph Hellwig
2016-11-17 18:27 ` Brian Foster
2016-11-18 8:19 ` Christoph Hellwig
2016-11-18 13:19 ` Brian Foster
2016-11-14 17:12 ` [PATCH 07/14] xfs: use new extent lookup helpers xfs_file_iomap_begin_delay Christoph Hellwig
2016-11-17 18:33 ` Brian Foster
2016-11-18 8:20 ` Christoph Hellwig
2016-11-18 13:20 ` Brian Foster
2016-11-14 17:12 ` [PATCH 08/14] xfs: use new extent lookup helpers in __xfs_reflink_reserve_cow Christoph Hellwig
2016-11-17 19:07 ` Brian Foster
2016-11-14 17:12 ` [PATCH 09/14] xfs: cleanup xfs_reflink_find_cow_mapping Christoph Hellwig
2016-11-17 19:07 ` Brian Foster
2016-11-14 17:12 ` [PATCH 10/14] xfs: use new extent lookup helpers in xfs_reflink_trim_irec_to_next_cow Christoph Hellwig
2016-11-17 19:07 ` Brian Foster
2016-11-14 17:12 ` [PATCH 11/14] xfs: use new extent lookup helpers in xfs_reflink_cancel_cow_blocks Christoph Hellwig
2016-11-17 19:07 ` Brian Foster
2016-11-14 17:12 ` [PATCH 12/14] xfs: use new extent lookup helpers in xfs_reflink_end_cow Christoph Hellwig
2016-11-17 19:07 ` Brian Foster
2016-11-14 17:12 ` [PATCH 13/14] xfs: remove xfs_bmap_search_extents Christoph Hellwig
2016-11-17 19:12 ` Brian Foster [this message]
2016-11-14 17:12 ` [PATCH 14/14] xfs: remove NULLEXTNUM Christoph Hellwig
2016-11-17 19:12 ` Brian Foster
2016-11-19 0:21 ` new helpers to clean up extent tree lookups Eric Sandeen
2016-11-21 17:17 ` Christoph Hellwig
-- strict thread matches above, loose matches on Subject: below --
2016-11-21 16:38 new helpers to clean up extent tree lookups V2 Christoph Hellwig
2016-11-21 16:38 ` [PATCH 13/14] xfs: remove xfs_bmap_search_extents Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161117191246.GO49658@bfoster.bfoster \
--to=bfoster@redhat.com \
--cc=hch@lst.de \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.