aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/vfs_cluster.c
diff options
context:
space:
mode:
authorKirk McKusick <mckusick@FreeBSD.org>2019-12-03 23:07:09 +0000
committerKirk McKusick <mckusick@FreeBSD.org>2019-12-03 23:07:09 +0000
commitd00066a5f923073113bcb0213ca7a0a9a29b9561 (patch)
treefb2915436c181ae2982036d837a8fe469dd7ec10 /sys/kern/vfs_cluster.c
parentddef7bb56f30c791288301777d4587c586466ba5 (diff)
downloadsrc-d00066a5f923073113bcb0213ca7a0a9a29b9561.tar.gz
src-d00066a5f923073113bcb0213ca7a0a9a29b9561.zip
Currently the breadn_flags() and getblkx() interfaces are passed
the vnode, logical block number, and size of data block that is being requested. They then use the VOP_BMAP function to calculate the mapping from logical block number to physical block number from which to access the data. This change expands the interface to also pass the physical block number in cases where the VOP_MAP function may no longer work, for example when a file is being truncated. No functional change. Reviewed by: kib Tested by: Peter Holm Sponsored by: Netflix
Notes
Notes: svn path=/head/; revision=355371
Diffstat (limited to 'sys/kern/vfs_cluster.c')
-rw-r--r--sys/kern/vfs_cluster.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/vfs_cluster.c b/sys/kern/vfs_cluster.c
index 00fc8581af33..0a6652193254 100644
--- a/sys/kern/vfs_cluster.c
+++ b/sys/kern/vfs_cluster.c
@@ -131,7 +131,7 @@ cluster_read(struct vnode *vp, u_quad_t filesize, daddr_t lblkno, long size,
/*
* get the requested block
*/
- error = getblkx(vp, lblkno, size, 0, 0, gbflags, &bp);
+ error = getblkx(vp, lblkno, lblkno, size, 0, 0, gbflags, &bp);
if (error != 0) {
*bpp = NULL;
return (error);