From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Ritesh Harjani <riteshh@linux.ibm.com>
Cc: jack@suse.cz, tytso@mit.edu, adilger.kernel@dilger.ca,
linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org,
hch@infradead.org, cmaiolino@redhat.com
Subject: Re: [RFCv2 4/4] ext4: Move ext4_fiemap to use iomap infrastructure
Date: Tue, 28 Jan 2020 07:28:30 -0800 [thread overview]
Message-ID: <20200128152830.GA3673284@magnolia> (raw)
In-Reply-To: <0147a2923d339bdef5802dde8d5019d719f0d796.1580121790.git.riteshh@linux.ibm.com>
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@linux.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
next prev parent reply other threads:[~2020-01-28 15:29 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-28 10:18 [RFCv2 0/4] ext4: bmap & fiemap conversion to use iomap Ritesh Harjani
2020-01-28 10:18 ` [RFCv2 1/4] ext4: Add IOMAP_F_MERGED for non-extent based mapping Ritesh Harjani
2020-01-28 10:18 ` [RFCv2 2/4] ext4: Optimize ext4_ext_precache for 0 depth Ritesh Harjani
2020-01-28 10:18 ` [RFCv2 3/4] ext4: Move ext4 bmap to use iomap infrastructure Ritesh Harjani
2020-01-28 10:18 ` [RFCv2 4/4] ext4: Move ext4_fiemap " Ritesh Harjani
2020-01-28 15:28 ` Darrick J. Wong [this message]
2020-01-29 6:19 ` Ritesh Harjani
2020-01-29 16:18 ` Darrick J. Wong
2020-01-29 23:54 ` Ritesh Harjani
2020-01-30 16:00 ` [RFCv2 0/4] ext4: bmap & fiemap conversion to use iomap Darrick J. Wong
2020-01-30 17:34 ` Ritesh Harjani
2020-02-05 12:47 ` Ritesh Harjani
2020-02-05 15:57 ` Darrick J. Wong
2020-02-06 5:26 ` Ritesh Harjani
2020-02-06 10:22 ` Jan Kara
2020-02-20 17:03 ` Ritesh Harjani
2020-02-20 17:09 ` Christoph Hellwig
2020-02-21 4:16 ` Ritesh Harjani
2020-02-21 11:47 ` Jan Kara
2020-02-21 4:10 ` Ritesh Harjani
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=20200128152830.GA3673284@magnolia \
--to=darrick.wong@oracle.com \
--cc=adilger.kernel@dilger.ca \
--cc=cmaiolino@redhat.com \
--cc=hch@infradead.org \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=riteshh@linux.ibm.com \
--cc=tytso@mit.edu \
/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).