diff options
author | Kirk McKusick <mckusick@FreeBSD.org> | 2019-12-03 23:07:09 +0000 |
---|---|---|
committer | Kirk McKusick <mckusick@FreeBSD.org> | 2019-12-03 23:07:09 +0000 |
commit | d00066a5f923073113bcb0213ca7a0a9a29b9561 (patch) | |
tree | fb2915436c181ae2982036d837a8fe469dd7ec10 /sys/kern/vfs_cluster.c | |
parent | ddef7bb56f30c791288301777d4587c586466ba5 (diff) | |
download | src-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.c | 2 |
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); |