diff --git a/pkg/vfs/writer.go b/pkg/vfs/writer.go index ba7955dfa9e7..439ae8ddcec9 100644 --- a/pkg/vfs/writer.go +++ b/pkg/vfs/writer.go @@ -144,8 +144,6 @@ func (s *sliceWriter) write(ctx meta.Context, off uint32, data []uint8) syscall. logger.Warnf("write: chunk: %d off: %d %s", s.id, off, err) return syscall.EIO } - } else if int(off) <= f.w.blockSize { - go s.prepareID(ctx, false) } } return 0 @@ -263,6 +261,7 @@ func (f *fileWriter) writeChunk(ctx meta.Context, indx uint32, off uint32, data notify: utils.NewCond(&f.Mutex), started: time.Now(), } + go s.prepareID(meta.Background, false) c.slices = append(c.slices, s) if len(c.slices) == 1 { f.w.Lock()