| ... | ... | @@ -135,6 +135,12 @@ pub fn markDirtySteps(w: *Watch, gpa: Allocator) !bool { |
| 135 | 135 | meta = @ptrCast(@as([*]u8, @ptrCast(meta)) + meta[0].event_len); |
| 136 | 136 | }) { |
| 137 | 137 | assert(meta[0].vers == M.VERSION); |
| 138 | if (meta[0].mask.Q_OVERFLOW) { |
| 139 | any_dirty = true; |
| 140 | std.log.warn("file system watch queue overflowed; falling back to fstat", .{}); |
| 141 | markAllFilesDirty(w, gpa); |
| 142 | return true; |
| 143 | } |
| 138 | 144 | const fid: *align(1) fanotify.event_info_fid = @ptrCast(meta + 1); |
| 139 | 145 | switch (fid.hdr.info_type) { |
| 140 | 146 | .DFID_NAME => { |
| ... | ... | @@ -171,3 +177,13 @@ pub fn markFailedStepsDirty(gpa: Allocator, all_steps: []const *Step) void { |
| 171 | 177 | else => continue, |
| 172 | 178 | }; |
| 173 | 179 | } |
| 180 | |
| 181 | fn markAllFilesDirty(w: *Watch, gpa: Allocator) void { |
| 182 | for (w.handle_table.values()) |reaction_set| { |
| 183 | for (reaction_set.values()) |step_set| { |
| 184 | for (step_set.keys()) |step| { |
| 185 | step.recursiveReset(gpa); |
| 186 | } |
| 187 | } |
| 188 | } |
| 189 | } |