diff options
Diffstat (limited to 'fs/ocfs2')
-rw-r--r-- | fs/ocfs2/dlm/dlmcommon.h | 8 | ||||
-rw-r--r-- | fs/ocfs2/dlm/dlmdomain.c | 3 |
2 files changed, 9 insertions, 2 deletions
diff --git a/fs/ocfs2/dlm/dlmcommon.h b/fs/ocfs2/dlm/dlmcommon.h index 0378ddbc8a8c..4fc1be3a3fa2 100644 --- a/fs/ocfs2/dlm/dlmcommon.h +++ b/fs/ocfs2/dlm/dlmcommon.h | |||
@@ -37,8 +37,12 @@ | |||
37 | #define DLM_THREAD_SHUFFLE_INTERVAL 5 // flush everything every 5 passes | 37 | #define DLM_THREAD_SHUFFLE_INTERVAL 5 // flush everything every 5 passes |
38 | #define DLM_THREAD_MS 200 // flush at least every 200 ms | 38 | #define DLM_THREAD_MS 200 // flush at least every 200 ms |
39 | 39 | ||
40 | #define DLM_HASH_SIZE (1 << 14) | 40 | #define DLM_HASH_SIZE_DEFAULT (1 << 14) |
41 | #define DLM_HASH_PAGES (DLM_HASH_SIZE / PAGE_SIZE) | 41 | #if DLM_HASH_SIZE_DEFAULT < PAGE_SIZE |
42 | # define DLM_HASH_PAGES 1 | ||
43 | #else | ||
44 | # define DLM_HASH_PAGES (DLM_HASH_SIZE_DEFAULT / PAGE_SIZE) | ||
45 | #endif | ||
42 | #define DLM_BUCKETS_PER_PAGE (PAGE_SIZE / sizeof(struct hlist_head)) | 46 | #define DLM_BUCKETS_PER_PAGE (PAGE_SIZE / sizeof(struct hlist_head)) |
43 | #define DLM_HASH_BUCKETS (DLM_HASH_PAGES * DLM_BUCKETS_PER_PAGE) | 47 | #define DLM_HASH_BUCKETS (DLM_HASH_PAGES * DLM_BUCKETS_PER_PAGE) |
44 | 48 | ||
diff --git a/fs/ocfs2/dlm/dlmdomain.c b/fs/ocfs2/dlm/dlmdomain.c index 80b8cce9cf3c..a074ec6f193f 100644 --- a/fs/ocfs2/dlm/dlmdomain.c +++ b/fs/ocfs2/dlm/dlmdomain.c | |||
@@ -67,6 +67,9 @@ static void **dlm_alloc_pagevec(int pages) | |||
67 | for (i = 0; i < pages; i++) | 67 | for (i = 0; i < pages; i++) |
68 | if (!(vec[i] = (void *)__get_free_page(GFP_KERNEL))) | 68 | if (!(vec[i] = (void *)__get_free_page(GFP_KERNEL))) |
69 | goto out_free; | 69 | goto out_free; |
70 | |||
71 | mlog(0, "Allocated DLM hash pagevec; %d pages (%lu expected), %Zd buckets per page\n", | ||
72 | pages, DLM_HASH_PAGES, DLM_BUCKETS_PER_PAGE); | ||
70 | return vec; | 73 | return vec; |
71 | out_free: | 74 | out_free: |
72 | dlm_free_pagevec(vec, i); | 75 | dlm_free_pagevec(vec, i); |