Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/fuse/fuse_vnops.c
Show First 20 Lines • Show All 527 Lines • ▼ Show 20 Lines | fuse_vnop_bmap(struct vop_bmap_args *ap) | ||||
mp = vnode_mount(vp); | mp = vnode_mount(vp); | ||||
data = fuse_get_mpdata(mp); | data = fuse_get_mpdata(mp); | ||||
biosize = fuse_iosize(vp); | biosize = fuse_iosize(vp); | ||||
maxrun = MIN(vp->v_mount->mnt_iosize_max / biosize - 1, | maxrun = MIN(vp->v_mount->mnt_iosize_max / biosize - 1, | ||||
data->max_readahead_blocks); | data->max_readahead_blocks); | ||||
if (bo != NULL) | if (bo != NULL) | ||||
*bo = &vp->v_bufobj; | *bo = vp2bo(vp); | ||||
/* | /* | ||||
* The FUSE_BMAP operation does not include the runp and runb | * The FUSE_BMAP operation does not include the runp and runb | ||||
* variables, so we must guess. Report nonzero contiguous runs so | * variables, so we must guess. Report nonzero contiguous runs so | ||||
* cluster_read will combine adjacent reads. It's worthwhile to reduce | * cluster_read will combine adjacent reads. It's worthwhile to reduce | ||||
* upcalls even if we don't know the true physical layout of the file. | * upcalls even if we don't know the true physical layout of the file. | ||||
* | * | ||||
* FUSE file systems may opt out of read clustering in two ways: | * FUSE file systems may opt out of read clustering in two ways: | ||||
▲ Show 20 Lines • Show All 2,205 Lines • Show Last 20 Lines |