Add is_nfs_path() to check if a path may be in an NFS mount.
Review Request #15191 — Created July 23, 2026 and updated
There are certain operations that aren't considered safe on all NFS
paths. These often involve operations where file locking is required
or the oepration is sensitive to proper synchronization. In these cases,
it can be helpful or important to log some information to help
administrators if something were to act up. This is going to be true for
the local broker.This change introduces
reviewboard.admin.server.is_nfs_path()to help
perform this check. This takes a path and checks to see if there's a
known mount point that it may live in. This is a best-effort check and
is only capable of checking Linux's/proc/mounts. On other sytsems (or
if there is an issue accessing this), this will returnFalse.The result is cached in an LRU cache to avoid repeated lookups for the
same paths. In practice, this is going to be used only with very few
hard-coded paths (such as a local queue path or parts of the data
directory).
Unit tests pass.
| Summary | ID |
|---|---|
| 94b2234d58dcbbea33ed0b66c47b61eaf770d392 |