aboutsummaryrefslogtreecommitdiff
path: root/weed/mount/page_writer/dirty_pages.go
blob: 25b747fad9da8cb82b9a32db2ba2a67d759c1160 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package page_writer

type DirtyPages interface {
	AddPage(offset int64, data []byte)
	FlushData() error
	ReadDirtyDataAt(data []byte, startOffset int64) (maxStop int64)
	GetStorageOptions() (collection, replication string)
	Destroy()
	LockForRead(startOffset, stopOffset int64)
	UnlockForRead(startOffset, stopOffset 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 minInt(x, y int) int {
	if x < y {
		return x
	}
	return y
}