[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200128152830.GA3673284@magnolia>
Date: Tue, 28 Jan 2020 07:28:30 -0800
From: "Darrick J. Wong" <darrick.wong@...cle.com>
To: Ritesh Harjani <riteshh@...ux.ibm.com>
Cc: jack@...e.cz, tytso@....edu, adilger.kernel@...ger.ca,
linux-ext4@...r.kernel.org, linux-fsdevel@...r.kernel.org,
hch@...radead.org, cmaiolino@...hat.com
Subject: Re: [RFCv2 4/4] ext4: Move ext4_fiemap to use iomap infrastructure
On Tue, Jan 28, 2020 at 03:48:28PM +0530, Ritesh Harjani wrote:
> Since ext4 already defines necessary iomap_ops required to move to iomap
> for fiemap, so this patch makes those changes to use existing iomap_ops
> for ext4_fiemap and thus removes all unwanted code.
>
> Signed-off-by: Ritesh Harjani <riteshh@...ux.ibm.com>
> ---
> fs/ext4/extents.c | 279 +++++++---------------------------------------
> fs/ext4/inline.c | 41 -------
> 2 files changed, 38 insertions(+), 282 deletions(-)
>
> diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
> index 0de548bb3c90..901caee2fcb1 100644
> --- a/fs/ext4/extents.c
> +++ b/fs/ext4/extents.c
<snip> Just a cursory glance...
> @@ -5130,40 +4927,42 @@ static int ext4_xattr_fiemap(struct inode *inode,
> EXT4_I(inode)->i_extra_isize;
> physical += offset;
> length = EXT4_SB(inode->i_sb)->s_inode_size - offset;
> - flags |= FIEMAP_EXTENT_DATA_INLINE;
> brelse(iloc.bh);
> } else { /* external block */
> physical = (__u64)EXT4_I(inode)->i_file_acl << blockbits;
> length = inode->i_sb->s_blocksize;
> }
>
> - if (physical)
> - error = fiemap_fill_next_extent(fieinfo, 0, physical,
> - length, flags);
> - return (error < 0 ? error : 0);
> + iomap->addr = physical;
> + iomap->offset = 0;
> + iomap->length = length;
> + iomap->type = IOMAP_INLINE;
> + iomap->flags = 0;
Er... external "ACL" blocks aren't IOMAP_INLINE.
--D
Powered by blists - more mailing lists