From 7d883b5adda1acc60005915bc4adc8c0ec29d31e Mon Sep 17 00:00:00 2001 From: liulanzheng Date: Mon, 17 Jul 2023 16:20:07 +0800 Subject: [PATCH] fix sure file timeout, sync with tcmu timeout Signed-off-by: liulanzheng --- src/sure_file.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sure_file.cpp b/src/sure_file.cpp index 2d35eafc..0072a87a 100644 --- a/src/sure_file.cpp +++ b/src/sure_file.cpp @@ -82,7 +82,7 @@ class SureFile : public ForwardFile_Ownership { uint64_t try_cnt = 0; size_t got_cnt = 0; auto time_st = photon::now; - while (m_ifile && m_ifile->m_status >= 0 && photon::now - time_st < 31 * 1000 * 1000) { + while (m_ifile && m_ifile->m_status >= 0 && photon::now - time_st < 1000UL * INT32_MAX) { // exit on image in exit status, or timeout ssize_t ret = m_file->pread((char *)buf + got_cnt, count - got_cnt, offset + got_cnt); if (ret > 0)