In rev. 1.17 (r33548) of msdosfs_fat.c, relative cluster numbers were
replaced by file relative sector numbers as the buffer block number when zero-padding a file during extension. Revert the change, it causes wrong blocks filled with zeroes on seeking beyond end of file. PR: kern/47628 Submitted by: tegge MFC after: 3 days
This commit is contained in:
parent
65d9c98ddd
commit
ffc7e2eee2
@ -1065,13 +1065,13 @@ extendfile(dep, count, bpp, ncp, flags)
|
||||
pmp->pm_bpcluster, 0, 0, 0);
|
||||
else {
|
||||
bp = getblk(DETOV(dep),
|
||||
de_cn2bn(pmp, frcn++),
|
||||
frcn++,
|
||||
pmp->pm_bpcluster, 0, 0, 0);
|
||||
/*
|
||||
* Do the bmap now, as in msdosfs_write
|
||||
*/
|
||||
if (pcbmap(dep,
|
||||
de_bn2cn(pmp, bp->b_lblkno),
|
||||
bp->b_lblkno,
|
||||
&blkno, 0, 0))
|
||||
bp->b_blkno = -1;
|
||||
if (bp->b_blkno == -1)
|
||||
|
Loading…
Reference in New Issue
Block a user