2 * Copyright 2001-2010, Haiku Inc. All rights reserved.
3 * This file may be used under the terms of the MIT License.
6 * Janito V. Ferreira Filho
8 #ifndef INODEALLOCATOR_H
9 #define INODEALLOCATOR_H
14 #include "Transaction.h"
21 class InodeAllocator
{
23 InodeAllocator(Volume
* volume
);
24 virtual ~InodeAllocator();
26 virtual status_t
New(Transaction
& transaction
, Inode
* parent
,
27 int32 mode
, ino_t
& id
);
28 virtual status_t
Free(Transaction
& transaction
, ino_t id
,
32 status_t
_Allocate(Transaction
& transaction
,
33 uint32 preferredBlockGroup
, bool isDirectory
,
35 status_t
_AllocateInGroup(Transaction
& transaction
,
36 uint32 blockGroup
, bool isDirectory
,
37 ino_t
& id
, uint32 numInodes
);
38 status_t
_MarkInBitmap(Transaction
& transaction
,
39 fsblock_t bitmapBlock
, uint32 blockGroup
,
40 uint32 numInodes
, uint32
& pos
);
41 status_t
_UnmarkInBitmap(Transaction
& transaction
,
42 fsblock_t bitmapBlock
, uint32 numInodes
, ino_t id
);
43 status_t
_InitGroup(Transaction
& transaction
,
44 ext2_block_group
* group
, fsblock_t bitmapBlock
,
52 #endif // INODEALLOCATOR_H