Re: [MetaFS-devel] Is this a bug in metafs version 0.1.5?
Status: Pre-Alpha
Brought to you by:
condordes
From: Joshua J. B. <de...@co...> - 2007-02-24 22:49:53
Attachments:
xattr-db-name-fix.patch
|
On Thursday 22 February 2007 18:28:40 汤斯亮 wrote: > When I was using metafs, I found something a little unusual that may be a > bug in metafs. Thanks for your note. Sorry for not getting back to you sooner. > 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"? Probably because I wasn't paying attention. ;) I've pushed a fix for this into the Darcs repository. Thanks for the bug report. > 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? hmmm, yes. There was another problem I saw while I was reading through, so I reworked that code a bit. Please try the attached patch and let me know if it fixes the problem. I don't use xattr_db myself anymore, so I don't have any easy way of testing it, unfortunately. Thanks for the feedback! -- Josh -- Joshua J. Berry "I haven't lost my mind -- it's backed up on tape somewhere." -- /usr/games/fortune |