This commit is contained in:
Chris Lu 2021-05-09 15:28:54 -07:00
parent 735e65be17
commit 55e060cf61
2 changed files with 5 additions and 2 deletions

View file

@ -144,3 +144,7 @@ func min(x, y int64) int64 {
func (pages *ContinuousDirtyPages) ReadDirtyDataAt(data []byte, startOffset int64) (maxStop int64) { func (pages *ContinuousDirtyPages) ReadDirtyDataAt(data []byte, startOffset int64) (maxStop int64) {
return pages.intervals.ReadDataAt(data, startOffset) return pages.intervals.ReadDataAt(data, startOffset)
} }
func (pages *ContinuousDirtyPages) GetStorageOptions() (collection, replication string) {
return pages.collection, pages.replication
}

View file

@ -267,8 +267,7 @@ func (fh *FileHandle) doFlush(ctx context.Context, header fuse.Header) error {
} }
entry.Attributes.Mtime = time.Now().Unix() entry.Attributes.Mtime = time.Now().Unix()
entry.Attributes.FileMode = uint32(os.FileMode(entry.Attributes.FileMode) &^ fh.f.wfs.option.Umask) entry.Attributes.FileMode = uint32(os.FileMode(entry.Attributes.FileMode) &^ fh.f.wfs.option.Umask)
entry.Attributes.Collection = fh.dirtyPages.collection entry.Attributes.Collection, entry.Attributes.Replication = fh.dirtyPages.GetStorageOptions()
entry.Attributes.Replication = fh.dirtyPages.replication
} }
request := &filer_pb.CreateEntryRequest{ request := &filer_pb.CreateEntryRequest{