JBD: JBD slab allocation cleanups
JBD: Replace slab allocations with page allocations JBD allocate memory for committed_data and frozen_data from slab. However JBD should not pass slab pages down to the block layer. Use page allocator pages instead. This will also prepare JBD for the large blocksize patchset. Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Mingming Cao <cmm@us.ibm.com>
This commit is contained in:

committed by
Theodore Ts'o

parent
d85714d81c
commit
c089d490df
@@ -675,7 +675,7 @@ repeat:
|
||||
JBUFFER_TRACE(jh, "allocate memory for buffer");
|
||||
jbd_unlock_bh_state(bh);
|
||||
frozen_buffer =
|
||||
jbd_slab_alloc(jh2bh(jh)->b_size,
|
||||
jbd_alloc(jh2bh(jh)->b_size,
|
||||
GFP_NOFS);
|
||||
if (!frozen_buffer) {
|
||||
printk(KERN_EMERG
|
||||
@@ -735,7 +735,7 @@ done:
|
||||
|
||||
out:
|
||||
if (unlikely(frozen_buffer)) /* It's usually NULL */
|
||||
jbd_slab_free(frozen_buffer, bh->b_size);
|
||||
jbd_free(frozen_buffer, bh->b_size);
|
||||
|
||||
JBUFFER_TRACE(jh, "exit");
|
||||
return error;
|
||||
@@ -888,7 +888,7 @@ int journal_get_undo_access(handle_t *handle, struct buffer_head *bh)
|
||||
|
||||
repeat:
|
||||
if (!jh->b_committed_data) {
|
||||
committed_data = jbd_slab_alloc(jh2bh(jh)->b_size, GFP_NOFS);
|
||||
committed_data = jbd_alloc(jh2bh(jh)->b_size, GFP_NOFS);
|
||||
if (!committed_data) {
|
||||
printk(KERN_EMERG "%s: No memory for committed data\n",
|
||||
__FUNCTION__);
|
||||
@@ -915,7 +915,7 @@ repeat:
|
||||
out:
|
||||
journal_put_journal_head(jh);
|
||||
if (unlikely(committed_data))
|
||||
jbd_slab_free(committed_data, bh->b_size);
|
||||
jbd_free(committed_data, bh->b_size);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user