iT邦幫忙

DAY 28
4

檔案系統的設計與效能系列 第 28

檔案系統的設計與效能 - Attributes

  • 分享至 

  • twitterImage
  •  

Attribute 可以儲存檔案附加屬性的資訊,特別是在圖形化作業系統中,諸如icon的大小、位置等等。
Attribute 可以儲存檔案附加屬性的資訊,例如在圖形化作業系統中,icon的大小、位置等等,還有紀錄由何種軟體/程式來處理這個檔案的MIME資訊,都是 attribute的功用。假設要開啟一個包含有10個檔案的目錄,則讀取動作除了包含檔案的i-node之外,還有目錄與每個檔案的 attributes。當檔案數量以及attribute項目很多時,開啟目錄所需要的讀取動作就會多很多,印而影響到速度。要解決這可能帶來的效能問題,檔案系統使用一方面將i-node儲存在自己本身的block中,並用額外的block來儲存small_data結構,用以記錄 attributes。

Attribute的結構如下:

typedef struct small_data {
    uint32 type;
    uint16 name_size;
    uint16 data_size;
    char name[1];
} small_data;

系列文章


上一篇
檔案系統的設計與效能 - Data Streams
下一篇
檔案系統的設計與效能 - B+ Tree
系列文
檔案系統的設計與效能32
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言