[MetaFS-devel] Is this a bug in metafs version 0.1.5?
Status: Pre-Alpha
Brought to you by:
condordes
From: <sil...@gm...> - 2007-02-23 02:28:43
|
Greetings, When I was using metafs, I found something a little unusual that may be a bug in metafs. In the operation rename, uid changes to root automatically. I look over the code in file metafsd/fuse_ll.cc, function "static void _rename(fuse_req_t req, fuse_ino_t parent, const char *name, fuse_ino_t newparent, const char *newname)", line 503, "destdir->rename(&Context::root, srcdir, name, newname);" Why metafs pass parameter "&Context::root" instead of "&ctx"? And in the root-plugin realfs, file plugins/realfs/xattr_db.cc. When operating Berkeley db, code, such as "if (! strncmp((char *)oldvalue.get_data(), name.c_str(), oldvalue.get_size()))", seems not work in it's originally intention. Metafs compares data "oldvalue" and "name", if they have same prefix? An "oldvalue" "aaa" will not be replaced if "name" string is "aaaaa". Should metafs check the string length before comparing? TANG Siliang. |