chase: port to statx()

In one of the next commits we want to acquire .stx_mnt_id from statx()
for each inode we traverse (plain fstat() doesn't provide that field).
Hence let's port chase() over to statx() as preparation for that.

No change in behaviour.
This commit is contained in:
Lennart Poettering
2026-03-03 08:48:01 +01:00
parent 004e60e0fc
commit c8031ff37e
3 changed files with 86 additions and 44 deletions
+2 -1
View File
@@ -32,7 +32,8 @@ typedef enum ChaseFlags {
CHASE_MUST_BE_SOCKET = 1 << 16, /* Fail if returned inode fd is not a socket */
} ChaseFlags;
bool unsafe_transition(const struct stat *a, const struct stat *b);
int statx_unsafe_transition(const struct statx *a, const struct statx *b);
bool stat_unsafe_transition(const struct stat *a, const struct stat *b);
/* How many iterations to execute before returning -ELOOP */
#define CHASE_MAX 128U