Browse Source

rename

pull/1427/head
Chris Lu 4 years ago
parent
commit
9d46c7bc78
  1. 4
      weed/filesys/dirty_page.go
  2. 2
      weed/filesys/dirty_page_interval.go
  3. 2
      weed/filesys/filehandle.go

4
weed/filesys/dirty_page.go

@ -172,11 +172,11 @@ func min(x, y int64) int64 {
return y
}
func (pages *ContinuousDirtyPages) ReadDirtyData(data []byte, startOffset int64) (maxStop int64) {
func (pages *ContinuousDirtyPages) ReadDirtyDataAt(data []byte, startOffset int64) (maxStop int64) {
pages.lock.Lock()
defer pages.lock.Unlock()
return pages.intervals.ReadData(data, startOffset)
return pages.intervals.ReadDataAt(data, startOffset)
}

2
weed/filesys/dirty_page_interval.go

@ -185,7 +185,7 @@ func (c *ContinuousIntervals) removeList(target *IntervalLinkedList) {
}
func (c *ContinuousIntervals) ReadData(data []byte, startOffset int64) (maxStop int64) {
func (c *ContinuousIntervals) ReadDataAt(data []byte, startOffset int64) (maxStop int64) {
for _, list := range c.lists {
start := max(startOffset, list.Offset())
stop := min(startOffset+int64(len(data)), list.Offset()+list.Size())

2
weed/filesys/filehandle.go

@ -80,7 +80,7 @@ func (fh *FileHandle) Read(ctx context.Context, req *fuse.ReadRequest, resp *fus
}
func (fh *FileHandle) readFromDirtyPages(buff []byte, startOffset int64) (maxStop int64) {
return fh.dirtyPages.ReadDirtyData(buff, startOffset)
return fh.dirtyPages.ReadDirtyDataAt(buff, startOffset)
}
func (fh *FileHandle) readFromChunks(buff []byte, offset int64) (int64, error) {

Loading…
Cancel
Save