For xattr in inode, need add inode offset in this block? Also, there is one problem, if we have xattrs both in inode and block, current implementation will only return xattr inode fiemap. Is this by design? Signed-off-by: Wang Jianjian --- fs/ext4/extents.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 2cf5759ba689..a16bfc75345d 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -5043,6 +5043,7 @@ static int ext4_iomap_xattr_fiemap(struct inode *inode, struct iomap *iomap) if (error) return error; physical = (__u64)iloc.bh->b_blocknr << blockbits; + physical += iloc.offset; offset = EXT4_GOOD_OLD_INODE_SIZE + EXT4_I(inode)->i_extra_isize; physical += offset; -- 2.34.1