[filesystem] struct of m_inode

2013-03-01 Thread lx
Hi, I'm learning the kernel of 0.12, and the function in inode.c: static int _bmap(struct m_inode * inode,int block,int create) { struct buffer_head * bh; int i; if (block0) panic(_bmap: block0); if (block = 7+512+512*512)

Re: [filesystem] struct of m_inode

2013-03-01 Thread Valdis . Kletnieks
On Sat, 02 Mar 2013 10:28:26 +0800, lx said: if (block = 7+512+512*512) because the i_zone[9]. But the question is why the i_zone[7] can repesent 512 , and i_zone[8] can repesent 512*512 ? Sngle, double, and triple indirect blocks... http://en.wikipedia.org/wiki/Inode_pointer_structure