AmendHub

Download:

jcs

/

amend

/

amendments

/

119

bile: Always do synchronous PBFlushFile calls

On some systems doing this asynchronously was causing a lockup,
possibly due to their slower disk taking long enough that a second
flush (or the PBFlushVol right after it) would conflict. I'm still
not sure entirely what that was actually triggering, but this fixes
the issue.
 
Valtteri Koskivuori reported the lockup issue and helped me track it
down to this code, and confirmed that this fixes the issue.

jcs made amendment 119 about 1 year ago
--- bile.c Tue Mar 28 16:19:59 2023 +++ bile.c Tue Apr 18 16:09:34 2023 @@ -236,8 +236,7 @@ bile_flush(struct bile *bile, bool and_vol) memset(&pb, 0, sizeof(pb)); pb.ioRefNum = bile->frefnum; - /* if we're not flushing the volume, write async */ - ret = PBFlushFile(&pb, !and_vol); + ret = PBFlushFile(&pb, false); if (ret != noErr) return ret;