diff options
author | Mark Fasheh <mfasheh@suse.com> | 2009-12-07 16:16:07 -0500 |
---|---|---|
committer | Joel Becker <joel.becker@oracle.com> | 2010-05-05 21:17:30 -0400 |
commit | e3b4a97dbe9741a3227c3ed857a0632532fcd386 (patch) | |
tree | 31da8dd09ad6ef8959b287e36e98ead30472a284 /fs/ocfs2/inode.c | |
parent | 4fe370afaae49c57619bb0bedb75de7e7c168308 (diff) |
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>
Diffstat (limited to 'fs/ocfs2/inode.c')
-rw-r--r-- | fs/ocfs2/inode.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c index 62b4743fb6f1..9ee13f70da57 100644 --- a/fs/ocfs2/inode.c +++ b/fs/ocfs2/inode.c | |||
@@ -377,6 +377,10 @@ void ocfs2_populate_inode(struct inode *inode, struct ocfs2_dinode *fe, | |||
377 | 377 | ||
378 | OCFS2_I(inode)->ip_last_used_slot = 0; | 378 | OCFS2_I(inode)->ip_last_used_slot = 0; |
379 | OCFS2_I(inode)->ip_last_used_group = 0; | 379 | OCFS2_I(inode)->ip_last_used_group = 0; |
380 | |||
381 | if (S_ISDIR(inode->i_mode)) | ||
382 | ocfs2_resv_set_type(&OCFS2_I(inode)->ip_la_data_resv, | ||
383 | OCFS2_RESV_FLAG_DIR); | ||
380 | mlog_exit_void(); | 384 | mlog_exit_void(); |
381 | } | 385 | } |
382 | 386 | ||