LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   file system name space (https://www.linuxquestions.org/questions/programming-9/file-system-name-space-727272/)

Ajay Mozar 05-20-2009 07:30 AM

file system name space
 
Hi,
i am implementing dump for file system.To restore file system
name space. i decide to use hash table and entry of hash table for each
file and directory will be:

struct inode_info
{
ino_t inode;
node_info_t *next;
uint num_parents;
parent_info parent_inode_list[1];
};

struct parent_info
{
ino_t inode;
uint name_len;
char name[1];
};

i created hash table.But is there any standard way to dump hash table to file and restore it again.Please tell me where i can get more info or api or related code about this.

Thanks in advance

paulsm4 05-21-2009 12:58 AM

Hi -

If you were using Java or .Net, you could "serialize" and "deserialize" any collection (including a hash table, aka "map").

But it sounds like you might be doing kernel programming, and you might be using the hash tables available in "linux/list.h". No - there's no built-in API for serializing it.


All times are GMT -5. The time now is 05:38 AM.