summaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2017-10-01 17:55:54 -0400
committerTheodore Ts'o <tytso@mit.edu>2017-10-01 17:55:54 -0400
commit19fe5f643f89f29c1a16bc474d91506b0e9a6232 (patch)
treea6fce3b138de34c1058b807cff32bbd375172b04 /fs/ext4
parent9e66317d3c92ddaab330c125dfe9d06eee268aff (diff)
downloadop-kernel-dev-19fe5f643f89f29c1a16bc474d91506b0e9a6232.zip
op-kernel-dev-19fe5f643f89f29c1a16bc474d91506b0e9a6232.tar.gz
iomap: Switch from blkno to disk offset
Replace iomap->blkno, the sector number, with iomap->addr, the disk offset in bytes. For invalid disk offsets, use the special value IOMAP_NULL_ADDR instead of IOMAP_NULL_BLOCK. This allows to use iomap for mappings which are not block aligned, such as inline data on ext4. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> # iomap, xfs Reviewed-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/inode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 31db875..d9e633c 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -3472,7 +3472,7 @@ retry:
if (ret == 0) {
iomap->type = IOMAP_HOLE;
- iomap->blkno = IOMAP_NULL_BLOCK;
+ iomap->addr = IOMAP_NULL_ADDR;
iomap->length = (u64)map.m_len << blkbits;
} else {
if (map.m_flags & EXT4_MAP_MAPPED) {
@@ -3483,7 +3483,7 @@ retry:
WARN_ON_ONCE(1);
return -EIO;
}
- iomap->blkno = (sector_t)map.m_pblk << (blkbits - 9);
+ iomap->addr = (u64)map.m_pblk << blkbits;
iomap->length = (u64)map.m_len << blkbits;
}
OpenPOWER on IntegriCloud