LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 12-15-2008, 03:11 AM   #1
twwwater
Member
 
Registered: Nov 2008
Posts: 113
Blog Entries: 1

Rep: Reputation: 15
Smile linux kernel 0.01 's problem


hi !
all!

well,the linux kernel's 0.01 version.
under the dirctory /include/linux/fs.h
well,see,there's some code about struct .

struct d_inode {
84 unsigned short i_mode;
85 unsigned short i_uid;
86 unsigned long i_size;
87 unsigned long i_time;
88 unsigned char i_gid;
89 unsigned char i_nlinks;
90 unsigned short i_zone[9];
91 };
92
93 struct m_inode {
94 unsigned short i_mode;
95 unsigned short i_uid;
96 unsigned long i_size;
97 unsigned long i_mtime;
98 unsigned char i_gid;
99 unsigned char i_nlinks;
100 unsigned short i_zone[9];
101 /* these are in memory also */
102 struct task_struct * i_wait;
103 unsigned long i_atime;
104 unsigned long i_ctime;
105 unsigned short i_dev;
106 unsigned short i_num;
107 unsigned short i_count;
108 unsigned char i_lock;
109 unsigned char i_dirt;
110 unsigned char i_pipe;
111 unsigned char i_mount;
112 unsigned char i_seek;
113 unsigned char i_update;
114 };



anyone could tell me what does the m_inode and d_inode stand for?
I mean,what they are about ? I got confused about this.
for one,I guess that the d_inode stand for the directory and the m_inode stand for the module or m_indode is something that will stored into the memory .I do not know. any one could help me ?
thank you so much......

Last edited by twwwater; 12-15-2008 at 07:29 AM.
 
Old 12-15-2008, 01:48 PM   #2
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,642
Blog Entries: 4

Rep: Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933
In many cases, you will find "disk" versions of a structure and "memory" versions of the same structure. One is designed to save space (or to be backward-compatible); the other is designed to be convenient to process during the moment-to-moment operations of the system. I expect, although I am not sure, that this might be what you are dealing with here.
 
Old 12-16-2008, 09:38 PM   #3
twwwater
Member
 
Registered: Nov 2008
Posts: 113

Original Poster
Blog Entries: 1

Rep: Reputation: 15
wha.... ,got it.
thank you .
but,I have another question,you mean save memory space here by you said "save space"?
well,I think I have another more questions now.
but,thank you .~_~!!!!
 
Old 12-16-2008, 10:55 PM   #4
twwwater
Member
 
Registered: Nov 2008
Posts: 113

Original Poster
Blog Entries: 1

Rep: Reputation: 15
wha.... ,got it.
thank you .
but,I have another question,you mean save memory space here by you said "save space"?
well,I think I have another more questions now.
but,thank you .~_~!!!!
 
  


Reply



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
Linux kernel problem saran_sai Linux - Hardware 4 11-14-2008 08:12 AM
Linux Kernel Problem -- Kernel panic: CPU context corrupt crcooney Linux - Distributions 0 01-15-2004 08:48 AM
linux kernel problem cmardhekar Linux - Newbie 1 09-13-2001 02:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 01:01 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