ocfs2: Introduce dir free space list
The only operation which doesn't get faster with directory indexing is insert, which still has to walk the entire unindexed directory portion to find a free block. This patch provides an improvement in directory insert performance by maintaining a singly linked list of directory leaf blocks which have space for additional dirents. Signed-off-by: Mark Fasheh <mfasheh@suse.com> Acked-by: Joel Becker <joel.becker@oracle.com>
This commit is contained in:
@@ -39,11 +39,19 @@ struct ocfs2_dir_lookup_result {
|
||||
|
||||
struct buffer_head *dl_dx_root_bh; /* Root of indexed
|
||||
* tree */
|
||||
|
||||
struct buffer_head *dl_dx_leaf_bh; /* Indexed leaf block */
|
||||
struct ocfs2_dx_entry *dl_dx_entry; /* Target dx_entry in
|
||||
* indexed leaf */
|
||||
struct ocfs2_dx_hinfo dl_hinfo; /* Name hash results */
|
||||
|
||||
struct buffer_head *dl_prev_leaf_bh;/* Previous entry in
|
||||
* dir free space
|
||||
* list. NULL if
|
||||
* previous entry is
|
||||
* dx root block. */
|
||||
};
|
||||
|
||||
void ocfs2_free_dir_lookup_result(struct ocfs2_dir_lookup_result *res);
|
||||
|
||||
int ocfs2_find_entry(const char *name, int namelen,
|
||||
|
Reference in New Issue
Block a user