Skip to content

Commit

Permalink
lxd/storage/drivers/utils: Remove no longer used waitGone function (l…
Browse files Browse the repository at this point in the history
…inter)

Signed-off-by: Din Music <[email protected]>
  • Loading branch information
MusicDin committed Dec 20, 2024
1 parent bd78bac commit 4846572
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions lxd/storage/drivers/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,23 +219,6 @@ func tryExists(ctx context.Context, path string) bool {
}
}

// waitGone waits for a file to not exist anymore or the context being cancelled.
// The probe happens at intervals of 500 milliseconds.
func waitGone(ctx context.Context, path string) bool {
for {
select {
case <-ctx.Done():
return false
default:
if !shared.PathExists(path) {
return true
}
}

time.Sleep(500 * time.Millisecond)
}
}

// fsUUID returns the filesystem UUID for the given block path.
// error is returned if the given block device exists but has no UUID.
func fsUUID(path string) (string, error) {
Expand Down

0 comments on commit 4846572

Please sign in to comment.