.\" 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 "ALLOC_NEW_RESERVATION" "9" "09 October 2005" "" "" .SH NAME alloc_new_reservation \- -allocate a new reservation window .SH SYNOPSIS "SYNOPSIS" .sp \fB .sp int alloc_new_reservation (struct ext3_reserve_window_node * \fImy_rsv\fB, int \fIgoal\fB, struct super_block * \fIsb\fB, unsigned int \fIgroup\fB, struct buffer_head * \fIbitmap_bh\fB); \fR .SH "ARGUMENTS" .TP \fB\fImy_rsv\fB\fR -- undescribed -- .TP \fB\fIgoal\fB\fR The goal (group-relative). It is where the search for a free reservable space should start from. if we have a goal(goal >0 ), then start from there, no goal(goal = -1), we start from the first block of the group. .TP \fB\fIsb\fB\fR the super block .TP \fB\fIgroup\fB\fR the group we are trying to allocate in .TP \fB\fIbitmap_bh\fB\fR the block group block bitmap .SH "DESCRIPTION" .PP .PP To make a new reservation, we search part of the filesystem reservation list (the list that inside the group). We try to allocate a new reservation window near the allocation goal, or the beginning of the group, if there is no goal. .PP We first find a reservable space after the goal, then from there, we check the bitmap for the first free block after it. If there is no free block until the end of group, then the whole group is full, we failed. Otherwise, check if the free block is inside the expected reservable space, if so, we succeed. If the first free block is outside the reservable space, then start from the first free block, we search for next available space, and go on. .PP on succeed, a new reservation will be found and inserted into the list It contains at least one free block, and it does not overlap with other reservation windows. .SH "FAILED" .PP we failed to find a reservation window in this group