c++ - Is there a way to completely remove an inode when the Link count is 2? -


currently data organised in volume has cache directory (where files first created or transferred). after there suitable directories on volume in subdirs, contain files hardlinked files in cache. done same inode (file) can hardlinked multiple times in multiple directories.

now when trying clean volume, recurively go through dirs(not cache) , based on criterion, unlink files (which reduces inode count of cache entry 1). there way me delete cache entry directly, when deleting last hardlink (that bringing down count 2 1). way not have manually parse through whole cache directory clear inodes it, have link count of 1.

i have gone through unlink/remove functions, , not find specific of use. there purging algorithm internally takes care of this, can try implement that.

any on highly appreciated. in anticipation of prompt reply.

no, there isn't want out of box.

it might useful deletion when unlinking hardlink , noticing link count 1, since @ point inode should in page cache; of course dependent on knowing name of file in cache directory.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -