LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-20-2009, 07:30 AM   #1
Ajay Mozar
LQ Newbie
 
Registered: Feb 2009
Posts: 10

Rep: Reputation: 0
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
 
Old 05-21-2009, 12:58 AM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete system log file but the space not released yuanjunliang Linux - Newbie 1 04-23-2009 03:09 PM
Out of space on the VAR file system swamprat Linux - Software 11 12-31-2008 10:00 PM
not enough file system space error Fredsnet Solaris / OpenSolaris 9 01-06-2008 10:02 PM
About File System in USer Space (FUSE). Sebouh Programming 25 06-08-2007 04:53 AM
Large tar file taking huge disk space in ext3 file system pcwulf Linux - General 2 10-20-2003 07:45 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration