mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-14 10:09:48 +00:00
Check for case of blkno already known to avoid unnecessary VOP_BMAP's.
Submitted by: John Dyson
This commit is contained in:
parent
6824b322b1
commit
bb2d12a636
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=7613
@ -33,7 +33,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)vfs_cluster.c 8.7 (Berkeley) 2/13/94
|
||||
* $Id: vfs_cluster.c,v 1.13 1995/03/16 18:12:48 bde Exp $
|
||||
* $Id: vfs_cluster.c,v 1.14 1995/03/19 13:28:54 davidg Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -439,6 +439,7 @@ cluster_write(bp, filesize)
|
||||
* existing cluster.
|
||||
*/
|
||||
if ((lbn + 1) * lblocksize != filesize &&
|
||||
(bp->b_blkno == bp->b_lblkno) &&
|
||||
(VOP_BMAP(vp, lbn, NULL, &bp->b_blkno, &maxclen) ||
|
||||
bp->b_blkno == -1)) {
|
||||
bawrite(bp);
|
||||
|
Loading…
Reference in New Issue
Block a user