fsprobe

package
v0.16.521 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package fsprobe asks the file system about a path without letting a dead mount eat the process: a stat on a hung NFS share blocks in the kernel for good, and the Go runtime starts a new OS thread for every blocked call (HRN-1735: 299 threads, 283 of them stuck, on a machine whose NFS server was gone). Here a probe has a deadline and the number of probes that may be stuck at once is capped, so the extra callers get an error at once instead of a thread.

Index

Constants

View Source
const MaxStuck = 16

MaxStuck is how many probes may be in flight at once; one more is refused without touching the disk.

View Source
const Timeout = 3 * time.Second

Timeout is how long a probe may take before the caller gives up on it.

Variables

View Source
var ErrUnavailable = errors.New("fsprobe: path is not answering")

ErrUnavailable is returned when the path did not answer in time or too many probes are already waiting.

Functions

func Stat

func Stat(path string) (os.FileInfo, error)

Stat is os.Stat with a deadline and a cap on probes in flight.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL