Skip to content

Commit 302db1c

Browse files
committed
[PGPRO-146] store at least cfs header size bytes.
1 parent 5f71f77 commit 302db1c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/utils/file.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2911,6 +2911,17 @@ fio_send_file_local(const char *from_fullpath, FILE* out, bool cut_zero_tail,
29112911
if (read_len > 0)
29122912
{
29132913
non_zero_len = find_zero_tail(buf, read_len);
2914+
/*
2915+
* It is dirty trick to silence warnings in CFS GC process:
2916+
* backup at least cfs header size bytes.
2917+
*/
2918+
if (st.read_size + non_zero_len < PAGE_ZEROSEARCH_FINE_GRANULARITY &&
2919+
st.read_size + read_len > 0)
2920+
{
2921+
non_zero_len = Min(PAGE_ZEROSEARCH_FINE_GRANULARITY,
2922+
st.read_size + read_len);
2923+
non_zero_len -= st.read_size;
2924+
}
29142925
if (non_zero_len > 0)
29152926
{
29162927
fio_send_file_crc(&st, buf, non_zero_len);

0 commit comments

Comments
 (0)