xfs
[Top] [All Lists]

Re: [PATCH 1/2] stop using xfs_itobp in xfs_bulkstat

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 1/2] stop using xfs_itobp in xfs_bulkstat
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Thu, 23 Oct 2008 08:27:33 +1100
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20081022163034.GB25556@xxxxxxxxxxxxx>
Mail-followup-to: Christoph Hellwig <hch@xxxxxxxxxxxxx>, xfs@xxxxxxxxxxx
References: <20081022163034.GB25556@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.18 (2008-05-17)
On Wed, Oct 22, 2008 at 12:30:34PM -0400, Christoph Hellwig wrote:
> xfs_bulkstat only wants the dinode, offset and buffer from a given
> inode number.  Instead of using xfs_itobp on a fake inode which is
> complicated and currently leads to leaks of the security data just use
> xfs_inotobp which is designed to do exactly the kind of lookup
> xfs_bulkstat wants.  The only thing that's missing in xfs_inotobp is
> a flags paramter that let's us pass down XFS_IMAP_BULKSTAT, but that can
> easily added.

Looks good.

> Index: xfs-2.6/fs/xfs/xfs_inode.h
> ===================================================================
> --- xfs-2.6.orig/fs/xfs/xfs_inode.h   2008-10-20 23:49:30.000000000 +0200
> +++ xfs-2.6/fs/xfs/xfs_inode.h        2008-10-21 09:28:03.000000000 +0200
> @@ -158,7 +158,7 @@ typedef struct xfs_icdinode {
>  #define      XFS_IFEXTIREC   0x08    /* Indirection array of extent blocks */
>  
>  /*
> - * Flags for xfs_itobp(), xfs_imap() and xfs_dilocate().
> + * Flags for xfs_inotobp, xfs_itobp(), xfs_imap() and xfs_dilocate().
>   */

Not really important, but for consistency that should be
"xfs_inotobp()". Perhaps just fix that in the followup patch
that removes the imap_flags from xfs_itobp() so this can go
straight in without another round trip.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

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