Add an End-to-End workflow for FUSE mount (#3562)

* Add an e2e workflow to test FUSE mount

* Fix deadlocks during concurrent r/w
This commit is contained in:
Patrick Schmidt
2022-08-31 18:27:53 +02:00
committed by GitHub
parent 4a4ef3cc3c
commit a73e177ecf
8 changed files with 192 additions and 11 deletions

View File

@@ -77,6 +77,10 @@ func (fh *FileHandle) AddChunks(chunks []*filer_pb.FileChunk) {
fh.entryLock.Lock()
defer fh.entryLock.Unlock()
if fh.entry == nil {
return
}
// find the earliest incoming chunk
newChunks := chunks
earliestChunk := newChunks[0]
@@ -86,10 +90,6 @@ func (fh *FileHandle) AddChunks(chunks []*filer_pb.FileChunk) {
}
}
if fh.entry == nil {
return
}
// pick out-of-order chunks from existing chunks
for _, chunk := range fh.entry.Chunks {
if lessThan(earliestChunk, chunk) {