reclaim: mark end of directory with EndScan flag
This commit is contained in:
parent
1ca6c13c4b
commit
428fc95481
1 changed files with 8 additions and 1 deletions
|
|
@ -323,6 +323,7 @@ begin
|
||||||
|
|
||||||
(* find next occupied slot *)
|
(* find next occupied slot *)
|
||||||
occSlotNo := scanDirSlots(volid, freeSlotNo + 1, occSlot, [SlotFirst]);
|
occSlotNo := scanDirSlots(volid, freeSlotNo + 1, occSlot, [SlotFirst]);
|
||||||
|
|
||||||
if occSlotNo <> 0 then
|
if occSlotNo <> 0 then
|
||||||
begin
|
begin
|
||||||
fileExtents := (occSlot.sizeBytes + extentSize - 1) div extentSize;
|
fileExtents := (occSlot.sizeBytes + extentSize - 1) div extentSize;
|
||||||
|
|
@ -379,8 +380,14 @@ begin
|
||||||
i := i + fileExtents;
|
i := i + fileExtents;
|
||||||
end
|
end
|
||||||
else (* no occupied slot found *)
|
else (* no occupied slot found *)
|
||||||
|
begin
|
||||||
done := true;
|
done := true;
|
||||||
(* TODO: mark first free slot of last free region as EndScan *)
|
(* mark first free slot of last free region as EndScan *)
|
||||||
|
freeslot.flags := freeslot.flags + [SlotEndScan];
|
||||||
|
putdirslot(volid, freeSlotNo, freeSlot, error);
|
||||||
|
if error <> IONoError then
|
||||||
|
writeln('Error writing dirslot ', clearSlotNo);
|
||||||
|
end
|
||||||
end
|
end
|
||||||
else (* no free slot found *)
|
else (* no free slot found *)
|
||||||
done := true;
|
done := true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue