diff options
| author | chrislu <chris.lu@gmail.com> | 2021-12-23 17:48:34 -0800 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2021-12-23 17:48:34 -0800 |
| commit | f77ca41769b8466cec64c39767e0fcc038f51b31 (patch) | |
| tree | 83c489bc349180dfcf5e238c235c966808133152 /weed | |
| parent | 1d36884845d60d37897c13f14923b80cf2c94e29 (diff) | |
| download | seaweedfs-f77ca41769b8466cec64c39767e0fcc038f51b31.tar.xz seaweedfs-f77ca41769b8466cec64c39767e0fcc038f51b31.zip | |
refactor
Diffstat (limited to 'weed')
| -rw-r--r-- | weed/filesys/dirty_pages_continuous.go | 13 | ||||
| -rw-r--r-- | 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 +} |
