summaryrefslogtreecommitdiff
path: root/fs/ocfs2/reservations.h
diff options
context:
space:
mode:
authorMark Fasheh <mfasheh@suse.com>2009-12-07 13:16:07 -0800
committerJoel Becker <joel.becker@oracle.com>2010-05-05 18:17:30 -0700
commite3b4a97dbe9741a3227c3ed857a0632532fcd386 (patch)
tree31da8dd09ad6ef8959b287e36e98ead30472a284 /fs/ocfs2/reservations.h
parent4fe370afaae49c57619bb0bedb75de7e7c168308 (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/reservations.h')
-rw-r--r--fs/ocfs2/reservations.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ocfs2/reservations.h b/fs/ocfs2/reservations.h
index 8341cd0ef855..34bb308375c5 100644
--- a/fs/ocfs2/reservations.h
+++ b/fs/ocfs2/reservations.h
@@ -42,6 +42,8 @@ struct ocfs2_alloc_reservation {
#define OCFS2_RESV_FLAG_INUSE 0x01 /* Set when r_node is part of a btree */
#define OCFS2_RESV_FLAG_TMP 0x02 /* Temporary reservation, will be
* destroyed immedately after use */
+#define OCFS2_RESV_FLAG_DIR 0x04 /* Reservation is for an unindexed
+ * directory btree */
struct ocfs2_reservation_map {
struct rb_root m_reservations;
@@ -61,7 +63,7 @@ struct ocfs2_reservation_map {
void ocfs2_resv_init_once(struct ocfs2_alloc_reservation *resv);
-#define OCFS2_RESV_TYPES (OCFS2_RESV_FLAG_TMP)
+#define OCFS2_RESV_TYPES (OCFS2_RESV_FLAG_TMP|OCFS2_RESV_FLAG_DIR)
void ocfs2_resv_set_type(struct ocfs2_alloc_reservation *resv,
unsigned int flags);