.\" This manpage has been automatically generated by docbook2man
.\" from a DocBook document. This tool can be found at:
.\"
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
.TH "JFFS2_DO_RESERVE_SPACE" "" "06 October 2005" "" ""
.SH NAME
jffs2_do_reserve_space \- request physical space to write nodes to flash
.SH SYNOPSIS
"SYNOPSIS"
.sp
\fB
.sp
int jffs2_do_reserve_space (struct jffs2_sb_info * \fIc\fB, uint32_t \fIminsize\fB, uint32_t * \fIofs\fB, uint32_t * \fIlen\fB);
\fR
.SH "ARGUMENTS"
.TP
\fB\fIc\fB\fR
superblock info
.TP
\fB\fIminsize\fB\fR
Minimum acceptable size of allocation
.TP
\fB\fIofs\fB\fR
Returned value of node offset
.TP
\fB\fIlen\fB\fR
Returned value of allocation length
.SH "DESCRIPTION"
.PP
Requests a block of physical space on the flash. Returns zero for success
and puts 'ofs' and 'len' into the appriopriate place, or returns -ENOSPC
or other error if appropriate.
.PP
If it returns zero, \fBjffs2_reserve_space\fR also downs the per-filesystem
allocation semaphore, to prevent more than one allocation from being
active at any time. The semaphore is later released by \fBjffs2_commit_allocation\fR
.PP
\fBjffs2_reserve_space\fR may trigger garbage collection in order to make room
for the requested allocation.