From: Ritesh Harjani <riteshh@linux.ibm.com>
To: "Darrick J. Wong" <darrick.wong@oracle.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: Wed, 29 Jan 2020 11:49:38 +0530 [thread overview]
Message-ID: <20200129061939.61BFF11C04C@d06av25.portsmouth.uk.ibm.com> (raw)
In-Reply-To: <20200128152830.GA3673284@magnolia>
Hello Darrick,
On 1/28/20 8:58 PM, Darrick J. Wong wrote:
> 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.
Sorry, I should have mentioned about this too in the cover letter.
So current patchset is mainly only converting bmap & fiemap to use iomap
APIs. Even the original implementation does not have external ACL block
implemented for xattr_fiemap.
Let me spend some time to implement it. But I would still like to keep
that as a separate patch.
But thanks for looking into it. There's this point 2.a & 2.b mentioned
in the cover letter where I could really use your help in understanding
if all of that is a known behavior from iomap_fiemap side
(whenever you have some time of course :) )
-ritesh
next prev parent reply other threads:[~2020-01-29 6:19 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
2020-01-29 6:19 ` Ritesh Harjani [this message]
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=20200129061939.61BFF11C04C@d06av25.portsmouth.uk.ibm.com \
--to=riteshh@linux.ibm.com \
--cc=adilger.kernel@dilger.ca \
--cc=cmaiolino@redhat.com \
--cc=darrick.wong@oracle.com \
--cc=hch@infradead.org \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--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).