From f77ca41769b8466cec64c39767e0fcc038f51b31 Mon Sep 17 00:00:00 2001 From: chrislu Date: Thu, 23 Dec 2021 17:48:34 -0800 Subject: [PATCH] refactor --- weed/filesys/dirty_pages_continuous.go | 13 ------------- weed/filesys/page_writer.go | 13 +++++++++++++ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/weed/filesys/dirty_pages_continuous.go b/weed/filesys/dirty_pages_continuous.go index 19401b94e..2692c2950 100644 --- a/weed/filesys/dirty_pages_continuous.go +++ b/weed/filesys/dirty_pages_continuous.go @@ -127,19 +127,6 @@ func (pages *ContinuousDirtyPages) saveToStorage(reader io.Reader, offset int64, } } -func max(x, y int64) int64 { - if x > y { - return x - } - return y -} -func min(x, y int64) int64 { - if x < y { - return x - } - return y -} - func (pages *ContinuousDirtyPages) ReadDirtyDataAt(data []byte, startOffset int64) (maxStop int64) { return pages.intervals.ReadDataAt(data, startOffset) } diff --git a/weed/filesys/page_writer.go b/weed/filesys/page_writer.go index 8e52f9f67..560ae052d 100644 --- a/weed/filesys/page_writer.go +++ b/weed/filesys/page_writer.go @@ -92,3 +92,16 @@ func (pw *PageWriter) GetStorageOptions() (collection, replication string) { func (pw *PageWriter) Destroy() { pw.randomWriter.Destroy() } + +func max(x, y int64) int64 { + if x > y { + return x + } + return y +} +func min(x, y int64) int64 { + if x < y { + return x + } + return y +}