I need to check if a file is deleted in CephFS by libcephfs.
I want to use ceph_ll_lookup_vino() that would be the best for us. But it always returns inode successfully. Also, ceph_ll_getattr() still returns stat info with zero in’stx_nlink’ field.
I carefully checked and hope not missing any ceph_ll_put(). The procedure is similar to –
ceph_ll_create()->ceph_ll_close()->ceph_ll_lookup()->ceph_ll_put()->ceph_ll_put()->ceph_ll_lookup_vivo()->ceph_ll_getattr()
There might be some error in my code. What I want to ask is a general question –
** Is it by design that an inode is still accessible after relevant file deleted in CephFS? **
In another way to ask, ** when an inode is deleted (inaccessible by user) after its reference count reached zero in CephFS? **
Ceph:
*** 17.2.7-1~bpo11+1 500
500 https://download.ceph.com/debian-quincy bullseye/main amd64 Packages
libcephfs-dev:
*** 17.2.7-1~bpo11+1 500
500 https://download.ceph.com/debian-quincy bullseye/main amd64 Packages
Thanks a lot,
Adam
Adam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.