Ensure that inode updates are properly flushed out during the first
pass of fsck_ffs. Some changes, such as check-hash corrections were being lost. Reported by: Michael Tuexen (tuexen@) Tested by: Michael Tuexen (tuexen@) MFC after: 3 days
This commit is contained in:
parent
198fdaeda1
commit
7bcd1fab5a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=344302
@ -349,9 +349,11 @@ getnextinode(ino_t inumber, int rebuildcg)
|
|||||||
lastinum += fullcnt;
|
lastinum += fullcnt;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
* Flush old contents in case they have been updated.
|
||||||
* If getblk encounters an error, it will already have zeroed
|
* If getblk encounters an error, it will already have zeroed
|
||||||
* out the buffer, so we do not need to do so here.
|
* out the buffer, so we do not need to do so here.
|
||||||
*/
|
*/
|
||||||
|
flush(fswritefd, &inobuf);
|
||||||
getblk(&inobuf, blk, size);
|
getblk(&inobuf, blk, size);
|
||||||
nextinop = inobuf.b_un.b_buf;
|
nextinop = inobuf.b_un.b_buf;
|
||||||
}
|
}
|
||||||
@ -461,6 +463,10 @@ void
|
|||||||
freeinodebuf(void)
|
freeinodebuf(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Flush old contents in case they have been updated.
|
||||||
|
*/
|
||||||
|
flush(fswritefd, &inobuf);
|
||||||
if (inobuf.b_un.b_buf != NULL)
|
if (inobuf.b_un.b_buf != NULL)
|
||||||
free((char *)inobuf.b_un.b_buf);
|
free((char *)inobuf.b_un.b_buf);
|
||||||
inobuf.b_un.b_buf = NULL;
|
inobuf.b_un.b_buf = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user