xfs
[Top] [All Lists]

Re: [PATCH 16/19] xfs: remove unused tp arg from xfs_symlink_local_to_re

To: Eric Sandeen <sandeen@xxxxxxxxxx>
Subject: Re: [PATCH 16/19] xfs: remove unused tp arg from xfs_symlink_local_to_remote()
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Tue, 8 Apr 2014 09:23:10 +1000
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1396900746-22201-17-git-send-email-sandeen@xxxxxxxxxx>
References: <1396900746-22201-1-git-send-email-sandeen@xxxxxxxxxx> <1396900746-22201-17-git-send-email-sandeen@xxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Mon, Apr 07, 2014 at 02:59:03PM -0500, Eric Sandeen wrote:
> Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
> ---
>  fs/xfs/xfs_bmap.c           |    5 ++---
>  fs/xfs/xfs_shared.h         |    2 +-
>  fs/xfs/xfs_symlink_remote.c |    1 -
>  3 files changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c
> index 03b6ff2..6a1e702 100644
> --- a/fs/xfs/xfs_bmap.c
> +++ b/fs/xfs/xfs_bmap.c
> @@ -919,8 +919,7 @@ xfs_bmap_local_to_extents(
>       xfs_extlen_t    total,          /* total blocks needed by transaction */
>       int             *logflagsp,     /* inode logging flags */
>       int             whichfork,
> -     void            (*init_fn)(struct xfs_trans *tp,
> -                                struct xfs_buf *bp,
> +     void            (*init_fn)(struct xfs_buf *bp,
>                                  struct xfs_inode *ip,
>                                  struct xfs_ifork *ifp))
>  {

This one I disagree with - this local-to-remote change is only done
within a transaction context. The existing conversions don't require
any special operations that require logging different objects, but
the possibility exists and so we really do need to pass the
transaction structure through this API.

e.g. we really should convert the directory code over to use the
generic xfs_bmap_local_to_extents() function rather than rolling
it's own version of essentially the same thing, and that requires
passing the transaction structure through the init_fn interface.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>