| 79 | } |
| 80 | |
| 81 | type Storage struct { |
| 82 | fs VFS |
| 83 | root string |
| 84 | |
| 85 | // dirLockMu must be held for writing when deleting an empty directory |
| 86 | // and for read when receiving blobs. |
| 87 | dirLockMu *sync.RWMutex |
| 88 | |
| 89 | // statGate limits how many pending Stat calls we have in flight. |
| 90 | statGate *syncutil.Gate |
| 91 | |
| 92 | // tmpFileGate limits the number of temporary files open at the same |
| 93 | // time, so we don't run into the max set by ulimit. It is nil on |
| 94 | // systems (Windows) where we don't know the maximum number of open |
| 95 | // file descriptors. |
| 96 | tmpFileGate *syncutil.Gate |
| 97 | } |
| 98 | |
| 99 | // SetNewFileGate sets a gate (counting semaphore) on the number of new files |
| 100 | // that may be opened for writing at a time. |
nothing calls this directly
no outgoing calls
no test coverage detected