aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jbd2/journal.c
diff options
context:
space:
mode:
authorYongqiang Yang <xiaoqiangnk@gmail.com>2012-02-20 17:53:02 -0500
committerTheodore Ts'o <tytso@mit.edu>2012-02-20 17:53:02 -0500
commit0c2022eccb01630c037f2024531e9ff1afbe1564 (patch)
tree704d54db298e64a84fd60330fd7985d27117d98c /fs/jbd2/journal.c
parent18aadd47f88464928b5ce57791c2e8f9f2aaece0 (diff)
jbd2: allocate transaction from separate slab cache
There is normally only a handful of these active at any one time, but putting them in a separate slab cache makes debugging memory corruption problems easier. Manish Katiyar also wanted this make it easier to test memory failure scenarios in the jbd2 layer. Cc: Manish Katiyar <mkatiyar@gmail.com> Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/jbd2/journal.c')
-rw-r--r--fs/jbd2/journal.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index 93a595c69616..aa8f5986f8da 100644
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -2361,6 +2361,8 @@ static int __init journal_init_caches(void)
2361 ret = journal_init_jbd2_journal_head_cache(); 2361 ret = journal_init_jbd2_journal_head_cache();
2362 if (ret == 0) 2362 if (ret == 0)
2363 ret = journal_init_handle_cache(); 2363 ret = journal_init_handle_cache();
2364 if (ret == 0)
2365 ret = jbd2_journal_init_transaction_cache();
2364 return ret; 2366 return ret;
2365} 2367}
2366 2368
@@ -2369,6 +2371,7 @@ static void jbd2_journal_destroy_caches(void)
2369 jbd2_journal_destroy_revoke_caches(); 2371 jbd2_journal_destroy_revoke_caches();
2370 jbd2_journal_destroy_jbd2_journal_head_cache(); 2372 jbd2_journal_destroy_jbd2_journal_head_cache();
2371 jbd2_journal_destroy_handle_cache(); 2373 jbd2_journal_destroy_handle_cache();
2374 jbd2_journal_destroy_transaction_cache();
2372 jbd2_journal_destroy_slabs(); 2375 jbd2_journal_destroy_slabs();
2373} 2376}
2374 2377