Scroll to navigation

JBD2__JOURNAL_START(9) The Linux Journalling API JBD2__JOURNAL_START(9)

NAME

jbd2__journal_start - Obtain a new handle.

SYNOPSIS

handle_t * jbd2__journal_start(journal_t * journal, int nblocks, int rsv_blocks, gfp_t gfp_mask, unsigned int type, unsigned int line_no);

ARGUMENTS

journal_t * journal

Journal to start transaction on.

int nblocks

number of block buffer we might modify

int rsv_blocks

-- undescribed --

gfp_t gfp_mask

-- undescribed --

unsigned int type

-- undescribed --

unsigned int line_no

-- undescribed --

DESCRIPTION

We make sure that the transaction can guarantee at least nblocks of modified buffers in the log. We block until the log can guarantee that much space. Additionally, if rsv_blocks > 0, we also create another handle with rsv_blocks reserved blocks in the journal. This handle is is stored in h_rsv_handle. It is not attached to any particular transaction and thus doesn't block transaction commit. If the caller uses this reserved handle, it has to set h_rsv_handle to NULL as otherwise jbd2_journal_stop on the parent handle will dispose the reserved one. Reserved handle has to be converted to a normal handle using jbd2_journal_start_reserved before it can be used.

Return a pointer to a newly allocated handle, or an ERR_PTR value on failure.

AUTHORS

Roger Gammans <rgammans@computer-surgery.co.uk>

Author.

Stephen Tweedie <sct@redhat.com>

Author.

COPYRIGHT

July 2017 Kernel Hackers Manual 4.12