Ext2 ÎļþϵͳµÄÓ²Å̲¼¾Ö
Ò»¸ö inode ÀïÃæʵ¼ÊÓжàÉÙ¸ö block£¬ÕâÊÇÓÉ inode ×ֶΠi_size ÔÙͨ¹ý¼ÆËãµÃµ½µÄ¡£i_size ¼Ç¼µÄÊÇÎļþ»òÕßĿ¼µÄʵ¼Ê´óС£¬ÓÃËüµÄÖµ³ýÒÔ block µÄ´óС£¬¾Í¿ÉÒԵóöÕâ¸ö inode Ò»¹²Õ¼Óм¸¸ö block¡£×¢ÒâÉÏÃæµÄ i_blocks ×ֶΣ¬´ÖÐĵĶÁÕß¿ÉÄÜ»áÒÔΪÊÇÕâÒ»×ֶμǼÁËÒ»¸ö inode ÖÐʵ¼ÊÓõ½¶àÉÙ¸ö block£¬Æäʵ²»Êǵġ£ÄÇôÕâÒ»×Ö¶ÎÊǸÉʲôÓõÄÄØ£¬¶ÁÕßÅóÓÑÃÇ¿ÉÒÔ½èÕâ¸ö»ú»á£¬ÌåÑéÒ»ÏÂÔĶÁ Linux ÄÚºËÔ´´úÂëµÄÀÖȤ¡£;-)
3.4 ÎļþϵͳµÄĿ¼½á¹¹
ÏÖÔÚÎÒÃÇÒѾ¿ÉÒÔ¶ÁÈ¡ inode µÄÄÚÈÝÁË£¬ÔÙÍùºó£¬ÎÒÃǽ«Òª¶ÁÈ¡ÎļþϵͳÉÏÎļþºÍĿ¼µÄÄÚÈÝ¡£¶ÁÈ¡ÎļþµÄÄÚÈÝ£¬Ö»Òª°ÑÏàÓ¦µÄ inode µÄÄÚÈÝÈ«²¿¶Á³öÀ´¾ÍÐÐÁË£»¶øĿ¼ֻÊÇÒ»Ö̶ֹ¨¸ñʽµÄÎļþ£¬Õâ¸öÎļþ°´Õչ̶¨µÄ¸ñʽ¼Ç¼ÁËĿ¼ÖÐÓÐÄÄЩÎļþ£¬ÒÔ¼°ËüÃǵÄÎļþÃû£¬ºÍ inode ºÅÊýµÈµÈ¡£
struct ext3_dir_entry_2 { __u32 inode; /* Inode ºÅÊý */ __u16 rec_len; /* Directory entry length */ __u8 name_len; /* Name length */ __u8 file_type; char name[EXT3_NAME_LEN]; /* File name */ }; ÉÏÃæÓõ½µÄ EXT3_NAME_LEN ÊÇ 255¡£×¢Ò⣬ÔÚÓ²ÅÌ·ÖÇøÉ쵀 dir entry ²»Êǹ̶¨³¤¶ÈµÄ£¬Ã¿¸ö dir entry µÄ³¤¶ÈÓÉÉÏÃæµÄ rec_len ×ֶμǼ¡£
С½á
ÓÐÁËÒÔÉϵÄÕâЩÐÅÏ¢£¬ÎÒÃǾͿÉÒÔ¶ÁÈ¡Ò»¸ö ext3 ÎļþϵͳµÄÈ«²¿ÄÚÈÝÁË¡£Èç¹û¶ÁÕßÓÐ Windows Çý¶¯³ÌÐò¿ª·¢µÄ¾Ñ飬´Ó±¾ÎĵÄÐÅÏ¢£¬¿ª·¢Ò»¸ö Windows ÏÂÖ»¶ÁµÄ ext3 ÎļþϵͳÊÇ¿ÉÄܵġ£µ«ÊÇÒªÏëÓÖ¶ÁÓÖд£¬ÄÇ»¹ÐèÒªÁ˽â Ext3 µÄÈÕÖ¾ÎļþµÄ½á¹¹£¬¶ø±¾ÎÄÏÞÓÚƪ·ù£¬²¢Ã»ÓаüÀ¨Õâ·½ÃæµÄÄÚÈÝ¡£
²Î¿¼×ÊÁÏ
1 Remy Card, Theodore Ts'o, Stephen Tweedie, Design and Implementation of the Second Extended Filesystem, http://web.mit.edu/tytso/www/linux/ext2intro.html
2 Linux Kernel 2.4.18 Source Code, http://lxr.linux.no/source/fs/ext3/
¹ØÓÚ×÷Õß
ÕÔ壬ÊÇÖйú´ó½µÚ¶þ¸ö×¢²áµÄ Debian GNU/Linux ÒåÎñ¿ª·¢ÈËÔ±¡£×÷Õ߶ÔÓÚ LISP ºÍ Lambda Calculus Ò²ÓÐŨºñµÄÐËȤ¡£
±¾ÐÂÎŹ² 6Ò³,µ±Ç°ÔÚµÚ 6Ò³ 1 2 3 4 5 6 |