mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
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 <[email protected]> Signed-off-by: Theodore Ts'o <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> # iomap, xfs Reviewed-by: Jan Kara <[email protected]>
This commit is contained in:
parent
9e66317d3c
commit
19fe5f643f
8 changed files with 22 additions and 23 deletions
|
|
@ -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*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue