[chord] what is mpz_get_raw and others

zkfzle zkfzle at gmail.com
Mon Mar 26 20:51:04 EST 2007


 

 I found in the database,the length of key/value pairs of inode information usually larger than what it should be,about 10 bytes.What had happened to them?
mpz_get_raw appeared often.What is it?Is it the reason of the '10 bytes'?
In the file 'adbd.c',I tried to modify the function 'lookup'.In my imagination,
int 
dbns::lookup (const chordID &key, str &data) 
{ 
  int r = 0; 

  str key_str = id_to_str (key); 
  DBT skey; 
  str_to_dbt (key_str, &skey); 

  DBT content; 
  bzero (&content, sizeof (content)); 

  // Implicit transaction 
  r = datadb->get (datadb, NULL, &skey, &content, 0); 
  if (r) { 
    if (r != DB_NOTFOUND) 
      warner ("dbns::fetch", "get error", r); 
    return r; 
  } 
  data.setbuf ((const char *) (content.data), content.size); 
  return 0;}
the DBT structure 'content' is the content of inode data.But I wanted to modity the content.data as a string,then give the changed value to the str data.The final result I wanted to get in filestore -f.(I store only inode information.)But the chord told me not found in the vnode where it should be.However,I used dbdump,the pair is there.(And before I modify the adbd.c,I can get the inode information via filestore -f.Of course, I changed the structure of inode.)Could you please tell me why?
Is the information stored to disk encrypted?
                                                                                                Yours,Zhou Kun
                                                                                                2007-3-27  09:50:58
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://pdos.csail.mit.edu/pipermail/chord/attachments/20070326/501e93de/attachment.htm


More information about the chord mailing list