diff options
author | Andreas Gruenbacher <agruenba@redhat.com> | 2017-10-01 17:55:54 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2017-10-01 17:55:54 -0400 |
commit | 19fe5f643f89f29c1a16bc474d91506b0e9a6232 (patch) | |
tree | a6fce3b138de34c1058b807cff32bbd375172b04 /fs/nfsd/blocklayout.c | |
parent | 9e66317d3c92ddaab330c125dfe9d06eee268aff (diff) |
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/nfsd/blocklayout.c')
-rw-r--r-- | fs/nfsd/blocklayout.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfsd/blocklayout.c b/fs/nfsd/blocklayout.c index c862c2489df0..2d1d37b27dc7 100644 --- a/fs/nfsd/blocklayout.c +++ b/fs/nfsd/blocklayout.c @@ -65,7 +65,7 @@ nfsd4_block_proc_layoutget(struct inode *inode, const struct svc_fh *fhp, bex->es = PNFS_BLOCK_READ_DATA; else bex->es = PNFS_BLOCK_READWRITE_DATA; - bex->soff = (iomap.blkno << 9); + bex->soff = iomap.addr; break; case IOMAP_UNWRITTEN: if (seg->iomode & IOMODE_RW) { @@ -78,7 +78,7 @@ nfsd4_block_proc_layoutget(struct inode *inode, const struct svc_fh *fhp, } bex->es = PNFS_BLOCK_INVALID_DATA; - bex->soff = (iomap.blkno << 9); + bex->soff = iomap.addr; break; } /*FALLTHRU*/ |