New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
osd: FileStore:: optimize lfn_unlink #6649
Conversation
seems in previous code if force_clear_omap = true, these two line will not be executed? wbthrottle.clear_object(o); // should be only non-cache ref |
In the original code, if force_clear_omap == true, it still call "wbthrottle.clear_object & fdcache.clear". |
@tchaikov ....hmm...that part of code is hided....see line 497...Jianpeng is right.... |
@majianpeng and @xiaoxichen , if |
@tchaikov .You are right. I'll update. |
35793e7
to
ddc085c
Compare
In _lookup, it already check object whether exists. So no need check again in lookup func. Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
…ion. Origin: virtual int lookup( const ghobject_t &oid, ///< [in] Object to lookup IndexedPath *path, ///< [out] Path to object int *exist ///< [out] True if the object exists,else false ) = 0; Now: virtual int lookup( const ghobject_t &oid, ///< [in] Object to lookup IndexedPath *path, ///< [out] Path to object int *hardlink ///< [out] hardlink for this objct. *hardlink=0 mean no-exist. ) = 0; Change mean of last parameter, now using it indicate hardlinks(by syscall(stat). If hardlink=0, mean file don't exist. This for lfn_unlink when "force_clear_omap == false"(delete object use this code path). Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
apart from a nit, lgtm with a qa run. |
ddc085c
to
3ee2f6d
Compare
lgtm with a qa run. |
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
osd: FileStore:: optimize lfn_unlink Reviewed-by: Kefu Chai <kchai@redhat.com>
If object didn't exist, the Index::lookup return 0 and set exist to
zero. So we should first check exist.
Signed-off-by: Jianpeng Ma jianpeng.ma@intel.com