Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit220f637

Browse files
author
Sokolov Yura
committed
cfs: pg_flush_data on second pass
1 parent97322d2 commit220f637

File tree

1 file changed

+8
-0
lines changed
  • src/backend/storage/file

1 file changed

+8
-0
lines changed

‎src/backend/storage/file/cfs.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,6 +1053,13 @@ static bool cfs_gc_file(char* map_path, GC_CALL_KIND background)
10531053
gotoCleanup;
10541054
}
10551055
newMap->inodes[i]=CFS_INODE(size,offs);
1056+
1057+
if (writeback+16*1024*1024<newSize)
1058+
{
1059+
uint32newwb= (newSize-128*1024)& ~(128*1024-1);
1060+
pg_flush_data(fd2,writeback,newwb-writeback);
1061+
writeback=newwb;
1062+
}
10561063
}
10571064
else
10581065
{
@@ -1061,6 +1068,7 @@ static bool cfs_gc_file(char* map_path, GC_CALL_KIND background)
10611068
cfs_state->gc_stat.processedBytes+=size;
10621069
cfs_state->gc_stat.processedPages+=1;
10631070
}
1071+
pg_flush_data(fd2,writeback,newSize);
10641072

10651073
if (close(fd)<0)
10661074
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp