From: Brian Foster <bfoster@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 1/4] xfs: move xfs_bmbt_to_iomap up
Date: Thu, 25 Aug 2016 08:38:00 -0400 [thread overview]
Message-ID: <20160825123800.GA25041@bfoster.bfoster> (raw)
In-Reply-To: <1471816273-28940-2-git-send-email-hch@lst.de>
On Sun, Aug 21, 2016 at 11:51:10PM +0200, Christoph Hellwig wrote:
> We'll need it earlier in the file soon, so the unchanged function to the
> top of xfs_iomap.c
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
Reviewed-by: Brian Foster <bfoster@redhat.com>
> fs/xfs/xfs_iomap.c | 52 ++++++++++++++++++++++++++--------------------------
> 1 file changed, 26 insertions(+), 26 deletions(-)
>
> diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c
> index 2af0dda..ba3592f 100644
> --- a/fs/xfs/xfs_iomap.c
> +++ b/fs/xfs/xfs_iomap.c
> @@ -44,6 +44,32 @@
> << mp->m_writeio_log)
> #define XFS_WRITE_IMAPS XFS_BMAP_MAX_NMAP
>
> +void
> +xfs_bmbt_to_iomap(
> + struct xfs_inode *ip,
> + struct iomap *iomap,
> + struct xfs_bmbt_irec *imap)
> +{
> + struct xfs_mount *mp = ip->i_mount;
> +
> + if (imap->br_startblock == HOLESTARTBLOCK) {
> + iomap->blkno = IOMAP_NULL_BLOCK;
> + iomap->type = IOMAP_HOLE;
> + } else if (imap->br_startblock == DELAYSTARTBLOCK) {
> + iomap->blkno = IOMAP_NULL_BLOCK;
> + iomap->type = IOMAP_DELALLOC;
> + } else {
> + iomap->blkno = xfs_fsb_to_db(ip, imap->br_startblock);
> + if (imap->br_state == XFS_EXT_UNWRITTEN)
> + iomap->type = IOMAP_UNWRITTEN;
> + else
> + iomap->type = IOMAP_MAPPED;
> + }
> + iomap->offset = XFS_FSB_TO_B(mp, imap->br_startoff);
> + iomap->length = XFS_FSB_TO_B(mp, imap->br_blockcount);
> + iomap->bdev = xfs_find_bdev_for_inode(VFS_I(ip));
> +}
> +
> STATIC int
> xfs_iomap_eof_align_last_fsb(
> xfs_mount_t *mp,
> @@ -947,32 +973,6 @@ error_on_bmapi_transaction:
> return error;
> }
>
> -void
> -xfs_bmbt_to_iomap(
> - struct xfs_inode *ip,
> - struct iomap *iomap,
> - struct xfs_bmbt_irec *imap)
> -{
> - struct xfs_mount *mp = ip->i_mount;
> -
> - if (imap->br_startblock == HOLESTARTBLOCK) {
> - iomap->blkno = IOMAP_NULL_BLOCK;
> - iomap->type = IOMAP_HOLE;
> - } else if (imap->br_startblock == DELAYSTARTBLOCK) {
> - iomap->blkno = IOMAP_NULL_BLOCK;
> - iomap->type = IOMAP_DELALLOC;
> - } else {
> - iomap->blkno = xfs_fsb_to_db(ip, imap->br_startblock);
> - if (imap->br_state == XFS_EXT_UNWRITTEN)
> - iomap->type = IOMAP_UNWRITTEN;
> - else
> - iomap->type = IOMAP_MAPPED;
> - }
> - iomap->offset = XFS_FSB_TO_B(mp, imap->br_startoff);
> - iomap->length = XFS_FSB_TO_B(mp, imap->br_blockcount);
> - iomap->bdev = xfs_find_bdev_for_inode(VFS_I(ip));
> -}
> -
> static inline bool imap_needs_alloc(struct xfs_bmbt_irec *imap, int nimaps)
> {
> return !nimaps ||
> --
> 2.1.4
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2016-08-25 12:38 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-21 21:51 iomap write fixes Christoph Hellwig
2016-08-21 21:51 ` [PATCH 1/4] xfs: move xfs_bmbt_to_iomap up Christoph Hellwig
2016-08-25 12:38 ` Brian Foster [this message]
2016-08-21 21:51 ` [PATCH 2/4] xfs: factor our a helper to calculate the EOF alignment Christoph Hellwig
2016-08-25 12:38 ` Brian Foster
2016-08-21 21:51 ` [PATCH 3/4] xfs: make xfs_inode_set_eofblocks_tag cheaper for the common case Christoph Hellwig
2016-08-25 12:38 ` Brian Foster
2016-08-26 14:26 ` Christoph Hellwig
2016-08-26 16:02 ` Brian Foster
2016-08-30 14:40 ` Christoph Hellwig
2016-08-30 23:03 ` Dave Chinner
2016-08-21 21:51 ` [PATCH 4/4] xfs: rewrite and optimize the delalloc write path Christoph Hellwig
2016-08-25 14:37 ` Brian Foster
2016-08-26 14:33 ` Christoph Hellwig
2016-08-26 16:03 ` Brian Foster
2016-08-26 16:07 ` Brian Foster
2016-08-30 14:44 ` Christoph Hellwig
2016-08-30 20:28 ` Brian Foster
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=20160825123800.GA25041@bfoster.bfoster \
--to=bfoster@redhat.com \
--cc=hch@lst.de \
--cc=xfs@oss.sgi.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).