Entries lacking filenames #1

Closed
opened 2026-02-14 01:07:07 +00:00 by mikael-lovqvist · 1 comment

I've seen a lot of mask: 0x4 entries lacking filenames.
My current hypothesis is that these are directories that have attributes updated and we miss them due to a lacking FAN_REPORT_DIR_FID in the report configuration.

int fafd = fanotify_init(FAN_CLOEXEC | FAN_CLASS_NOTIF | FAN_NONBLOCK | FAN_REPORT_FID | FAN_REPORT_DFID_NAME, O_RDONLY | O_LARGEFILE);

Example of entries without filenames

{ ts: [ 1770946063, 927745927, 1478670, 333201279 ], mask: 4 }
{ ts: [ 1770946063, 929379524, 1478670, 334834876 ], mask: 4 }
{ ts: [ 1770946063, 929480395, 1478670, 334935737 ], mask: 4 }
{
  ts: [ 1770946063, 929548746, 1478670, 335004098 ],
  old: '/srv/Projekt/quick-canvas-test/.git/index.lock',
  new: '/srv/Projekt/quick-canvas-test/.git/index',
  mask: 268435456
}
{ ts: [ 1770946063, 929558156, 1478670, 335013508 ], mask: 4 }
{ ts: [ 1770946065, 49668224, 1478671, 455123576 ], mask: 4 }

Todo

  • Verify that this is indeed the issue
  • Integration test to make sure we don't break everything
I've seen a lot of `mask: 0x4` entries lacking filenames. My current hypothesis is that these are directories that have attributes updated and we miss them due to a lacking `FAN_REPORT_DIR_FID` in the report configuration. https://gitea.efforting.tech/mikael-lovqvist/fa2json/src/commit/96f8ff2e9872050a9c9c27bd0167c1a6f5bd2f89/fs-watcher.c#L131 ### Example of entries without filenames ```python { ts: [ 1770946063, 927745927, 1478670, 333201279 ], mask: 4 } { ts: [ 1770946063, 929379524, 1478670, 334834876 ], mask: 4 } { ts: [ 1770946063, 929480395, 1478670, 334935737 ], mask: 4 } { ts: [ 1770946063, 929548746, 1478670, 335004098 ], old: '/srv/Projekt/quick-canvas-test/.git/index.lock', new: '/srv/Projekt/quick-canvas-test/.git/index', mask: 268435456 } { ts: [ 1770946063, 929558156, 1478670, 335013508 ], mask: 4 } { ts: [ 1770946065, 49668224, 1478671, 455123576 ], mask: 4 } ``` ### Todo - [ ] Verify that this is indeed the issue - [ ] Integration test to make sure we don't break everything
Author
Owner

Fixed by #6

Fixed by https://gitea.efforting.tech/mikael-lovqvist/fa2json/pulls/6
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mikael-lovqvist/fa2json#1