Date: Tue, 10 Nov 2015 08:54:13 +0100 From: Ivan Radovanovic <radovanovic@gmail.com> To: freebsd-hackers@FreeBSD.org Subject: Detecting new file name after receiving kevent's NOTE_RENAME Message-ID: <5641A2A5.7070909@gmail.com>
index | next in thread | raw e-mail
What is the best practice for discovering new file name after receiving kevent(2) NOTE_RENAME on its descriptor? At the moment I am storing fileno from dirent(5) structure together with descriptor and name, and when I receive NOTE_RENAME I re-read directory and use it (fileno) to discover new name, but this obviously requires re-reading entire directory on each NOTE_RENAME. I am wondering is there some more clever way to get this new name (kernel is obviously aware of it, otherwise it couldn't notify descriptor about rename)? Kind regards, Ivanhome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5641A2A5.7070909>
