ALLOC_NEW_RESERVATION

Section: (9)
Updated: 09 October 2005
Index Return to Main Contents

 

NAME

alloc_new_reservation - -allocate a new reservation window  

SYNOPSIS

"SYNOPSIS"

int alloc_new_reservation (struct ext3_reserve_window_node * my_rsv, int goal, struct super_block * sb, unsigned int group, struct buffer_head * bitmap_bh);  

ARGUMENTS

my_rsv
-- undescribed --
goal
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.
sb
the super block
group
the group we are trying to allocate in
bitmap_bh
the block group block bitmap
 

DESCRIPTION

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.

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.

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.  

FAILED

we failed to find a reservation window in this group


 

Index

NAME
SYNOPSIS
ARGUMENTS
DESCRIPTION
FAILED

This document was created by man2html, using the manual pages.
Time: 00:01:55 GMT, October 09, 2005