ocfs2: use allocation reservations for directory data
Use the reservations system for unindexed dir tree allocations. We don't bother with the indexed tree as reads from it are mostly random anyway. Directory reservations are marked seperately, to allow the reservations code a chance to optimize their window sizes. This patch allocates only 8 bits for directory windows as they generally are not expected to grow as quickly as file data. Future improvements to dir window sizing can trivially be made. Signed-off-by: Mark Fasheh <mfasheh@suse.com>
This commit is contained in:
@@ -377,6 +377,10 @@ void ocfs2_populate_inode(struct inode *inode, struct ocfs2_dinode *fe,
|
||||
|
||||
OCFS2_I(inode)->ip_last_used_slot = 0;
|
||||
OCFS2_I(inode)->ip_last_used_group = 0;
|
||||
|
||||
if (S_ISDIR(inode->i_mode))
|
||||
ocfs2_resv_set_type(&OCFS2_I(inode)->ip_la_data_resv,
|
||||
OCFS2_RESV_FLAG_DIR);
|
||||
mlog_exit_void();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user