Method and device for cleaning space of cache memory
The invention provides a space cleaning method and device for a cache memory. The method and device are used for avoiding a deadlock state in a space cleaning process. The method comprises the steps that in the process of writing metadata into a metadata B + tree, if the storage space of the metadat...
Gespeichert in:
Hauptverfasser: | , , , , , |
---|---|
Format: | Patent |
Sprache: | chi ; eng |
Schlagworte: | |
Online-Zugang: | Volltext bestellen |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | The invention provides a space cleaning method and device for a cache memory. The method and device are used for avoiding a deadlock state in a space cleaning process. The method comprises the steps that in the process of writing metadata into a metadata B + tree, if the storage space of the metadata is insufficient, nodes in the metadata B + tree are traversed in sequence, and marks of the metadata stored in the nodes are determined; determining a mark of a metadata storage space corresponding to the metadata according to the mark of the metadata; changing the life cycle of the metadata storage space marked as the invalid mark; storing the life cycle of each metadata storage space in the form of a linked list to obtain a new linked list; and writing a linked list head of the new linked list into the super block, and releasing the metadata storage space. According to the method and the device, the linked list head of the new linked list is written into the super block instead of being written into the fixed l |
---|