Skip to contentSkip to conversation

Invalidating dentries

DISCUSSION Robert Hancock 1 participant 1 message Mar 23, 2005 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 5 lines · linux-os
Quoted 3 lines · Jan Engelhardt

Hello list,

Quoted 7 lines
Quoted 3 lines

how can I invalidate all buffered/cached dentries so that ls -l /somefolder will definitely go read the harddisk?

fsync() on the file(s) in the directory then fsync() on the directory itself. For this, one can open the directory as though it was just a file, you don't need opendir().

I don't think this is what they want, it sounds like they want to effectively clear the read cache for the file system. I'm not sure there's an easy way to do that other than maybe umounting and mounting the file system again..

Signature · 3 lines
Robert Hancock      Saskatoon, SK, Canada
To email, remove "nospam" from [email protected]
Home Page: http://www.roberthancock.com/