All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: Dave Chinner <david@fromorbit.com>
Cc: jack@suse.cz, xfs@oss.sgi.com
Subject: Re: [PATCH 3/3] xfs: set buf types when converting extent formats
Date: Wed, 21 Jan 2015 17:06:09 -0500	[thread overview]
Message-ID: <20150121220609.GD7960@laptop.bfoster> (raw)
In-Reply-To: <1421800780-26008-4-git-send-email-david@fromorbit.com>

On Wed, Jan 21, 2015 at 11:39:40AM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
> 
> Conversion from local to extent format does not set the buffer type
> correctly on the new extent buffer when a symlink data is moved out
> of line.
> 
> Fix the symlink code and leave a comment in the generic bmap code
> reminding us that the format-specific data copy needs to set the
> destination buffer type appropriately.
> 
> Signed-off-by: Dave Chinner <dchinner@redhat.com>
> ---

Reviewed-by: Brian Foster <bfoster@redhat.com>

>  fs/xfs/libxfs/xfs_bmap.c           | 6 +++++-
>  fs/xfs/libxfs/xfs_symlink_remote.c | 2 ++
>  2 files changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
> index 63a5bb9..61ec015 100644
> --- a/fs/xfs/libxfs/xfs_bmap.c
> +++ b/fs/xfs/libxfs/xfs_bmap.c
> @@ -973,7 +973,11 @@ xfs_bmap_local_to_extents(
>  	*firstblock = args.fsbno;
>  	bp = xfs_btree_get_bufl(args.mp, tp, args.fsbno, 0);
>  
> -	/* initialise the block and copy the data */
> +	/*
> +	 * Initialise the block and copy the data
> +	 *
> +	 * Note: init_fn must set the buffer log item type correctly!
> +	 */
>  	init_fn(tp, bp, ip, ifp);
>  
>  	/* account for the change in fork size and log everything */
> diff --git a/fs/xfs/libxfs/xfs_symlink_remote.c b/fs/xfs/libxfs/xfs_symlink_remote.c
> index c80c523..e7e26bd 100644
> --- a/fs/xfs/libxfs/xfs_symlink_remote.c
> +++ b/fs/xfs/libxfs/xfs_symlink_remote.c
> @@ -178,6 +178,8 @@ xfs_symlink_local_to_remote(
>  	struct xfs_mount	*mp = ip->i_mount;
>  	char			*buf;
>  
> +	xfs_trans_buf_set_type(tp, bp, XFS_BLFT_SYMLINK_BUF);
> +
>  	if (!xfs_sb_version_hascrc(&mp->m_sb)) {
>  		bp->b_ops = NULL;
>  		memcpy(bp->b_addr, ifp->if_u1.if_data, ifp->if_bytes);
> -- 
> 2.0.0
> 
> _______________________________________________
> 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

  reply	other threads:[~2015-01-21 22:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-21  0:39 [PATCH 0/3] xfs: buffer types need to be set Dave Chinner
2015-01-21  0:39 ` [PATCH 1/3] xfs: ensure buffer types are set correctly Dave Chinner
2015-01-21 22:05   ` Brian Foster
2015-01-21  0:39 ` [PATCH 2/3] xfs: inode unlink does not set AGI buffer type Dave Chinner
2015-01-21 22:05   ` Brian Foster
2015-01-21  0:39 ` [PATCH 3/3] xfs: set buf types when converting extent formats Dave Chinner
2015-01-21 22:06   ` Brian Foster [this message]
2015-01-21  2:34 ` [PATCH 4/3] xfs: set superblock buffer type correctly Dave Chinner
2015-01-21 22:06   ` Brian Foster
2015-01-21 16:07 ` [PATCH 0/3] xfs: buffer types need to be set Jan Kara
2015-01-21 17:11   ` Jan Kara
2015-01-21 21:12   ` Dave Chinner

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=20150121220609.GD7960@laptop.bfoster \
    --to=bfoster@redhat.com \
    --cc=david@fromorbit.com \
    --cc=jack@suse.cz \
    --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 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.