---
name: "jbd2__journal_start"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/jbd2__journal_start"
---

# jbd2\_\_journal\_start(9)

Obtain a new handle.

## 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*

Journal to start transaction on.

*nblocks*

number of block buffer we might modify

*rsv\_blocks*

\-- undescribed --

*gfp\_mask*

\-- undescribed --

*type*

\-- undescribed --

*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
