Linux ÐéÄâÎļþϵͳ¸Å¹Û
Linux ÐéÄâÎļþϵͳ¸Å¹Û
×÷Õß Richard Gooch <rgooch@atnf.cs.iro.au>
·Òë albcamus <albcamus@gmail.com>
×îºó¸üÐÂ:2007 Äê 6 Ô 24 ÈÕ
°æȨ:1999, Richard Gooch
°æȨ:2005, Pekka Enberg
±¾ÎļþÒÔ GPLv2 Ðí¿É·¢·Å
[·Òë˵Ã÷:Richard Gooch µÄÕâ·Ý Overview of the Linux Virtual File System λÓÚÄÚºË
Ô´´úÂëµÄ Documentation/filesystems/ÏÂ, ÎļþÃûÊÇ vfs.txt¡£ ¸ÃÎĵµÔÚ Understanding
the Linux Kernel Öб»ÍƼö, ÎÒÊÇ´Ó 2.6.16 ¹Ù·½ÄÚºËÖп½±´³öÀ´·ÒëµÄ¡£ ×Ô¼ºÖªµÀˮƽ
²î, Àí½âºÍ±í´ï¶¼²»µ½Î», ËùÒÔ»¹Êǽ¨Òé¿´ÔÎÄ:( ]
½éÉÜ
====
ÐéÄâÎļþϵͳ(Ò²±»³Æ×öÐéÄâÎļþϵͳÇл»)ÊÇÄÚºËÖÐΪӦÓóÌÐòÌṩÎļþϵͳ½Ó¿ÚµÄÒ»¸öÈí¼þ²ã¡£
ͬʱ, ËüҲΪ²»Í¬µÄÎļþϵͳ¹²´æ, ÌṩÁËÒ»ÖÖ³éÏó¡£
open(2),stat(2),read(2),write(2),chmod(2)µÈVFSϵͳµ÷ÓÃ, ÊÇÔÚ½ø³ÌÉÏÏÂÎÄÖб»
µ÷Óõġ£ ÎļþËøµÄÃèÊöÔÚ Documnetation/filesystems/LockingÖС£
Ŀ¼Ï´æ(dcache)
-----------------
VFSʵÏÖÁËÖîÈç open(2),stat(2),chmod(2)µÈϵͳµ÷Óᣠ·¾¶Ãû×÷Ϊ²ÎÊý´«µÝ¸øÕâЩϵͳ
µ÷ÓÃ, È»ºóVFSʹÓ÷¾¶Ãû, ÔÚĿ¼Ï´æ(Ò²½Ð dentry cache »ò dcache)ÖвéÕÒÏàÓ¦µÄÄ¿
¼Ïî(dentry)¡£ ͨ¹ýĿ¼Ï´æ, ·¾¶Ãû(ÎļþÃû)ÄÜѸËÙµÃת»»³ÉÏàÓ¦µÄĿ¼Ïî¡£ Ŀ¼ÏîÖ»´æ
ÔÚÓÚÄÚ´æÖÐ, ²»»á±£´æµ½´ÅÅÌÉÏ:ËüÃÇ´æÔÚµÄÒâÒåÔÚÓÚÐÔÄÜ¡£
Ŀ¼Ï´æ(dcache)Ö¼ÔÚά»¤Õû¸öÎļþ¿Õ¼äµÄÒ»¸öÊÓͼ¡£ µ«´ó¶àÊý¼ÆËã»úÎÞ·¨½«ÎļþϵͳµÄÕû
¸öĿ¼½á¹¹»º´æÔÚÄÚ´æÖÐ, Òò´ËÓÐЩÎļþûÓб»»º´æ¡£ ΪÁË°Ñ·¾¶Ãû½âÎö³ÉÏàӦĿ¼Ïî(dentry),
VFSµÃÒ»²½²½µÄ½«Â·¾¶Ãû·Ö½â£¬´´½¨Ä¿Â¼Ïî(dentry)£¬¶ÁÈ¡ÏàÓ¦µÄInode¡£ Õâ¸ö¹ý³ÌÊÇͨ¹ý
InodeÖеIJéÕÒ·½·¨×öµ½µÄ¡£
Inode ¶ÔÏó
---------
Ò»¸öĿ¼Ïî £¨dentry£© ͨ³£°üº¬Ö¸Ïò inode µÄÖ¸Õë¡£ InodeÊÇÎļþϵͳÖеĶÔÏó, ÖîÈç³£¹æÎļþ,
Ŀ¼£¬ ¹ÜµÀ(FIFO) ºÍÆäËûµÄÎļþϵͳ¶ÔÏó¡£ ËüÃÇҪô±£´æÔÚÓÚ´ÅÅÌÉÏ(¿éÉ豸ÉϵÄÎļþϵͳ), Ҫô
´æÔÚÓÚÄÚ´æÖÐ(αÎļþϵͳ)¡£ µ±ÐèҪʱ, ÔÚ´ÅÅÌÉ쵀 inode»á±»¶ÁÈ¡µ½ÄÚ´æÖÐ; ¶ÔinodeµÄÐÞ¸ÄÒ²»á
д»Øµ½´ÅÅÌÉÏ¡£ Ò»¸ö Inode¿ÉÒÔ±»¶à¸öĿ¼Ïî(dentry)Ö¸Ïò(ÀýÈçÓ²Á´½Ó¾ÍÊÇÕâÑù)¡£
²éÕÒÒ»¸öÎļþµÄInode, VFSÐèÒªµ÷ÓÃËüµÄ¸¸Ä¿Â¼¶ÔÓ¦InodeµÄlookup()·½·¨¡£ ¸Ã·½·¨ÓÉInodeËùÔÚ
µÄÎļþϵͳʵÏÖÀ´¶¨Òå¡£ Ò»µ© VFSÕÒµ½ÁËdentry(Òò´ËÒ²¾ÍÖªµÀÁËinode
Ïà¹ØÎĵµ£º
£¨L2CAPÐÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPÐÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼Á¬½Ó¿ØÖƺÍÊÊÅäÐÒé (L2CAP) ΪÉϲãÐÒéÌṩÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àÐÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãÐÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......
˵Ã÷1£º
ÎÄ×ÖÖеÄY±íʾѡÔñ½øÄںˡ£M±íʾ±à³ÉÄ£¿é¡£N±íʾ²»Ñ¡Ôñ¡£ÓеÄÖ»ÄÜÑ¡Y£¬ÓеÄÖ»ÄÜÑ¡M¡£
ÔÚmake menuconfig Ï£¬£ª±íʾY£¬M±íʾM£¬¿Õ°×±íʾN¡£
make xconfigÏ£¬√ ±íʾY£¬? ±íʾM£¬¿Õ°×±íʾN¡£
˵Ã÷2£º
²Ëµ¥ÖУ¬ÓеÄÑ¡ÏîÄãÑ¡ÁËY²Å³öÏÖ£¬ÓеÄÑ¡ÁËY£¬Ëü·´¶ø²»»á³öÏÖ¡£ÓеÄÑ¡Ïî¸ù±¾²»»áÌṩѡÔñ¡£ËùÒÔÎÒÌṩµ ......
Ëæ×ÅLinuxÓ¦ÓõÄÀ©Õ¹Ðí¶àÅóÓÑ¿ªÊ¼½Ó´¥Linux£¬¸ù¾ÝѧϰWindwosµÄ¾ÑéÍùÍùÓÐһЩãȻµÄ¸Ð¾õ£º²»Öª´ÓºÎ´¦¿ªÊ¼Ñ§Æð¡£ÕâÀï½éÉÜѧϰLinuxµÄһЩ½¨Òé¡£
Ò»¡¢´Ó»ù´¡¿ªÊ¼£º³£³£ÓÐЩÅóÓÑÔÚLinuxÂÛ̳ÎÊһЩÎÊÌ⣬²»¹ý£¬ÆäÖдó¶àÊýµÄÎÊÌⶼÊǺܻù´¡µÄ¡£ÀýÈ磺ΪʲôÎÒʹÓÃÒ»¸öÃüÁîµÄʱºò£¬ÏµÍ³¸æËßÎÒÕÒ²»µ½¸ÃĿ¼£¬ÎÒÒªÈçºÎÏÞÖÆʹÓÃÕß ......
³ö´¦:http://ericxiao.cublog.cn/
Ò»£ºÇ°ÑÔ
ÔÚ¼üÅÌÇý¶¯´úÂë·ÖÎöµÄ±Ê¼ÇÖУ¬½Ó´¥µ½ÁËinput×Óϵͳ.¼üÅÌÇý¶¯£¬¼üÅÌÇý¶¯½«¼ì²âµ½µÄËùÓа´¼ü¶¼Éϱ¨¸øÁËinput×Óϵͳ¡£Input×ÓϵͳÊÇËùÓÐI/OÉ豸Çý¶¯µÄÖмä²ã£¬ÎªÉϲãÌṩÁËÒ»¸öͳһµÄ½çÃæ¡£ÀýÈ磬ÔÚÖÕ¶ËϵͳÖУ¬ÎÒÃDz»ÐèҪȥ¹ÜÓжàÉÙ¸ö¼üÅÌ£¬¶àÉÙ¸öÊó±ê¡£ËüÖ»Òª´Óinput×ÓϵͳÖÐÈ¥È ......
ÐéÄ⻯¼¼ÊõµÄ·½·¨, ¼Ü¹¹ºÍʵÏÖ¸ÅÀÀ
¼¶±ð: Öм¶
M. Tim Jones [mtj@mtjones.com], ¹ËÎʹ¤³Ìʦ, Emulex
ÔÎÄ: Virtual Linux
Òë: ÕÔçæ cn.zhaoke.com
http://blog.zhaoke.com/45.html
2006Äê12ÔÂ29ÈÕ
ÐéÄ⻯¼¼ÊõµÄÓ¦ÓÃÊ®·Ö¹ã·º. µ±Ç°ÐéÄ⻯¼¼ÊõÖ÷Òª¹Ø×¢ÓÚ·þÎñÆ÷µÄÐéÄ⻯, »òÔÚµ¥¸öÖ÷»úÉϼĴæ¶à¸ö¶ÀÁ¢µÄ²Ù×÷ϵͳ. ±¾Î ......