{"id":23864,"date":"2025-04-19T08:42:18","date_gmt":"2025-04-19T00:42:18","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/23864.html"},"modified":"2025-04-19T08:42:18","modified_gmt":"2025-04-19T00:42:18","slug":"linux%e7%ac%94%e8%ae%b0-%e6%96%87%e4%bb%b6%e7%b3%bb%e7%bb%9f%e8%bd%af%e4%bb%b6%e9%83%a8%e5%88%86","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/23864.html","title":{"rendered":"Linux\u7b14\u8bb0---\u6587\u4ef6\u7cfb\u7edf\u8f6f\u4ef6\u90e8\u5206"},"content":{"rendered":"<h2>1. \u524d\u7f6e\u6982\u5ff5<\/h2>\n<h4>1.1 \u5757<\/h4>\n<p><span style=\"background-color:#a2e043\">\u786c\u76d8\u662f\u5178\u578b\u7684\u201c\u5757\u201d\u8bbe\u5907<\/span>&#xff0c;\u64cd\u4f5c\u7cfb\u7edf<span style=\"color:null\"><span style=\"background-color:#a2e043\">\u8bfb\u53d6\u786c\u76d8\u6570\u636e\u7684\u65f6\u5019<\/span><\/span>&#xff0c;\u5176\u5b9e\u662f\u4e0d\u4f1a\u4e00\u4e2a\u6247\u533a\u4e00\u4e2a\u6247\u533a\u5730\u8bfb\u53d6\u7684&#xff0c;\u800c\u662f\u4e00\u6b21\u6027\u8fde\u7eed\u8bfb\u53d6\u591a\u4e2a\u6247\u533a&#xff0c;\u4ee5\u63d0\u5347\u6548\u7387&#xff0c;\u5373<span style=\"background-color:#a2e043\">\u4e00\u6b21\u6027\u8bfb\u53d6\u4e00\u4e2a\u201d\u5757\u201d<\/span>&#xff08;block&#xff09;\u3002<\/p>\n<p>\u4e00\u4e2a\u201d\u5757\u201d\u7684\u5927\u5c0f\u662f\u7531\u683c\u5f0f\u5316\u7684\u65f6\u5019\u786e\u5b9a\u7684&#xff0c;\u5e76\u4e14\u4e0d\u53ef\u4ee5\u66f4\u6539&#xff0c;\u6700\u5e38\u89c1\u7684\u662f4KB&#xff0c;\u5373\u8fde\u7eed\u516b\u4e2a\u6247\u533a\u7ec4\u6210\u4e00\u4e2a \u201d\u5757\u201d\u3002\u201d\u5757\u201d\u662f\u6587\u4ef6\u5b58\u53d6\u7684\u6700\u5c0f\u5355\u4f4d\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"195\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250419004213-6802f16516c2f.png\" width=\"822\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"105\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250419004213-6802f1653c6ac.png\" width=\"1046\" \/><\/p>\n<p>\u5757\u53f7\u662f\u4ece\u96f6\u5f00\u59cb\u8fde\u7eed\u9012\u589e\u7684&#xff0c;\u7ed3\u5408\u6211\u4eec\u5728\u786c\u4ef6\u90e8\u5206\u5b66\u4e60\u7684LBA\u5730\u5740&#xff0c;\u6211\u4eec\u53ef\u4ee5\u5f97\u51fa\u4ee5\u4e0b\u7ed3\u8bba&#xff1a;<\/p>\n<p>\u5757\u53f7 &#061; LBA \/ 8&#xff1b;<\/p>\n<p>LBA &#061; \u5757\u53f7 * 8 &#043; n(\u5757\u5185\u7684\u7b2c\u51e0\u4e2a\u6247\u533a)&#xff1b;\u00a0<\/p>\n<h4>1.2 \u5206\u533a<\/h4>\n<p>\u4e00\u4e2a\u78c1\u76d8\u5b9e\u9645\u4e0a\u53ef\u4ee5\u88ab\u5212\u5206\u4e3a\u591a\u4e2a\u5206\u533a\u3002\u4ee5Windows\u4e3a\u4f8b&#xff0c;\u6211\u4eec\u7684\u7535\u8111\u901a\u5e38\u53ea\u6709\u4e00\u5757\u56fa\u6001\u786c\u76d8&#xff0c;\u4f46\u662f\u6211\u4eec\u53ef\u4ee5\u5728\u903b\u8f91\u4e0a\u5c06\u5176\u5212\u5206\u4e3aC\u3001D\u3001E\u3001\u2026\u2026\u7b49\u591a\u4e2a\u78c1\u76d8\u3002C\u76d8\u3001D\u76d8\u3001E\u76d8\u7b49&#xff0c;\u5373\u4e3a\u7269\u7406\u786c\u76d8\u7684\u591a\u4e2a\u5206\u533a\u3002<\/p>\n<p>\u5728\u64cd\u4f5c\u7cfb\u7edf\u5c42\u9762\u4e0a&#xff0c;\u8fd9\u4e9b\u76d8\u4f5c\u4e3a\u5916\u8bbe&#xff0c;\u90fd\u662f\u4ee5\u6587\u4ef6\u7684\u5f62\u5f0f\u88ab\u7ba1\u7406\u8d77\u6765\u7684&#xff0c;\u4f46\u4ed6\u4eec\u662f\u4e00\u79cd\u903b\u8f91\u4e0a\u7684\u5206\u533a&#xff0c;\u6ca1\u6709\u7269\u7406\u53c2\u8003&#xff0c;\u5982\u4f55\u754c\u5b9a\u5206\u533a\u8303\u56f4\u5462&#xff1f;<\/p>\n<p><span style=\"background-color:#a2e043\">\u67f1\u9762\u662f\u5206\u533a\u7684\u6700\u5c0f\u5355\u4f4d<\/span>&#xff0c;\u6240\u4ee5\u6211\u4eec\u53ef\u4ee5\u5229\u7528\u67f1\u9762\u53f7\u7801\u7684\u65b9\u5f0f\u6765\u8fdb\u884c\u5206\u533a&#xff0c;\u5176\u672c\u8d28\u5c31\u662f\u8bbe\u7f6e\u6bcf\u4e2a\u5206\u533a\u7684\u8d77\u59cb\u67f1\u9762\u548c\u7ed3\u675f\u67f1\u9762\u53f7\u7801\u3002\u00a0<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"232\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250419004213-6802f16565323.png\" width=\"1652\" \/><\/p>\n<p>\u4e0a\u56fe\u4e2d\u542f\u52a8\u5757&#xff08;Boot Block\/Sector&#xff09;\u7684\u5927\u5c0f\u662f\u786e\u5b9a\u7684&#xff0c;\u4e3a1KB&#xff0c;\u7531PC\u6807\u51c6\u89c4\u5b9a&#xff0c;\u7528\u4e8e\u5b58\u50a8\u78c1\u76d8\u5206\u533a\u4fe1\u606f\u548c\u542f\u52a8\u4fe1\u606f&#xff0c;\u4efb\u4f55\u6587\u4ef6\u7cfb\u7edf\u90fd\u4e0d\u80fd\u4fee\u6539\u542f\u52a8\u5757\u3002\u542f\u52a8\u5757\u4e4b\u540e\u624d\u662fext2\u6587\u4ef6\u7cfb\u7edf\u7684\u5f00\u59cb\u3002<\/p>\n<h2>2. \u6587\u4ef6\u7cfb\u7edf<\/h2>\n<p>\u6211\u4eec\u60f3\u8981\u5728\u786c\u76d8\u4e0a\u5b58\u50a8\u6587\u4ef6&#xff0c;\u5fc5\u987b\u5148\u628a\u786c\u76d8\u683c\u5f0f\u5316\u4e3a\u67d0\u79cd\u683c\u5f0f\u7684\u6587\u4ef6\u7cfb\u7edf&#xff0c;\u624d\u80fd\u5b58\u50a8\u6587\u4ef6\u3002\u6587\u4ef6\u7cfb\u7edf\u7684\u76ee\u7684\u5c31\u662f\u7ec4\u7ec7\u548c\u7ba1\u7406\u786c\u76d8\u4e2d\u7684\u6587\u4ef6\u3002\u5728 Linux \u7cfb\u7edf\u4e2d&#xff0c;\u6700\u5e38\u89c1\u7684\u662f ext2 \u7cfb\u5217\u7684\u6587\u4ef6\u7cfb\u7edf\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"786\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250419004213-6802f165b7893.png\" width=\"1480\" \/><\/p>\n<p>\u4ece\u4e0a\u56fe\u5c31\u53ef\u4ee5\u770b\u51fa&#xff0c;<span style=\"background-color:#a2e043\">\u4e00\u4e2a\u5206\u533a\u5b9e\u9645\u4e0a\u5c31\u5bf9\u5e94\u4e00\u4e2a\u6587\u4ef6\u7cfb\u7edf<\/span>\u3002\u4e3a\u4e86\u6a21\u62df\u7269\u7406\u610f\u4e49\u4e0a\u7684\u591a\u4e2a\u72ec\u7acb\u78c1\u76d8&#xff0c;\u6240\u4ee5\u5404\u4e2a\u5206\u533a\u7684\u6587\u4ef6\u7531\u81ea\u5df1\u7684\u6587\u4ef6\u7cfb\u7edf\u8fdb\u884c\u7ba1\u7406\u3002<\/p>\n<h3>2.1 \u5757\u7ec4(Block Group)<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"69\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250419004214-6802f1664628c.png\" width=\"1021\" \/><\/p>\n<p><span style=\"background-color:#a2e043\">ext2\u6587\u4ef6\u7cfb\u7edf\u4f1a\u6839\u636e\u5206\u533a\u7684\u5927\u5c0f\u5212\u5206\u4e3a\u6570\u4e2aBlock Group\u3002<\/span>\u800c\u6bcf\u4e2aBlock Group\u90fd\u6709\u7740\u76f8\u540c\u7684\u7ed3\u6784\u7ec4\u6210&#xff0c;\u5404\u4e2a\u5757\u7ec4\u53ef\u4ee5\u5e94\u7528\u76f8\u540c\u7684\u7ba1\u7406\u7b56\u7565\u3002<\/p>\n<p>\u4e00\u4e2a\u5757\u7ec4\u4f1a\u88ab\u5212\u5206\u4e3a6\u4e2a\u90e8\u5206&#xff1a;<span style=\"background-color:#a2e043\">\u8d85\u7ea7\u5757(Super Block)\u3001\u5757\u7ec4\u63cf\u8ff0\u7b26\u8868(GDT)\u3001\u5757\u4f4d\u56fe(Block Bitmap)\u3001inode\u4f4d\u56fe(inode Bitmap)\u3001i\u8282\u70b9\u8868(inode Table)\u3001\u6570\u636e\u533a(Data Blocks)<\/span>\u3002<\/p>\n<p>\u5176\u4e2d&#xff0c;\u524d\u56db\u4e2a\u90e8\u5206\u662f\u5b58\u50a8\u7684\u662f\u7ba1\u7406\u4fe1\u606f&#xff0c;\u540e\u4e24\u4e2a\u90e8\u5206\u5b58\u50a8\u7684\u624d\u662f\u6587\u4ef6\u7684\u6570\u636e\u3002<\/p>\n<h4>\u00a02.1.1\u00a0\u6570\u636e\u533a(Data Blocks)<\/h4>\n<p>\u4ece\u547d\u540d\u4e0a\u5c31\u53ef\u4ee5\u770b\u51fa&#xff0c;\u8fd9\u90e8\u5206\u662f\u7531\u4e00\u4e2a\u4e00\u4e2a\u7684\u5757(Block)\u6784\u6210\u7684&#xff0c;\u7528\u4e8e\u5b58\u50a8\u6587\u4ef6\u7684\u5185\u5bb9\u6570\u636e\u3002<\/p>\n<p>\u4e0a\u56fe\u4e2d\u5757\u7ec4\u5404\u90e8\u5206\u7684\u6bd4\u4f8b\u5e76\u4e0d\u662f\u5f88\u6b63\u786e&#xff0c;\u5b9e\u9645\u4e0a<span style=\"background-color:#a2e043\">\u6570\u636e\u533a\u90e8\u5206\u4f1a\u5360\u5230\u4e00\u4e2a\u5757\u7ec4\u7684\u7edd\u5927\u90e8\u5206\u7a7a\u95f4<\/span>\u3002<\/p>\n<p>\u6bcf\u4e00\u4e2a\u5757\u90fd\u6709\u81ea\u5df1\u5bf9\u5e94\u7684\u7f16\u53f7&#xff0c;\u4e00\u4e2a\u5206\u533a\u7684\u5757\u7edf\u4e00\u7f16\u53f7&#xff08;\u8de8\u7ec4\u4e0d\u8de8\u5206\u533a&#xff09;\u3002<\/p>\n<h4>2.1.2\u00a0i\u8282\u70b9\u8868(inode Table)<\/h4>\n<p>\u663e\u7136&#xff0c;<span style=\"background-color:#a2e043\">inode Table\u5c31\u662f\u7528\u4e8e\u5b58\u50a8inode\u7684\u8868\u683c<\/span>&#xff0c;\u6211\u4eec\u53ea\u9700\u8981\u628ainode\u641e\u6e05\u695a&#xff0c;\u8fd9\u90e8\u5206\u5c31\u8fce\u5203\u800c\u89e3\u4e86\u3002<\/p>\n<p>\u6211\u4eec\u8bf4\u8fc7&#xff0c;\u6587\u4ef6 &#061; \u5c5e\u6027 &#043; \u6570\u636e\u3002\u5728Linux\u4e2d&#xff0c;\u6587\u4ef6\u7684\u5c5e\u6027\u548c\u6570\u636e\u662f\u5206\u79bb\u5b58\u50a8\u7684\u3002<\/p>\n<p>inode\u5b9e\u9645\u4e0a\u5c31\u662f\u5b58\u50a8\u6587\u4ef6\u5c5e\u6027(\u5143\u4fe1\u606f)\u7684\u7ed3\u6784\u4f53&#xff0c;\u4e2d\u6587\u8bd1\u540d\u201c\u7d22\u5f15\u7ed3\u70b9\u201d\u3002\u6bcf\u4e00\u4e2a\u6587\u4ef6\u90fd\u6709\u5bf9\u5e94\u7684inode&#xff0c;\u6bcf\u4e2ainode\u90fd\u6709\u5176\u552f\u4e00\u6807\u8bc6\u7b26&#xff08;inode\u53f7&#xff0c;\u540c\u6837\u8de8\u7ec4\u4e0d\u8de8\u5206\u533a&#xff0c;\u5206\u533a\u5185\u7edf\u4e00\u7f16\u53f7&#xff09;\u3002<\/p>\n<p>\/*<br \/>\n* \u78c1\u76d8\u4e0a\u7684inode\u7ed3\u6784<br \/>\n*\/<br \/>\nstruct ext2_inode {<br \/>\n    __le16 i_mode; \/* \u6587\u4ef6\u6a21\u5f0f *\/<br \/>\n    __le16 i_uid; \/* \u6240\u6709\u8005UID\u7684\u4f4e16\u4f4d *\/<br \/>\n    __le32 i_size; \/* \u4ee5\u5b57\u8282\u4e3a\u5355\u4f4d\u7684\u6587\u4ef6\u5927\u5c0f *\/<br \/>\n    __le32 i_atime; \/* \u8bbf\u95ee\u65f6\u95f4 *\/<br \/>\n    __le32 i_ctime; \/* \u521b\u5efa\u65f6\u95f4 *\/<br \/>\n    __le32 i_mtime; \/* \u4fee\u6539\u65f6\u95f4 *\/<br \/>\n    __le32 i_dtime; \/* \u5220\u9664\u65f6\u95f4 *\/<br \/>\n    __le16 i_gid; \/* \u7ec4ID\u7684\u4f4e16\u4f4d *\/<br \/>\n    __le16 i_links_count; \/* \u94fe\u63a5\u8ba1\u6570 *\/<br \/>\n    __le32 i_blocks; \/* \u5757\u8ba1\u6570 *\/<br \/>\n    __le32 i_flags; \/* \u6587\u4ef6\u6807\u5fd7 *\/<br \/>\n    union {<br \/>\n        struct {<br \/>\n            __le32 l_i_reserved1;<br \/>\n        } linux1;<br \/>\n        struct {<br \/>\n            __le32 h_i_translator;<br \/>\n        } hurd1;<br \/>\n        struct {<br \/>\n            __le32 m_i_reserved1;<br \/>\n        } masix1;<br \/>\n    } osd1; \/* \u64cd\u4f5c\u7cfb\u7edf\u76f8\u5173\u5b57\u6bb51 *\/<br \/>\n    __le32 i_block[EXT2_N_BLOCKS];\/* \u6307\u5411\u6570\u636e\u5757\u7684\u6307\u9488 *\/<br \/>\n    __le32 i_generation; \/* \u6587\u4ef6\u7248\u672c&#xff08;\u7528\u4e8eNFS&#xff09; *\/<br \/>\n    __le32 i_file_acl; \/* \u6587\u4ef6\u8bbf\u95ee\u63a7\u5236\u5217\u8868 *\/<br \/>\n    __le32 i_dir_acl; \/* \u76ee\u5f55\u8bbf\u95ee\u63a7\u5236\u5217\u8868 *\/<br \/>\n    __le32 i_faddr; \/* \u7247\u6bb5\u5730\u5740 *\/<br \/>\n    union {<br \/>\n        struct {<br \/>\n            __u8 l_i_frag; \/* \u7247\u6bb5\u7f16\u53f7 *\/<br \/>\n            __u8 l_i_fsize; \/* \u7247\u6bb5\u5927\u5c0f *\/<br \/>\n            __u16 i_pad1;<br \/>\n            __le16 l_i_uid_high; \/* \u8fd9\u4e24\u4e2a\u5b57\u6bb5 *\/<br \/>\n            __le16 l_i_gid_high; \/* \u539f\u4e3areserved2[0] *\/<br \/>\n            __u32 l_i_reserved2;<br \/>\n        } linux2;<br \/>\n        struct {<br \/>\n            __u8 h_i_frag; \/* \u7247\u6bb5\u7f16\u53f7 *\/<br \/>\n            __u8 h_i_fsize; \/* \u7247\u6bb5\u5927\u5c0f *\/<br \/>\n            __le16 h_i_mode_high;<br \/>\n            __le16 h_i_uid_high;<br \/>\n            __le16 h_i_gid_high;<br \/>\n            __le32 h_i_author;<br \/>\n        } hurd2;<br \/>\n        struct {<br \/>\n            __u8 m_i_frag; \/* \u7247\u6bb5\u7f16\u53f7 *\/<br \/>\n            __u8 m_i_fsize; \/* \u7247\u6bb5\u5927\u5c0f *\/<br \/>\n            __u16 m_pad1;<br \/>\n            __u32 m_i_reserved2[2];<br \/>\n        } masix2;<br \/>\n    } osd2; \/* \u64cd\u4f5c\u7cfb\u7edf\u76f8\u5173\u5b57\u6bb52 *\/<br \/>\n};<\/p>\n<p>\/*<br \/>\n* \u4e0e\u6570\u636e\u5757\u76f8\u5173\u7684\u5e38\u91cf<br \/>\n*\/<br \/>\n#define EXT2_NDIR_BLOCKS 12       \/* \u76f4\u63a5\u6570\u636e\u5757\u6570\u91cf *\/<br \/>\n#define EXT2_IND_BLOCK EXT2_NDIR_BLOCKS  \/* \u4e00\u7ea7\u95f4\u63a5\u5757\u7d22\u5f15 *\/<br \/>\n#define EXT2_DIND_BLOCK (EXT2_IND_BLOCK &#043; 1)  \/* \u4e8c\u7ea7\u95f4\u63a5\u5757\u7d22\u5f15 *\/<br \/>\n#define EXT2_TIND_BLOCK (EXT2_DIND_BLOCK &#043; 1)  \/* \u4e09\u7ea7\u95f4\u63a5\u5757\u7d22\u5f15 *\/<br \/>\n#define EXT2_N_BLOCKS (EXT2_TIND_BLOCK &#043; 1)  \/* \u603b\u5757\u6307\u9488\u6570\u91cf *\/<br \/>\n\/\/ \u6ce8\u610f&#xff1a;EXT2_N_BLOCKS \u7684\u503c\u4e3a15 <\/p>\n<ul>\n<li>\u6587\u4ef6\u540d\u5c5e\u6027\u5e76\u672a\u7eb3\u5165\u5230inode\u6570\u636e\u7ed3\u6784\u5185\u90e8\u3002<\/li>\n<li>inode\u7684\u5927\u5c0f\u4e00\u822c\u662f128\u5b57\u8282\u6216\u8005256\u3002<\/li>\n<li>\u4efb\u4f55\u6587\u4ef6\u7684\u5185\u5bb9\u5927\u5c0f\u53ef\u4ee5\u4e0d\u540c&#xff0c;\u4f46\u662f\u5c5e\u6027\u5927\u5c0f\u4e00\u5b9a\u662f\u76f8\u540c\u7684\u3002\u00a0<\/li>\n<\/ul>\n<p>&#034; ls &#034; \u6307\u4ee4\u5e26\u4e0a &#034; -i &#034; \u9009\u9879\u5373\u53ef\u67e5\u770b\u6587\u4ef6\u5bf9\u5e94\u7684inode\u53f7\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"131\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250419004214-6802f1666634d.png\" width=\"753\" \/><\/p>\n<p>\u6240\u4ee5&#xff0c;inode\u7528\u4e8e\u5b58\u50a8\u4e00\u4e2a\u6587\u4ef6\u7684\u5c5e\u6027\u4fe1\u606f&#xff0c;\u800cinode Table\u7531\u4e8e\u540c\u4e00\u7ba1\u7406\u4e00\u4e2a\u5206\u7ec4\u5f53\u4e2d\u7684\u6587\u4ef6\u7684inode\u3002\u00a0<\/p>\n<h6>\u4ece inode \u5230 block<\/h6>\n<p>inode \u4e2d\u5b58\u5728\u80fd\u591f\u627e\u5230\u5176\u5bf9\u5e94\u6570\u636e\u5757\u7684\u5b57\u6bb5&#xff1a;<\/p>\n<p>__le32 i_block[EXT2_N_BLOCKS];\/* \u6307\u5411\u6570\u636e\u5757\u7684\u6307\u9488 *\/<\/p>\n<p>#define EXT2_N_BLOCKS (EXT2_TIND_BLOCK &#043; 1)  \/* \u603b\u5757\u6307\u9488\u6570\u91cf *\/<br \/>\n\/\/ \u6ce8\u610f&#xff1a;EXT2_N_BLOCKS \u7684\u503c\u4e3a15 <\/p>\n<p>\u603b\u517115\u4e2a\u6307\u9488&#xff0c;\u76f4\u89c9\u4e0a\u6765\u8bf4&#xff0c;\u4e00\u4e2a\u6587\u4ef6\u6700\u591a\u5bf9\u5e9415\u4e2a\u6570\u636e\u5757&#xff0c;\u6700\u591a\u53ea\u80fd\u5b58\u50a8 15 * 8 * 512 \u5b57\u8282\u3002<\/p>\n<p>\u4f46\u5f88\u660e\u663e\u8fd9\u6837\u7684\u5bb9\u91cf\u5b8c\u5168\u4e0d\u591f\u67d0\u4e9b\u5927\u6587\u4ef6\u585e\u7259\u7f1d\u7684&#xff0c;\u5982\u4f55\u786e\u4fdd\u6587\u4ef6\u88ab\u5b8c\u5168\u5b58\u653e&#xff1f;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1167\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250419004214-6802f16681873.png\" width=\"1468\" \/><\/p>\n<p>\u5b9e\u9645\u4e0a&#xff0c;<span style=\"background-color:#a2e043\">\u53ea\u6709\u524d12\u4e2a\u6307\u9488\u662f\u4e0e\u6570\u636e\u5757\u4e00\u4e00\u5bf9\u5e94\u7684&#xff0c;\u540e\u9762\u76843\u4e2a\u6307\u9488\u4f9d\u6b21\u4e3a\u4e00\u7ea7\u3001\u4e8c\u7ea7\u3001\u4e09\u7ea7\u95f4\u63a5\u6307\u9488&#xff0c;\u6bcf\u7ea7\u95f4\u63a5\u610f\u5473\u7740\u4e2d\u95f4\u5b58\u5728\u7740\u4e00\u4e2a\u7d22\u5f15\u8868(\u6307\u9488\u6570\u7ec4)\u3002<\/span>\u6839\u636e\u9700\u8981\u6269\u5145\u7d22\u5f15\u8868\u7684\u5185\u5bb9&#xff0c;\u5c31\u53ef\u4ee5\u4e0d\u65ad\u589e\u52a0\u4e00\u4e2a\u6587\u4ef6\u5bf9\u5e94\u7684\u6570\u636e\u5757\u3002<\/p>\n<h4>2.1.3\u00a0inode\u4f4d\u56fe(inode Bitmap)<\/h4>\n<p>inode\u4f4d\u56fe\u7528\u4e8e\u8bb0\u5f55inode Tbale\u4e2d\u54ea\u4e9binode\u7ed3\u70b9\u662f\u6b63\u5728\u88ab\u4f7f\u7528\u7684(\u5b58\u653e\u4e86\u67d0\u4e2a\u6587\u4ef6\u7684\u5c5e\u6027)&#xff0c;\u88ab\u4f7f\u7528\u5219\u5bf9\u5e94\u4f4d\u7f6e1&#xff0c;\u672a\u88ab\u4f7f\u7528\u5219\u5bf9\u5e94\u4f4d\u7f6e0\u3002<\/p>\n<h4>2.1.4\u00a0\u5757\u4f4d\u56fe(Block Bitmap)<\/h4>\n<p>\u540c\u7406&#xff0c;\u5757\u4f4d\u56fe\u7528\u4e8e\u8bb0\u5f55Data Blocks\u4e2d\u54ea\u4e9b\u6570\u636e\u5757\u662f\u6b63\u5728\u88ab\u4f7f\u7528\u7684\u3002<\/p>\n<h4>2.1.5\u00a0\u5feb\u7ec4\u63cf\u8ff0\u7b26(GDT)<\/h4>\n<p>\u5757\u7ec4\u63cf\u8ff0\u7b26\u8868(Group Descriptor Table)&#xff0c;\u63cf\u8ff0\u5757\u7ec4\u5c5e\u6027\u4fe1\u606f&#xff0c;\u6574\u4e2a\u5206\u533a\u5206\u6210\u591a\u4e2a\u5757\u7ec4\u5c31\u5bf9\u5e94\u6709\u591a\u5c11\u4e2a\u5757\u7ec4\u63cf\u8ff0\u7b26\u3002<\/p>\n<p>\u6bcf\u4e2a\u5757\u7ec4\u63cf\u8ff0\u7b26\u5b58\u50a8\u4e00\u4e2a\u5757\u7ec4\u7684\u63cf\u8ff0\u4fe1\u606f&#xff0c;\u5982\u5728\u8fd9\u4e2a\u5757\u7ec4\u4e2d\u4ece\u54ea\u91cc\u5f00\u59cb\u662finode Table&#xff0c;\u4ece\u54ea\u91cc\u5f00\u59cb\u662fData Blocks&#xff0c;\u7a7a\u95f2\u7684inode\u548c\u6570\u636e\u5757\u8fd8\u6709\u591a\u5c11\u4e2a\u7b49\u7b49\u3002<\/p>\n<p>\/\/ \u78c1\u76d8\u7ea7blockgroup\u7684\u6570\u636e\u7ed3\u6784<br \/>\n\/*<br \/>\n* Structure of a blocks group descriptor<br \/>\n*\/<br \/>\nstruct ext2_group_desc<br \/>\n{<br \/>\n    __le32 bg_block_bitmap; \/* Blocks bitmap block *\/<br \/>\n    __le32 bg_inode_bitmap; \/* Inodes bitmap *\/<br \/>\n    __le32 bg_inode_table; \/* Inodes table block*\/<br \/>\n    __le16 bg_free_blocks_count; \/* Free blocks count *\/<br \/>\n    __le16 bg_free_inodes_count; \/* Free inodes count *\/<br \/>\n    __le16 bg_used_dirs_count; \/* Directories count *\/<br \/>\n    __le16 bg_pad;<br \/>\n    __le32 bg_reserved[3];<br \/>\n}; <\/p>\n<h4>2.1.6\u00a0\u8d85\u7ea7\u5757(Super Block)<\/h4>\n<p>\u5b58\u653e\u6587\u4ef6\u7cfb\u7edf\u672c\u8eab\u7684\u7ed3\u6784\u4fe1\u606f&#xff0c;\u63cf\u8ff0\u6574\u4e2a\u5206\u533a\u7684\u6587\u4ef6\u7cfb\u7edf\u4fe1\u606f\u3002<\/p>\n<p>\u8bb0\u5f55\u7684\u4fe1\u606f\u4e3b\u8981\u6709&#xff1a;bolck \u548c inode\u7684\u603b\u91cf&#xff0c;\u672a\u4f7f\u7528\u7684 block \u548c inode \u7684\u6570\u91cf&#xff0c;\u4e00\u4e2a block \u548c inode \u7684\u5927\u5c0f&#xff0c;\u6700\u8fd1\u4e00\u6b21\u6302\u8f7d\u7684\u65f6\u95f4&#xff0c;\u6700\u8fd1\u4e00\u6b21\u5199\u5165\u6570\u636e\u7684\u65f6\u95f4&#xff0c;\u6700\u8fd1\u4e00\u6b21\u68c0\u9a8c\u78c1\u76d8\u7684\u65f6\u95f4\u7b49\u5176\u4ed6\u6587\u4ef6\u7cfb\u7edf\u7684\u76f8\u5173\u4fe1\u606f\u3002<\/p>\n<p><span style=\"background-color:#a2e043\">\u6ce8\u610f&#xff0c;\u6211\u4eec\u8bf4\u7684\u662f\u8d85\u7ea7\u5757\u5b58\u653e\u6587\u4ef6\u7cfb\u7edf\u672c\u8eab(\u5373\u4e00\u4e2a\u5206\u533a)\u7684\u7ed3\u6784\u4fe1\u606f&#xff0c;\u5e76\u4e0d\u662f\u5757\u7ec4\u7684\u7ed3\u6784\u4fe1\u606f&#xff0c;\u56e0\u6b64\u8d85\u7ea7\u5757\u7684\u6570\u636e\u662f\u6781\u5176\u91cd\u8981\u7684\u3002\u8d85\u7ea7\u5757\u7684\u6570\u636e\u88ab\u7834\u574f\u5219\u6574\u4e2a\u6587\u4ef6\u7cfb\u7edf\u7684\u7ed3\u6784\u5c31\u88ab\u7834\u574f\u4e86\u3002<\/span><\/p>\n<p>\u8d85\u7ea7\u5757\u5728\u6bcf\u4e2a\u5757\u7ec4\u7684\u5f00\u5934\u90fd\u6709\u4e00\u4efd\u62f7\u8d1d&#xff08;\u7b2c\u4e00\u4e2a\u5757\u7ec4\u5fc5\u987b\u6709&#xff0c;\u540e\u9762\u7684\u5757\u7ec4\u53ef\u4ee5\u6ca1\u6709&#xff09;\u3002 \u4e3a\u4e86\u4fdd\u8bc1\u6587\u4ef6\u7cfb\u7edf\u5728\u78c1\u76d8\u90e8\u5206\u6247\u533a\u51fa\u73b0\u7269\u7406\u95ee\u9898\u7684\u60c5\u51b5\u4e0b\u8fd8\u80fd\u6b63\u5e38\u5de5\u4f5c&#xff0c;\u5c31\u5fc5\u987b\u4fdd\u8bc1\u6587\u4ef6\u7cfb\u7edf\u7684super block\u4fe1\u606f\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\u4e5f\u80fd\u6b63\u5e38\u8bbf\u95ee\u3002\u6240\u4ee5\u4e00\u4e2a\u6587\u4ef6\u7cfb\u7edf\u7684super block\u4f1a\u5728\u591a\u4e2ablock group\u4e2d\u8fdb\u884c\u5907\u4efd&#xff0c;\u8fd9\u4e9bsuper block\u533a\u57df\u7684\u6570\u636e\u4fdd\u6301\u4e00\u81f4\u3002<\/p>\n<p>\/*<br \/>\n* \u8d85\u7ea7\u5757\u7684\u7ed3\u6784<br \/>\n*\/<br \/>\nstruct ext2_super_block {<br \/>\n    __le32 s_inodes_count; \/* inode\u603b\u6570 *\/<br \/>\n    __le32 s_blocks_count; \/* \u5757\u603b\u6570 *\/<br \/>\n    __le32 s_r_blocks_count; \/* \u4fdd\u7559\u5757\u6570 *\/<br \/>\n    __le32 s_free_blocks_count; \/* \u7a7a\u95f2\u5757\u6570 *\/<br \/>\n    __le32 s_free_inodes_count; \/* \u7a7a\u95f2inode\u6570 *\/<br \/>\n    __le32 s_first_data_block; \/* \u7b2c\u4e00\u4e2a\u6570\u636e\u5757\u4f4d\u7f6e *\/<br \/>\n    __le32 s_log_block_size; \/* \u5757\u5927\u5c0f&#xff08;\u5bf9\u6570\u5f62\u5f0f&#xff09; *\/<br \/>\n    __le32 s_log_frag_size; \/* \u7247\u6bb5\u5927\u5c0f&#xff08;\u5bf9\u6570\u5f62\u5f0f&#xff09; *\/<br \/>\n    __le32 s_blocks_per_group; \/* \u6bcf\u4e2a\u7ec4\u7684\u5757\u6570 *\/<br \/>\n    __le32 s_frags_per_group; \/* \u6bcf\u4e2a\u7ec4\u7684\u7247\u6bb5\u6570 *\/<br \/>\n    __le32 s_inodes_per_group; \/* \u6bcf\u4e2a\u7ec4\u7684inode\u6570 *\/<br \/>\n    __le32 s_mtime; \/* \u6302\u8f7d\u65f6\u95f4 *\/<br \/>\n    __le32 s_wtime; \/* \u5199\u5165\u65f6\u95f4 *\/<br \/>\n    __le16 s_mnt_count; \/* \u6302\u8f7d\u6b21\u6570 *\/<br \/>\n    __le16 s_max_mnt_count; \/* \u6700\u5927\u6302\u8f7d\u6b21\u6570 *\/<br \/>\n    __le16 s_magic; \/* \u9b54\u6570\u7b7e\u540d&#xff08;\u6807\u8bc6\u6587\u4ef6\u7cfb\u7edf\u7c7b\u578b&#xff09; *\/<br \/>\n    __le16 s_state; \/* \u6587\u4ef6\u7cfb\u7edf\u72b6\u6001 *\/<br \/>\n    __le16 s_errors; \/* \u9519\u8bef\u68c0\u6d4b\u65f6\u7684\u884c\u4e3a *\/<br \/>\n    __le16 s_minor_rev_level; \/* \u6b21\u4fee\u8ba2\u7248\u672c\u53f7 *\/<br \/>\n    __le32 s_lastcheck; \/* \u6700\u540e\u68c0\u67e5\u65f6\u95f4 *\/<br \/>\n    __le32 s_checkinterval; \/* \u4e24\u6b21\u68c0\u67e5\u7684\u6700\u5927\u95f4\u9694\u65f6\u95f4 *\/<br \/>\n    __le32 s_creator_os; \/* \u521b\u5efa\u64cd\u4f5c\u7cfb\u7edf *\/<br \/>\n    __le32 s_rev_level; \/* \u4e3b\u4fee\u8ba2\u7248\u672c\u53f7 *\/<br \/>\n    __le16 s_def_resuid; \/* \u4fdd\u7559\u5757\u7684\u9ed8\u8ba4\u7528\u6237ID *\/<br \/>\n    __le16 s_def_resgid; \/* \u4fdd\u7559\u5757\u7684\u9ed8\u8ba4\u7ec4ID *\/<br \/>\n    \/*<br \/>\n    * \u4ee5\u4e0b\u5b57\u6bb5\u4ec5\u9002\u7528\u4e8eEXT2_DYNAMIC_REV\u7248\u672c\u7684\u8d85\u7ea7\u5757<br \/>\n    *<br \/>\n    * \u6ce8\u610f&#xff1a;\u517c\u5bb9\u7279\u6027\u96c6\u4e0e\u4e0d\u517c\u5bb9\u7279\u6027\u96c6\u7684\u533a\u522b\u5728\u4e8e&#xff1a;<br \/>\n    * \u5982\u679c\u5185\u6838\u65e0\u6cd5\u8bc6\u522b\u4e0d\u517c\u5bb9\u7279\u6027\u96c6\u4e2d\u8bbe\u7f6e\u7684\u67d0\u4e2a\u7279\u6027\u4f4d&#xff0c;<br \/>\n    * \u5219\u5e94\u62d2\u7edd\u6302\u8f7d\u8be5\u6587\u4ef6\u7cfb\u7edf\u3002<br \/>\n    *<br \/>\n    * e2fsck\u7684\u8981\u6c42\u66f4\u4e3a\u4e25\u683c&#xff1a;\u5982\u679c\u5b83\u65e0\u6cd5\u8bc6\u522b\u517c\u5bb9\u7279\u6027\u96c6<br \/>\n    * \u6216\u4e0d\u517c\u5bb9\u7279\u6027\u96c6\u4e2d\u7684\u4efb\u4f55\u7279\u6027&#xff0c;\u5fc5\u987b\u7ec8\u6b62\u64cd\u4f5c&#xff0c;<br \/>\n    * \u4e0d\u4f1a\u5c1d\u8bd5\u4fee\u6539\u5176\u4e0d\u7406\u89e3\u7684\u5185\u5bb9&#8230;<br \/>\n    *\/<br \/>\n    __le32 s_first_ino; \/* \u7b2c\u4e00\u4e2a\u975e\u4fdd\u7559inode\u7f16\u53f7 *\/<br \/>\n    __le16 s_inode_size; \/* inode\u7ed3\u6784\u5927\u5c0f *\/<br \/>\n    __le16 s_block_group_nr; \/* \u672c\u8d85\u7ea7\u5757\u6240\u5728\u7684\u5757\u7ec4\u53f7 *\/<br \/>\n    __le32 s_feature_compat; \/* \u517c\u5bb9\u7279\u6027\u96c6 *\/<br \/>\n    __le32 s_feature_incompat; \/* \u4e0d\u517c\u5bb9\u7279\u6027\u96c6 *\/<br \/>\n    __le32 s_feature_ro_compat; \/* \u53ea\u8bfb\u517c\u5bb9\u7279\u6027\u96c6 *\/<br \/>\n    __u8 s_uuid[16]; \/* 128\u4f4d\u5377UUID *\/<br \/>\n    char s_volume_name[16]; \/* \u5377\u540d\u79f0 *\/<br \/>\n    char s_last_mounted[64]; \/* \u6700\u540e\u6302\u8f7d\u76ee\u5f55\u8def\u5f84 *\/<br \/>\n    __le32 s_algorithm_usage_bitmap; \/* \u538b\u7f29\u7b97\u6cd5\u4f4d\u56fe *\/<br \/>\n    \/*<br \/>\n    * \u6027\u80fd\u63d0\u793a&#xff1a;\u4ec5\u5f53EXT2_COMPAT_PREALLOC\u6807\u5fd7\u542f\u7528\u65f6&#xff0c;<br \/>\n    * \u76ee\u5f55\u9884\u5206\u914d\u529f\u80fd\u624d\u4f1a\u751f\u6548<br \/>\n    *\/<br \/>\n    __u8 s_prealloc_blocks; \/* \u5c1d\u8bd5\u9884\u5206\u914d\u7684\u5757\u6570 *\/<br \/>\n    __u8 s_prealloc_dir_blocks; \/* \u4e3a\u76ee\u5f55\u9884\u5206\u914d\u7684\u5757\u6570 *\/<br \/>\n    __u16 s_padding1;<br \/>\n    \/*<br \/>\n    * \u65e5\u5fd7\u652f\u6301&#xff08;\u5f53\u8bbe\u7f6eEXT3_FEATURE_COMPAT_HAS_JOURNAL\u65f6\u6709\u6548&#xff09;<br \/>\n    *\/<br \/>\n    __u8 s_journal_uuid[16]; \/* \u65e5\u5fd7\u8d85\u7ea7\u5757\u7684UUID *\/<br \/>\n    __u32 s_journal_inum; \/* \u65e5\u5fd7\u6587\u4ef6\u7684inode\u7f16\u53f7 *\/<br \/>\n    __u32 s_journal_dev; \/* \u65e5\u5fd7\u6587\u4ef6\u7684\u8bbe\u5907\u53f7 *\/<br \/>\n    __u32 s_last_orphan; \/* \u5f85\u5220\u9664inode\u94fe\u8868\u7684\u8d77\u59cb\u4f4d\u7f6e *\/<br \/>\n    __u32 s_hash_seed[4]; \/* HTREE\u54c8\u5e0c\u79cd\u5b50 *\/<br \/>\n    __u8 s_def_hash_version; \/* \u9ed8\u8ba4\u4f7f\u7528\u7684\u54c8\u5e0c\u7248\u672c *\/<br \/>\n    __u8 s_reserved_char_pad;<br \/>\n    __u16 s_reserved_word_pad;<br \/>\n    __le32 s_default_mount_opts; \/* \u9ed8\u8ba4\u6302\u8f7d\u9009\u9879 *\/<br \/>\n    __le32 s_first_meta_bg; \/* \u7b2c\u4e00\u4e2a\u5143\u5757\u7ec4 *\/<br \/>\n    __u32 s_reserved[190]; \/* \u586b\u5145\u81f3\u5757\u672b\u5c3e *\/<br \/>\n}; <\/p>\n<h4>\u00a02.1.7\u00a0\u603b\u7ed3<\/h4>\n<p>\u4ece\u8fd9\u90e8\u5206\u6211\u4eec\u53ef\u4ee5\u770b\u51fa\u4e3a\u4ec0\u4e48 \u6570\u636e\u5199\u5165\u5f88\u6162&#xff0c;\u800c\u5220\u9664\u5374\u5f88\u5feb\u3002\u56e0\u4e3a\u5220\u9664\u6570\u636e\u53ea\u9700\u8981\u4fee\u6539\u5bf9\u5e94\u7684\u6807\u5fd7\u4fe1\u606f\u7f6e\u5373\u53ef&#xff08;\u5982\u5c06inode Bitmap \u548c Block Bitmap\u5bf9\u5e94\u4f4d\u7f6e\u4e3a0&#xff09;\u3002<\/p>\n<p>\u7531\u6b64\u6211\u4eec\u53c8\u80fd\u5927\u6982\u731c\u5230\u56de\u6536\u7ad9\u6216\u6570\u636e\u6062\u590d\u6280\u672f\u7684\u539f\u7406\u4e86&#xff0c;\u53ea\u8981\u8d76\u5728\u6570\u636e\u88ab\u8986\u76d6\u4e4b\u524d&#xff0c;\u627e\u5230\u88ab\u5220\u9664\u6570\u636e\u5bf9\u5e94\u7684\u539finode\u548c\u6570\u636e\u5757\u5373\u53ef\u6062\u590d\u3002\u4f46\u5982\u679c\u65b0\u7684\u6570\u636e\u88ab\u5199\u5165\u5230\u4e86\u8fd9\u4e9b\u5b58\u50a8\u7a7a\u95f4\u90a3\u5c31\u65e0\u80fd\u4e3a\u529b\u4e86\u3002<\/p>\n<p>\u6240\u4ee5&#xff0c;\u5f53\u91cd\u8981\u7684\u6570\u636e\u88ab\u8bef\u5220\u65f6&#xff0c;\u5c3d\u53ef\u80fd\u4ec0\u4e48\u90fd\u4e0d\u505a&#xff0c;\u8d76\u5728\u6570\u636e\u88ab\u8986\u76d6\u4e4b\u524d\u4ea4\u7531\u4e13\u4e1a\u4eba\u58eb\u8fdb\u884c\u6062\u590d\u3002<\/p>\n<p>\u6240\u8c13\u7684\u683c\u5f0f\u5316&#xff0c;\u5176\u5b9e\u5c31\u662f\u5bf9\u5206\u533a\u8fdb\u884c\u5206\u7ec4&#xff0c;\u5728\u6bcf\u4e2a\u5206\u7ec4\u4e2d\u5199\u5165SB\u3001GDT\u3001Block Bitmap\u3001Inode Bitmap\u7b49\u7ba1\u7406\u4fe1\u606f&#xff0c;\u8fd9\u4e9b\u7ba1\u7406\u4fe1\u606f\u7edf\u79f0&#xff1a;\u6587\u4ef6\u7cfb\u7edf\u3002<\/p>\n<h3>2.2 \u76ee\u5f55<\/h3>\n<h4>2.2.1 \u95ee\u9898\u63d0\u51fa<\/h4>\n<li>\u6587\u4ef6\u540d\u88ab\u5b58\u653e\u5728\u54ea\u91cc\u5462&#xff1f; \u524d\u9762\u6211\u4eec\u63d0\u5230\u8fc7&#xff0c;inode\u7684\u5927\u5c0f\u662f\u56fa\u5b9a\u7684(\u5373\u6587\u4ef6\u5c5e\u6027\u4fe1\u606f\u7684\u5927\u5c0f\u662f\u56fa\u5b9a\u7684)&#xff0c;\u8fd9\u4e3b\u8981\u662f\u4e3a\u4e86\u65b9\u4fbf\u6839\u636einode\u8282\u70b9\u53f7\u6765\u67e5\u627einode\u3002\u4f46\u662f\u8fd9\u4f1a\u5e26\u6765\u4e00\u4e2a\u95ee\u9898&#xff1a;\u6587\u4ef6\u7684\u540d\u79f0\u4e0d\u80fd\u5b58\u50a8\u5728inode\u4e2d(\u5728\u524d\u6587\u4ee3\u7801\u4e2d\u4e5f\u6709\u4f53\u73b0&#xff0c;\u56e0\u4e3a\u540d\u79f0\u5927\u5c0f\u968f\u957f\u5ea6\u800c\u53d8\u5316)\u3002<\/li>\n<li>\u6587\u4ef6\u540d\u4e0einode\u7684\u8054\u7cfb&#xff1f; \u6211\u4eec\u5df2\u7ecf\u77e5\u9053&#xff0c;\u6839\u636einode\u53f7\u53ef\u4ee5\u5728\u4e00\u4e2a\u5206\u533a\u5f53\u4e2d\u51c6\u786e\u7684\u627e\u5230\u4e00\u4e2a\u6587\u4ef6\u7684\u5c5e\u6027\u548c\u6570\u636e&#xff0c;\u4f46\u662f\u6211\u4eec\u4ece\u672a\u5173\u5fc3\u8fc7\u4e00\u4e2a\u6587\u4ef6\u7684inode\u53f7&#xff0c;\u6211\u4eec\u4f7f\u7528\u7684\u4e00\u76f4\u662f&#034;\u8def\u5f84&#043;\u6587\u4ef6\u540d&#034;\u7684\u65b9\u5f0f\u5bf9\u6587\u4ef6\u8fdb\u884c\u8bbf\u95ee\u3001\u64cd\u4f5c\u3002\u4e5f\u5c31\u662f\u8bf4&#xff0c;\u6587\u4ef6\u540d\u4e0einode\u4e4b\u95f4\u4e00\u5b9a\u5efa\u7acb\u4e86\u67d0\u79cd\u6620\u5c04\u5173\u7cfb\u3002<\/li>\n<li>\u76ee\u5f55\u6587\u4ef6\u7684\u5185\u5bb9&#xff1f; \u76ee\u5f55\u6587\u4ef6\u4e5f\u662f\u6587\u4ef6&#xff0c;\u5b83\u7684\u5185\u5bb9\u662f\u4ec0\u4e48&#xff1f;<\/li>\n<p>\u5b9e\u9645\u4e0a&#xff0c;\u8fd9\u4e09\u4e2a\u95ee\u9898\u5b58\u5728\u7740\u672c\u8d28\u7684\u8054\u7cfb\u3002<\/p>\n<h4>2.2.2 \u76ee\u5f55\u6587\u4ef6\u7684\u5185\u5bb9<\/h4>\n<p><span style=\"background-color:#a2e043\">\u76ee\u5f55\u6587\u4ef6\u5b58\u653e\u7684\u5b9e\u9645\u4e0a\u662f\u8be5\u76ee\u5f55\u4e0b &#034;\u6587\u4ef6\u540d\u00a0&#8211; indoe\u53f7&#034; \u7684\u6620\u5c04\u5173\u7cfb\u3002<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"882\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250419004215-6802f167149b9.png\" width=\"1427\" \/><\/p>\n<p>\u5f53\u6211\u4eec\u901a\u8fc7\u6587\u4ef6\u540d\u8bbf\u95ee\u4e00\u4e2a\u6587\u4ef6\u65f6&#xff0c;OS \u4f1a\u5728\u4e0a\u7ea7\u76ee\u5f55\u4e2d\u7684\u6587\u4ef6\u5185\u5bb9\u4e2d\u67e5\u627e\u8be5\u6587\u4ef6\u540d\u5bf9\u5e94\u7684inode\u53f7\u3002\u4f46\u662f&#xff0c;OS \u5982\u4f55\u77e5\u9053\u4e00\u4e2a\u6587\u4ef6\u540d\u5bf9\u5e94\u7684\u6587\u4ef6\u5728\u54ea\u4e2a\u76ee\u5f55\u4e0b\u5462&#xff1f;<\/p>\n<h6>2.2.2.1\u00a0\u8def\u5f84\u89e3\u6790<\/h6>\n<p>\u4ece\u4e0a\u9762\u7684\u5206\u6790\u53ef\u4ee5\u770b\u51fa&#xff0c;\u6211\u4eec\u8bbf\u95ee\u6587\u4ef6\u662f\u4e00\u5b9a\u8981\u6709\u8def\u5f84\u7684&#xff0c;\u7ed9\u51fa\u8def\u5f84\u7684\u65b9\u5f0f\u6709\u4e24\u79cd&#xff1a;<\/p>\n<ul>\n<li>\u7edd\u5bf9\u8def\u5f84&#xff1a;\u7528\u6237\u663e\u5f0f\u7ed9\u51fa\u4ece\u6839\u76ee\u5f55\u5230\u76ee\u6807\u6587\u4ef6\u7684\u8def\u5f84\u3002<\/li>\n<li>\u76f8\u5bf9\u8def\u5f84&#xff1a;\u8fdb\u7a0b\u7684CWD\u00a0&#043; \u7528\u6237\u4ee5\u5f53\u524d\u76ee\u5f55\u4e3a\u8d77\u70b9\u7ed9\u51fa\u5230\u76ee\u6807\u6587\u4ef6\u7684\u8def\u5f84\u3002<\/li>\n<\/ul>\n<p>\u5728\u83b7\u5f97\u76ee\u6807\u6587\u4ef6\u7684\u7edd\u5bf9\u8def\u5f84\u4e4b\u540e&#xff0c;OS \u4ece\u6839\u76ee\u5f55\u5f00\u59cb\u5c06\u8def\u5f84\u4e2d\u7684\u76ee\u5f55\u4e00\u7ea7\u4e00\u7ea7\u5730\u5c55\u5f00&#xff0c;\u76f4\u5230\u5728\u76ee\u6807\u6587\u4ef6\u7684\u4e0a\u4e00\u7ea7\u76ee\u5f55\u6587\u4ef6\u4e2d\u627e\u5230\u76ee\u6807\u6587\u4ef6\u7684inode\u3002<\/p>\n<p>\u5f53\u7136&#xff0c;\u6839\u76ee\u5f55\u62e5\u6709\u56fa\u5b9a\u7684\u6587\u4ef6\u540d\u548c inode\u53f7&#xff0c;\u65e0\u9700\u67e5\u627e&#xff0c;\u7cfb\u7edf\u5f00\u673a\u4e4b\u540e\u5c31\u5fc5\u987b\u77e5\u9053\u3002<\/p>\n<h6>2.2.2.2 \u8def\u5f84\u7f13\u5b58<\/h6>\n<p>\u6bcf\u6b21\u8bbf\u95ee\u6587\u4ef6\u90fd\u4ece\u6839\u76ee\u5f55\u5f00\u59cb\u5c06\u76ee\u5f55\u9010\u7ea7\u5c55\u5f00\u672a\u514d\u592a\u8fc7\u9ebb\u70e6\u3002\u5b9e\u9645\u4e0a&#xff0c;OS \u4f1a\u5c06\u672c\u6b21\u5f00\u673a\u66fe\u6253\u5f00\u8fc7\u7684\u6587\u4ef6\u548c\u76ee\u5f55\u7ef4\u62a4\u5230\u8def\u5f84\u7f13\u5b58\u4e2d\u3002\u8fd9\u4e2a\u8def\u5f84\u7f13\u5b58\u662f\u5185\u5b58\u7ea7\u7684\u4e00\u4e2a\u6811\u72b6\u7ed3\u6784\u3002<\/p>\n<p>Linux\u5185\u6838\u4e2d\u7ef4\u62a4\u6811\u72b6\u8def\u5f84\u7ed3\u6784\u7684\u5185\u6838\u7ed3\u6784\u4f53\u53eb\u505a struct dentry&#xff1a;<\/p>\n<p>struct dentry {<br \/>\n    atomic_t d_count;        \/* \u5f15\u7528\u8ba1\u6570\u5668 *\/<br \/>\n    unsigned int d_flags;    \/* \u7531d_lock\u4fdd\u62a4\u7684\u6807\u5fd7\u4f4d *\/<br \/>\n    spinlock_t d_lock;       \/* \u6bcf\u4e2adentry\u72ec\u7acb\u7684\u81ea\u65cb\u9501 *\/<br \/>\n    struct inode* d_inode;   \/* \u5173\u8054\u7684inode\u6307\u9488&#xff08;NULL\u8868\u793a\u8d1f\u5411\u6761\u76ee&#xff09; *\/<\/p>\n<p>    \/*<br \/>\n    * \u4ee5\u4e0b\u4e09\u4e2a\u5b57\u6bb5\u4f1a\u88ab__d_lookup\u8bbf\u95ee&#xff0c;\u5c06\u5b83\u4eec\u653e\u5728\u540c\u4e00\u7f13\u5b58\u884c<br \/>\n    *\/<br \/>\n    struct hlist_node d_hash;  \/* \u67e5\u627e\u54c8\u5e0c\u94fe\u8868\u8282\u70b9 *\/<br \/>\n    struct dentry * d_parent;  \/* \u7236\u76ee\u5f55dentry\u6307\u9488 *\/<br \/>\n    struct qstr d_name;        \/* \u76ee\u5f55\u9879\u540d\u79f0\u7ed3\u6784\u4f53 *\/<\/p>\n<p>    struct list_head d_lru;    \/* LRU\u56de\u6536\u94fe\u8868 *\/<\/p>\n<p>    \/*<br \/>\n    * d_child\u548cd_rcu\u5171\u4eab\u5185\u5b58\u7a7a\u95f4<br \/>\n    *\/<br \/>\n    union {<br \/>\n        struct list_head d_child;  \/* \u7236\u76ee\u5f55\u7684\u5b50\u6761\u76ee\u94fe\u8868 *\/<br \/>\n        struct rcu_head d_rcu;     \/* RCU\u56de\u8c03\u7ed3\u6784\u4f53 *\/<br \/>\n    } d_u;<\/p>\n<p>    struct list_head d_subdirs;  \/* \u5f53\u524d\u76ee\u5f55\u7684\u5b50\u6761\u76ee\u94fe\u8868 *\/<br \/>\n    struct list_head d_alias;    \/* inode\u522b\u540d\u94fe\u8868 *\/<br \/>\n    unsigned long d_time;        \/* \u7528\u4e8ed_revalidate\u7684\u65f6\u95f4\u6233 *\/<br \/>\n    struct dentry_operations* d_op;  \/* dentry\u64cd\u4f5c\u51fd\u6570\u8868 *\/<br \/>\n    struct super_block* d_sb;     \/* \u6240\u5c5e\u7684\u8d85\u7ea7\u5757\u6307\u9488 *\/<br \/>\n    void* d_fsdata;               \/* \u6587\u4ef6\u7cfb\u7edf\u79c1\u6709\u6570\u636e *\/<\/p>\n<p>#ifdef CONFIG_PROFILING<br \/>\n    struct dcookie_struct* d_cookie; \/* \u8c03\u8bd5\u7528\u7684cookie\u6307\u9488&#xff08;\u5982\u679c\u542f\u7528\u6027\u80fd\u5206\u6790&#xff09; *\/<br \/>\n#endif<\/p>\n<p>    int d_mounted;                \/* \u6302\u8f7d\u70b9\u6807\u8bb0 *\/<br \/>\n    unsigned char d_iname[DNAME_INLINE_LEN_MIN]; \/* \u77ed\u6587\u4ef6\u540d\u5185\u8054\u5b58\u50a8 *\/<br \/>\n}; <\/p>\n<p>\u5f53\u7136&#xff0c;\u5185\u5b58\u8d44\u6e90\u662f\u5341\u5206\u73cd\u8d35\u7684&#xff0c;\u8fd9\u9897\u6811\u4e0d\u80fd\u5728\u5185\u5b58\u4e2d\u65e0\u9650\u751f\u957f&#xff0c;\u4ed6\u53ea\u4f1a\u7ef4\u62a4\u6700\u8fd1\u6700\u5c11\u4f7f\u7528\u7684\u6570\u636e&#xff0c;\u957f\u65f6\u95f4\u672a\u88ab\u8bbf\u95ee\u7684\u76ee\u5f55\u6216\u6587\u4ef6\u4f1a\u88ab\u5254\u9664\u3002<\/p>\n<p>\u5728\u4f7f\u7528\u64cd\u4f5c\u7cfb\u7edf\u7684\u8fc7\u7a0b\u4e2d&#xff0c;\u6211\u4eec\u4f1a\u53d1\u73b0\u5f53\u6211\u4eec\u9996\u6b21\u5c55\u5f00\u5927\u91cf\u6587\u4ef6\u76ee\u5f55&#xff08;\u5982\u4f7f\u7528find\u7b49\u6307\u4ee4\u65f6&#xff09;\u65f6\u4f1a\u6709\u8089\u773c\u53ef\u89c1\u7684\u5ef6\u8fdf&#xff0c;\u4f46\u662f\u4e4b\u540e\u518d\u6b21\u6267\u884c\u65f6\u901f\u5ea6\u5c31\u4f1a\u53d8\u5f97\u5341\u5206\u8fc5\u901f\u3002<\/p>\n<h6>2.2.2.3 opendir \u548c readdir<\/h6>\n<p>opendir\u548creaddir\u51fd\u6570\u662fLinux\u64cd\u4f5c\u7cfb\u7edf\u7684\u4e24\u4e2a\u7cfb\u7edf\u8c03\u7528&#xff0c;\u7528\u4e8e\u76ee\u5f55\u64cd\u4f5c\u3002<\/p>\n<p>opendir\u51fd\u6570<\/p>\n<ul>\n<li>\u529f\u80fd&#xff1a;\u6253\u5f00\u4e00\u4e2a\u76ee\u5f55\u5e76\u8fd4\u56de\u4e00\u4e2a\u6307\u5411\u8be5\u76ee\u5f55\u7684DIR*\u7c7b\u578b\u7684\u6307\u9488&#xff0c;\u8be5\u6307\u9488\u53ef\u7528\u4e8e\u540e\u7eed\u7684\u76ee\u5f55\u8bfb\u53d6\u64cd\u4f5c\u3002<\/li>\n<li>\u539f\u578b&#xff1a;DIR *opendir(const char *name);<\/li>\n<li>\u53c2\u6570&#xff1a;name\u662f\u8981\u6253\u5f00\u7684\u76ee\u5f55\u7684\u8def\u5f84\u540d\u3002<\/li>\n<li>\u8fd4\u56de\u503c&#xff1a;\u6210\u529f\u65f6\u8fd4\u56de\u4e00\u4e2aDIR*\u7c7b\u578b\u7684\u6307\u9488&#xff0c;\u6307\u5411\u6253\u5f00\u7684\u76ee\u5f55\u6d41&#xff1b;\u5931\u8d25\u65f6\u8fd4\u56deNULL\u3002<\/li>\n<\/ul>\n<p>readdir\u51fd\u6570<\/p>\n<ul>\n<li>\u529f\u80fd&#xff1a;\u8bfb\u53d6\u76ee\u5f55\u6d41\u4e2d\u7684\u4e0b\u4e00\u4e2a\u76ee\u5f55\u9879&#xff0c;\u5e76\u8fd4\u56de\u4e00\u4e2a\u6307\u5411struct dirent\u7c7b\u578b\u7684\u6307\u9488&#xff0c;\u8be5\u7ed3\u6784\u4f53\u5305\u542b\u4e86\u76ee\u5f55\u9879\u7684\u76f8\u5173\u4fe1\u606f\u3002<\/li>\n<li>\u539f\u578b&#xff1a;struct dirent *readdir(DIR *dir);<\/li>\n<li>\u53c2\u6570&#xff1a;dir\u662f\u7531opendir\u51fd\u6570\u8fd4\u56de\u7684\u76ee\u5f55\u6d41\u6307\u9488\u3002<\/li>\n<li>\u8fd4\u56de\u503c&#xff1a;\u6210\u529f\u65f6\u8fd4\u56de\u4e00\u4e2astruct dirent*\u7c7b\u578b\u7684\u6307\u9488&#xff0c;\u6307\u5411\u76ee\u5f55\u6d41\u4e2d\u7684\u4e0b\u4e00\u4e2a\u76ee\u5f55\u9879&#xff1b;\u5230\u8fbe\u76ee\u5f55\u672b\u5c3e\u6216\u51fa\u9519\u65f6\u8fd4\u56deNULL\u3002<\/li>\n<\/ul>\n<p>#include &lt;stdio.h&gt;<br \/>\n#include &lt;string.h&gt;<br \/>\n#include &lt;stdlib.h&gt;<br \/>\n#include &lt;dirent.h&gt;<br \/>\n#include &lt;sys\/types.h&gt;<br \/>\n#include &lt;unistd.h&gt;<\/p>\n<p>int main(int argc, char* argv[]) {<br \/>\n    if (argc !&#061; 2) {<br \/>\n        fprintf(stderr, &#034;Usage: %s &lt;directory&gt;\\\\n&#034;, argv[0]);<br \/>\n        exit(EXIT_FAILURE);<br \/>\n    } <\/p>\n<p>    DIR* dir &#061; opendir(argv[1]); \/\/ \u7cfb\u7edf\u8c03\u2f64&#xff0c;\u2f83\u2f8f\u67e5\u9605<br \/>\n    if (!dir) {<br \/>\n        perror(&#034;opendir&#034;);<br \/>\n        exit(EXIT_FAILURE);<br \/>\n    } <\/p>\n<p>    struct dirent* entry;<br \/>\n    while ((entry &#061; readdir(dir)) !&#061; NULL) { \/\/ \u7cfb\u7edf\u8c03\u2f64&#xff0c;\u2f83\u2f8f\u67e5\u9605<br \/>\n        \/\/ Skip the &#034;.&#034; and &#034;..&#034; directory entries<br \/>\n        if (strcmp(entry-&gt;d_name, &#034;.&#034;) &#061;&#061; 0 || strcmp(entry-&gt;d_name, &#034;..&#034;)<br \/>\n            &#061;&#061; 0) {<br \/>\n            continue;<br \/>\n        }<br \/>\n        printf(&#034;Filename: %s, Inode: %lu\\\\n&#034;, entry-&gt;d_name, (unsigned long)entry-&gt;d_ino);<br \/>\n    } <\/p>\n<p>    closedir(dir);<br \/>\n    return 0;<br \/>\n} <\/p>\n<p>\u6ce8\u610f\u4e8b\u9879<\/p>\n<ul>\n<li>\u904d\u5386\u76ee\u5f55\u65f6&#xff0c;\u901a\u5e38\u9700\u8981\u5ffd\u7565.\u548c..\u8fd9\u4e24\u4e2a\u7279\u6b8a\u7684\u76ee\u5f55\u9879&#xff0c;\u4ee5\u907f\u514d\u65e0\u9650\u5faa\u73af\u3002<\/li>\n<li>\u5f53readdir\u51fd\u6570\u8fd4\u56deNULL\u65f6&#xff0c;\u53ef\u80fd\u662f\u5230\u8fbe\u76ee\u5f55\u672b\u5c3e&#xff0c;\u4e5f\u53ef\u80fd\u662f\u53d1\u751f\u4e86\u9519\u8bef&#xff0c;\u9700\u8981\u6839\u636eerrno\u7684\u503c\u6765\u5224\u65ad\u5177\u4f53\u60c5\u51b5\u3002<\/li>\n<\/ul>\n<h3>\u00a02.3 \u6302\u8f7d\u5206\u533a<\/h3>\n<p>\u6211\u4eec\u524d\u9762\u63d0\u5230\u8fc7&#xff0c;inode\u7684\u7f16\u53f7\u662f\u4e0d\u80fd\u8de8\u5206\u533a\u7684&#xff0c;\u8fd9\u610f\u5473\u7740\u5728\u4e0d\u540c\u7684\u5206\u533a\u53ef\u80fd\u6709\u76f8\u540c\u7684inode\u53f7&#xff0c;OS \u5982\u4f55\u77e5\u9053\u8be5\u53bb\u54ea\u4e2a\u5206\u533a\u8fdb\u884c\u67e5\u627e\u5462&#xff1f;<\/p>\n<h4>2.3.1 \u6302\u8f7d\u70b9<\/h4>\n<li>\n<p>\u6302\u8f7d\u70b9\u7ed1\u5b9a&#xff1a; \u5f53\u7528\u6237\u8bbf\u95ee\u6587\u4ef6\u8def\u5f84&#xff08;\u5982\/home\/user\/file&#xff09;\u65f6&#xff0c;\u7cfb\u7edf\u901a\u8fc7\u8def\u5f84\u89e3\u6790\u9010\u7ea7\u786e\u5b9a\u6587\u4ef6\u6240\u5728\u7684\u5206\u533a\u3002\u4f8b\u5982&#xff0c;\u82e5\/home\u662f\u72ec\u7acb\u5206\u533a&#xff08;\u5982\u6302\u8f7d\u5230\/dev\/sdb1&#xff09;&#xff0c;\u5219\u8bbf\u95ee\/home\/user\/file\u65f6&#xff0c;\u7cfb\u7edf\u4f1a\u76f4\u63a5\u64cd\u4f5c\/dev\/sdb1\u5206\u533a\u4e0b\u7684\u6587\u4ef6\u7cfb\u7edf&#xff0c;\u65e0\u9700\u8de8\u5206\u533a\u67e5\u627e\u3002<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1102\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250419004215-6802f167a4974.png\" width=\"1602\" \/><\/p>\n<\/li>\n<li>\n<p>\u5206\u533a\u5143\u6570\u636e\u9694\u79bb&#xff1a; \u6bcf\u4e2a\u5206\u533a\u7ef4\u62a4\u72ec\u7acb\u7684\u6587\u4ef6\u7cfb\u7edf\u7ed3\u6784&#xff08;\u5982\u8d85\u7ea7\u5757\u3001inode\u8868&#xff09;\u3002\u5373\u4f7f\u4e0d\u540c\u5206\u533a\u7684inode\u53f7\u76f8\u540c&#xff0c;\u7cfb\u7edf\u901a\u8fc7\u5206\u533a\u6302\u8f7d\u4fe1\u606f\u5c06\u67e5\u627e\u8303\u56f4\u9650\u5b9a\u5728\u5f53\u524d\u5206\u533a\u7684\u5143\u6570\u636e\u4e2d&#xff0c;\u907f\u514d\u6df7\u6dc6\u3002<\/p>\n<\/li>\n<h4>2.3.2 \u5173\u952e\u6570\u636e\u7ed3\u6784\u652f\u6491<\/h4>\n<ul>\n<li>\n<p>\u76ee\u5f55\u9879&#xff08;dentry&#xff09;&#xff1a; \u76ee\u5f55\u6587\u4ef6\u4e2d\u5b58\u50a8\u7684\u5e76\u975e\u5355\u7eaf\u7684\u6587\u4ef6\u540d\u2192inode\u6620\u5c04&#xff0c;\u800c\u662f\u9690\u542b\u4e86\u5206\u533a\u4e0a\u4e0b\u6587\u3002\u4f8b\u5982&#xff0c;\u5f53\u8bbf\u95ee\/var\/log\u65f6&#xff0c;\u82e5\/var\u662f\u72ec\u7acb\u5206\u533a&#xff0c;\u7cfb\u7edf\u4f1a\u76f4\u63a5\u8bfb\u53d6\u8be5\u5206\u533a\u7684inode\u8868&#xff0c;\u65e0\u9700\u5173\u6ce8\u5176\u4ed6\u5206\u533a\u3002<\/p>\n<\/li>\n<li>\n<p>\u865a\u62df\u6587\u4ef6\u7cfb\u7edf&#xff08;VFS&#xff09;\u62bd\u8c61&#xff1a; VFS\u5c42\u901a\u8fc7struct super_block\u8bb0\u5f55\u6bcf\u4e2a\u5206\u533a\u7684\u6302\u8f7d\u4fe1\u606f&#xff0c;\u5f53\u8fdb\u7a0b\u8bbf\u95ee\u6587\u4ef6\u65f6&#xff0c;\u5185\u6838\u901a\u8fc7\u8def\u5f84\u89e3\u6790\u786e\u5b9a\u76ee\u6807\u6587\u4ef6\u6240\u5728\u7684super_block&#xff0c;\u4ece\u800c\u9501\u5b9a\u5bf9\u5e94\u7684\u5206\u533a\u548cinode\u8868\u3002<\/p>\n<\/li>\n<\/ul>\n<h4>2.3.3 \u603b\u7ed3<\/h4>\n<p>\u64cd\u4f5c\u7cfb\u7edf\u901a\u8fc7\u8def\u5f84\u89e3\u6790\u2192\u6302\u8f7d\u70b9\u5b9a\u4f4d\u2192\u5206\u533a\u9694\u79bb\u67e5\u627e\u7684\u6d41\u7a0b&#xff0c;\u786e\u4fdd\u5373\u4f7f\u4e0d\u540c\u5206\u533a\u5b58\u5728\u76f8\u540cinode\u53f7&#xff0c;\u4e5f\u80fd\u7cbe\u51c6\u5b9a\u4f4d\u76ee\u6807\u6587\u4ef6\u3002\u8fd9\u4e00\u673a\u5236\u4f9d\u8d56\u6587\u4ef6\u7cfb\u7edf\u7684\u6302\u8f7d\u4fe1\u606f\u9694\u79bb\u548cVFS\u5c42\u7684\u62bd\u8c61\u7ba1\u7406&#xff0c;\u800c\u975e\u5355\u7eaf\u4f9d\u8d56inode\u7684\u5168\u5c40\u552f\u4e00\u6027\u3002<\/p>\n<h2>3. \u8f6f\u786c\u94fe\u63a5<\/h2>\n<p>\u901a\u8fc7\u4e0a\u9762\u7684\u4ecb\u7ecd\u6211\u4eec\u77e5\u9053&#xff0c;\u6587\u4ef6\u540d\u4e0e\u6587\u4ef6\u672c\u8eab\u5176\u5b9e\u5e76\u6ca1\u6709\u4ec0\u4e48\u4e00\u5bf9\u4e00\u7684\u8054\u7cfb&#xff0c;\u751a\u81f3\u6587\u4ef6\u672c\u8eab\u90fd\u4e0d\u77e5\u9053\u81ea\u5df1\u7684\u6587\u4ef6\u540d&#xff0c;\u800c\u53ea\u77e5\u9053\u81ea\u5df1\u7684inode\u3002<\/p>\n<p>\u56e0\u6b64&#xff0c;\u6587\u4ef6\u540d\u53ea\u662f\u4f5c\u4e3a\u7528\u6237\u6807\u8bc6\u6587\u4ef6\u7684\u4e00\u79cd\u624b\u6bb5\u3002\u5b9e\u9645\u4e0a&#xff0c;\u6211\u4eec\u53ef\u4ee5\u8ba9\u591a\u4e2a\u4e0d\u540c\u7684\u6587\u4ef6\u540d\u6307\u5411\u540c\u4e00\u4e2a\u6587\u4ef6&#xff0c;\u5373\u6587\u4ef6\u540d\u4e0einode\u5f62\u6210\u591a\u5bf9\u4e00\u7684\u5173\u7cfb\u3002<\/p>\n<h4>3.1 \u786c\u94fe\u63a5<\/h4>\n<p>\u5982\u4e0a\u6240\u8ff0&#xff0c;\u5c31\u662f\u65b0\u5b9a\u4e49\u4e00\u4e2a\u6587\u4ef6\u540d&#xff0c;\u8ba9\u5b83\u6307\u5411\u67d0\u4e2a\u6587\u4ef6\u7684inode&#xff0c;\u53ef\u4ee5\u7406\u89e3\u4e3a\u7ed9\u6587\u4ef6\u8d77\u522b\u540d\u3002<\/p>\n<p>ln [\u539f\u6587\u4ef6\u540d] [\u65b0\u6587\u4ef6\u540d] <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"152\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250419004216-6802f1689e1b2.png\" width=\"672\" \/><\/p>\n<p>\u53ef\u4ee5\u770b\u5230&#xff0c;\u4e24\u4e2a\u6587\u4ef6\u7684\u5c5e\u6027\u4fe1\u606f\u5b8c\u5168\u76f8\u540c&#xff0c;\u5305\u62ecinode\u53f7\u3002\u00a0<\/p>\n<p>\u53ef\u4ee5\u9a8c\u8bc1\u4e8c\u8005\u5c31\u662f\u540c\u4e00\u4e2a\u6587\u4ef6&#xff1a;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"105\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250419004216-6802f168bd169.png\" width=\"855\" \/><\/p>\n<h4>3.2 \u8f6f\u94fe\u63a5<\/h4>\n<p>\u76f8\u6bd4\u4e8e\u786c\u94fe\u63a5&#xff0c;\u8f6f\u94fe\u63a5\u66f4\u50cf\u662f\u4e3a\u6587\u4ef6\u521b\u5efa\u5feb\u6377\u65b9\u5f0f\u3002<\/p>\n<p>ln -s [\u539f\u6587\u4ef6\u540d] [\u65b0\u6587\u4ef6\u540d] <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"69\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250419004216-6802f168dd80e.png\" width=\"843\" \/><\/p>\n<p>\u00a0\u53ef\u4ee5\u770b\u5230&#xff0c;\u8f6f\u94fe\u63a5\u521b\u5efa\u7684\u94fe\u63a5\u6587\u4ef6\u7684inode\u53f7\u4e0e\u4e4b\u524d\u7684\u4e0d\u540c&#xff0c;\u662f\u4e00\u4e2a\u72ec\u7acb\u7684\u6587\u4ef6&#xff0c;\u5c31\u7c7b\u4f3c\u4e8eWindows\u5f53\u4e2d\u7684\u5feb\u6377\u65b9\u5f0f\u6587\u4ef6\u3002<\/p>\n<p>\u5728\u4f7f\u7528\u4e0a\u6765\u8bf4&#xff0c;\u6548\u679c\u4e0e\u786c\u94fe\u63a5\u5b8c\u5168\u4e00\u6837&#xff1a;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"105\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250419004217-6802f169079af.png\" width=\"765\" \/><\/p>\n<h4>3.3 \u786c\u94fe\u63a5\u6570<\/h4>\n<p>\u6211\u4eec\u77e5\u9053&#xff0c;\u6587\u4ef6\u7684\u5c5e\u6027\u5f53\u4e2d\u6709\u4e00\u4e2a\u53eb\u505a\u786c\u94fe\u63a5\u6570\u7684\u4e1c\u897f&#xff0c;\u4e4b\u524d\u4e00\u76f4\u4e0d\u7406\u89e3\u662f\u4ec0\u4e48\u610f\u601d&#xff0c;\u4f46\u662f\u76f8\u4fe1\u73b0\u5728\u5927\u5bb6\u5df2\u7ecf\u80fd\u591f\u7406\u89e3\u4e86\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"68\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250419004217-6802f169238ea.png\" width=\"735\" \/><\/p>\n<p>\u786c\u94fe\u63a5\u6570\u5c31\u662f\u6307\u5411\u8fd9\u4e2a\u6587\u4ef6\u7684\u6587\u4ef6\u540d\u7684\u6570\u91cf&#xff0c;\u4e5f\u53ef\u4ee5\u7406\u89e3\u4e3a\u522b\u540d\u6570&#xff0c;\u6216\u8005 &#8212; &#034;\u5f15\u7528\u8ba1\u6570&#034; \u3002\u53ea\u6709\u5f53\u786c\u94fe\u63a5\u6570\u5f52\u96f6\u65f6&#xff0c;\u6587\u4ef6\u624d\u4f1a\u88ab\u5b9e\u9645\u5220\u9664\u3002<\/p>\n<p>\u8fd9\u5c31\u4e3a\u6211\u4eec\u63d0\u4f9b\u4e86\u4e00\u79cd\u6587\u4ef6\u5907\u4efd\u7684\u65b9\u5f0f(\u9632\u8bef\u5220\u4e0d\u9632\u4fee\u6539)&#xff0c;\u5373\u4e3a\u4e00\u4e2a\u91cd\u8981\u6587\u4ef6\u521b\u5efa\u786c\u94fe\u63a5\u3002<\/p>\n<h6>\u76ee\u5f55\u6587\u4ef6\u7684\u786c\u94fe\u63a5\u6570<\/h6>\n<p>\u65b0\u521b\u5efa\u7684\u76ee\u5f55\u6587\u4ef6\u7684\u786c\u94fe\u63a5\u6570\u5c31\u662f2&#xff0c;\u8fd9\u662f\u4e3a\u4ec0\u4e48\u5462&#xff1f;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"150\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250419004217-6802f16940bab.png\" width=\"808\" \/><\/p>\n<p>\u00a0\u56e0\u4e3a\u76ee\u5f55\u6587\u4ef6\u4e2d\u4f1a\u9ed8\u8ba4\u5b58\u5728 &#034; . &#034; \u548c &#034; .. &#034; \u4e24\u4e2a\u76ee\u5f55&#xff0c;\u5176\u4e2d &#034; . &#034; \u5c31\u662f\u65b0\u521b\u5efa\u7684\u6587\u4ef6\u7684\u4e00\u4e2a\u786c\u94fe\u63a5\u3002<\/p>\n<p>\u5f53\u6211\u4eec\u5728\u76ee\u5f55\u4e2d\u5728\u521b\u5efa\u4e00\u4e2a\u76ee\u5f55\u65f6&#xff0c;\u6211\u4eec\u4f1a\u53d1\u73b0\u76ee\u5f55\u6587\u4ef6\u7684\u786c\u94fe\u63a5\u6570\u53c8\u4f1a\u52a0\u4e00&#xff1a;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"152\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250419004217-6802f169642f7.png\" width=\"835\" \/><\/p>\n<p>\u8fd9\u662f\u56e0\u4e3atest_1\u5185\u90e8\u7684 &#034;..&#034; \u6307\u5411\u7684\u5c31\u662ftest\u3002<\/p>\n<p>\u8fd9\u4e5f\u5c31\u8bf4\u660e\u4e86\u4e3a\u4ec0\u4e48rm\u5728\u5220\u9664\u76ee\u5f55\u6587\u4ef6\u65f6\u9700\u8981\u52a0\u4e0a\u9009\u9879 &#034;-r&#034; \u4ee5\u8fdb\u884c\u9012\u5f52\u5220\u9664&#xff08;\u5373\u4ece\u5185\u5411\u5916\u4e00\u7ea7\u4e00\u7ea7\u5730\u5220\u9664&#xff09;\u3002<\/p>\n<h6 style=\"background-color:transparent\">\u7528\u6237\u65e0\u6cd5\u521b\u5efa\u6587\u4ef6\u76ee\u5f55\u7684\u786c\u94fe\u63a5<\/h6>\n<p>\u6b64\u5916&#xff0c;\u7528\u6237\u662f\u4e0d\u88ab\u5141\u8bb8\u5efa\u7acb\u76ee\u5f55\u6587\u4ef6\u7684\u786c\u94fe\u63a5\u7684&#xff0c;\u56e0\u4e3a\u5047\u5982\u7ed9\u4e00\u4e2a\u76ee\u5f55\u6587\u4ef6\u5efa\u7acb\u4e86\u786c\u94fe\u63a5\u4e14\u8fd9\u4e2a\u76ee\u5f55\u6587\u4ef6\u7684\u4e24\u4e2a\u522b\u540d\u6240\u5728\u7684\u8def\u5f84\u4e0d\u540c&#xff0c;\u90a3\u4e48\u5176\u5185\u5bb9\u4e2d\u7684 &#034;..&#034; \u6240\u5bf9\u5e94\u7684\u76ee\u6807\u76ee\u5f55\u5230\u5e95\u662f\u54ea\u4e00\u4e2a\u5462&#xff1f;\u5b83\u5185\u5bb9\u5f53\u4e2d\u7684\u8fd9\u4e9b\u6587\u4ef6\u7684\u8def\u5f84\u5230\u5e95\u4ee5\u8c01\u4e3a\u51c6&#xff1f;\u6216\u8005\u662f\u5c06\u5b83\u4eec\u5168\u90e8\u5f53\u4f5c\u539f\u6587\u4ef6\u7684\u786c\u94fe\u63a5&#xff1f;\u8fd9\u91cc\u5c31\u4f1a\u4ea7\u751f\u6b67\u4e49&#xff0c;\u589e\u52a0\u7528\u6237\u7684\u4f7f\u7528\u6210\u672c&#xff0c;\u751a\u81f3\u662f\u7834\u574f\u6587\u4ef6\u7cfb\u7edf\u903b\u8f91\u4e0a\u7684\u6811\u72b6\u7ed3\u6784&#xff0c;\u6240\u4ee5\u662f\u4e0d\u88ab\u5141\u8bb8\u7684\u3002<\/p>\n<p>\u7b80\u5355\u6765\u8bf4\u5c31\u662f&#xff0c;\u76ee\u5f55\u6587\u4ef6\u7684\u5185\u5bb9\u4e0e\u5176\u6240\u5904\u7684\u8def\u5f84\u662f\u606f\u606f\u76f8\u5173\u7684&#xff0c;\u6240\u4ee5\u4e0d\u5141\u8bb8\u7528\u6237\u81ea\u5df1\u5728\u67d0\u4e2a\u76ee\u5f55\u4e0b\u5efa\u7acb\u76ee\u5f55\u6587\u4ef6\u7684\u786c\u94fe\u63a5\u3002<\/p>\n<p>\u5e76\u4e14\u76ee\u5f55\u6587\u4ef6\u7684\u786c\u94fe\u63a5\u53ef\u80fd\u4f1a\u5bfc\u81f4\u6587\u4ef6\u7cfb\u7edf\u7684\u6811\u72b6\u7ed3\u6784\u4e2d\u4ea7\u751f\u73af&#xff0c;\u4ece\u800c\u5bfc\u81f4\u67d0\u4e9b\u67e5\u8be2\u64cd\u4f5c\u9677\u5165\u6b7b\u5faa\u73af(. \u548c .. \u53ef\u4ee5\u7531\u64cd\u4f5c\u7cfb\u7edf\u6765\u5b9e\u73b0\u7279\u6b8a\u5904\u7406&#xff0c;\u4f46\u7528\u6237\u521b\u5efa\u7684\u65e0\u6cd5\u5904\u7406)\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb6k\u6b21\uff0c\u70b9\u8d5e48\u6b21\uff0c\u6536\u85cf39\u6b21\u3002\u4ece\u8fd9\u90e8\u5206\u6211\u4eec\u53ef\u4ee5\u770b\u51fa\u4e3a\u4ec0\u4e48 \u6570\u636e\u5199\u5165\u5f88\u6162\uff0c\u800c\u5220\u9664\u5374\u5f88\u5feb\u3002\u56e0\u4e3a\u5220\u9664\u6570\u636e\u53ea\u9700\u8981\u4fee\u6539\u5bf9\u5e94\u7684\u6807\u5fd7\u4fe1\u606f\u7f6e\u5373\u53ef\uff08\u5982\u5c06inode Bitmap \u548c Block Bitmap\u5bf9\u5e94\u4f4d\u7f6e\u4e3a0\uff09\u3002\u7531\u6b64\u6211\u4eec\u53c8\u80fd\u5927\u6982\u731c\u5230\u56de\u6536\u7ad9\u6216\u6570\u636e\u6062\u590d\u6280\u672f\u7684\u539f\u7406\u4e86\uff0c\u53ea\u8981\u8d76\u5728\u6570\u636e\u88ab\u8986\u76d6\u4e4b\u524d\uff0c\u627e\u5230\u88ab\u5220\u9664\u6570\u636e\u5bf9\u5e94\u7684\u539finode\u548c\u6570\u636e\u5757\u5373\u53ef\u6062\u590d\u3002\u4f46\u5982\u679c\u65b0\u7684\u6570\u636e\u88ab\u5199\u5165\u5230\u4e86\u8fd9\u4e9b\u5b58\u50a8\u7a7a\u95f4\u90a3\u5c31\u65e0\u80fd\u4e3a\u529b\u4e86\u3002\u6240\u4ee5\uff0c\u5f53\u91cd\u8981\u7684\u6570\u636e\u88ab\u8bef\u5220\u65f6\uff0c\u5c3d\u53ef\u80fd\u4ec0\u4e48\u90fd\u4e0d\u505a\uff0c\u8d76\u5728\u6570\u636e\u88ab\u8986\u76d6\u4e4b\u524d\u4ea4\u7531\u4e13\u4e1a\u4eba\u58eb\u8fdb\u884c\u6062\u590d\u3002<\/p>\n","protected":false},"author":2,"featured_media":23848,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[58,305,44],"topic":[],"class_list":["post-23864","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-linux","tag-305","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Linux\u7b14\u8bb0-\u6587\u4ef6\u7cfb\u7edf\u8f6f\u4ef6\u90e8\u5206 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/23864.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Linux\u7b14\u8bb0-\u6587\u4ef6\u7cfb\u7edf\u8f6f\u4ef6\u90e8\u5206 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb6k\u6b21\uff0c\u70b9\u8d5e48\u6b21\uff0c\u6536\u85cf39\u6b21\u3002\u4ece\u8fd9\u90e8\u5206\u6211\u4eec\u53ef\u4ee5\u770b\u51fa\u4e3a\u4ec0\u4e48 \u6570\u636e\u5199\u5165\u5f88\u6162\uff0c\u800c\u5220\u9664\u5374\u5f88\u5feb\u3002\u56e0\u4e3a\u5220\u9664\u6570\u636e\u53ea\u9700\u8981\u4fee\u6539\u5bf9\u5e94\u7684\u6807\u5fd7\u4fe1\u606f\u7f6e\u5373\u53ef\uff08\u5982\u5c06inode Bitmap \u548c Block Bitmap\u5bf9\u5e94\u4f4d\u7f6e\u4e3a0\uff09\u3002\u7531\u6b64\u6211\u4eec\u53c8\u80fd\u5927\u6982\u731c\u5230\u56de\u6536\u7ad9\u6216\u6570\u636e\u6062\u590d\u6280\u672f\u7684\u539f\u7406\u4e86\uff0c\u53ea\u8981\u8d76\u5728\u6570\u636e\u88ab\u8986\u76d6\u4e4b\u524d\uff0c\u627e\u5230\u88ab\u5220\u9664\u6570\u636e\u5bf9\u5e94\u7684\u539finode\u548c\u6570\u636e\u5757\u5373\u53ef\u6062\u590d\u3002\u4f46\u5982\u679c\u65b0\u7684\u6570\u636e\u88ab\u5199\u5165\u5230\u4e86\u8fd9\u4e9b\u5b58\u50a8\u7a7a\u95f4\u90a3\u5c31\u65e0\u80fd\u4e3a\u529b\u4e86\u3002\u6240\u4ee5\uff0c\u5f53\u91cd\u8981\u7684\u6570\u636e\u88ab\u8bef\u5220\u65f6\uff0c\u5c3d\u53ef\u80fd\u4ec0\u4e48\u90fd\u4e0d\u505a\uff0c\u8d76\u5728\u6570\u636e\u88ab\u8986\u76d6\u4e4b\u524d\u4ea4\u7531\u4e13\u4e1a\u4eba\u58eb\u8fdb\u884c\u6062\u590d\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/23864.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-19T00:42:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250419004213-6802f16516c2f.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/23864.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/23864.html\",\"name\":\"Linux\u7b14\u8bb0-\u6587\u4ef6\u7cfb\u7edf\u8f6f\u4ef6\u90e8\u5206 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-19T00:42:18+00:00\",\"dateModified\":\"2025-04-19T00:42:18+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/23864.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/23864.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/23864.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Linux\u7b14\u8bb0---\u6587\u4ef6\u7cfb\u7edf\u8f6f\u4ef6\u90e8\u5206\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Linux\u7b14\u8bb0-\u6587\u4ef6\u7cfb\u7edf\u8f6f\u4ef6\u90e8\u5206 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/23864.html","og_locale":"zh_CN","og_type":"article","og_title":"Linux\u7b14\u8bb0-\u6587\u4ef6\u7cfb\u7edf\u8f6f\u4ef6\u90e8\u5206 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb6k\u6b21\uff0c\u70b9\u8d5e48\u6b21\uff0c\u6536\u85cf39\u6b21\u3002\u4ece\u8fd9\u90e8\u5206\u6211\u4eec\u53ef\u4ee5\u770b\u51fa\u4e3a\u4ec0\u4e48 \u6570\u636e\u5199\u5165\u5f88\u6162\uff0c\u800c\u5220\u9664\u5374\u5f88\u5feb\u3002\u56e0\u4e3a\u5220\u9664\u6570\u636e\u53ea\u9700\u8981\u4fee\u6539\u5bf9\u5e94\u7684\u6807\u5fd7\u4fe1\u606f\u7f6e\u5373\u53ef\uff08\u5982\u5c06inode Bitmap \u548c Block Bitmap\u5bf9\u5e94\u4f4d\u7f6e\u4e3a0\uff09\u3002\u7531\u6b64\u6211\u4eec\u53c8\u80fd\u5927\u6982\u731c\u5230\u56de\u6536\u7ad9\u6216\u6570\u636e\u6062\u590d\u6280\u672f\u7684\u539f\u7406\u4e86\uff0c\u53ea\u8981\u8d76\u5728\u6570\u636e\u88ab\u8986\u76d6\u4e4b\u524d\uff0c\u627e\u5230\u88ab\u5220\u9664\u6570\u636e\u5bf9\u5e94\u7684\u539finode\u548c\u6570\u636e\u5757\u5373\u53ef\u6062\u590d\u3002\u4f46\u5982\u679c\u65b0\u7684\u6570\u636e\u88ab\u5199\u5165\u5230\u4e86\u8fd9\u4e9b\u5b58\u50a8\u7a7a\u95f4\u90a3\u5c31\u65e0\u80fd\u4e3a\u529b\u4e86\u3002\u6240\u4ee5\uff0c\u5f53\u91cd\u8981\u7684\u6570\u636e\u88ab\u8bef\u5220\u65f6\uff0c\u5c3d\u53ef\u80fd\u4ec0\u4e48\u90fd\u4e0d\u505a\uff0c\u8d76\u5728\u6570\u636e\u88ab\u8986\u76d6\u4e4b\u524d\u4ea4\u7531\u4e13\u4e1a\u4eba\u58eb\u8fdb\u884c\u6062\u590d\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/23864.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-19T00:42:18+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250419004213-6802f16516c2f.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"7 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/23864.html","url":"https:\/\/www.wsisp.com\/helps\/23864.html","name":"Linux\u7b14\u8bb0-\u6587\u4ef6\u7cfb\u7edf\u8f6f\u4ef6\u90e8\u5206 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-19T00:42:18+00:00","dateModified":"2025-04-19T00:42:18+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/23864.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/23864.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/23864.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Linux\u7b14\u8bb0---\u6587\u4ef6\u7cfb\u7edf\u8f6f\u4ef6\u90e8\u5206"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/23864","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=23864"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/23864\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/23848"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=23864"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=23864"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=23864"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=23864"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}