File: alloc40.h

package info (click to toggle)
reiser4progs 1.0.6-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 5,348 kB
  • ctags: 3,714
  • sloc: ansic: 33,468; sh: 8,489; makefile: 1,012
file content (42 lines) | stat: -rw-r--r-- 818 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/* Copyright (C) 2001-2005 by Hans Reiser, licensing governed by
   reiser4progs/COPYING.
   
   alloc40.h -- default block allocator plugin for reiser4. */

#ifndef ALLOC40_H
#define ALLOC40_H
#ifndef ENABLE_MINIMAL

#include <aal/libaal.h>
#include <reiser4/bitmap.h>
#include <reiser4/plugin.h>

#define CRC_SIZE (4)

typedef struct alloc40 {
	reiser4_alloc_plug_t *plug;
	
	uint32_t state;
	uint32_t blksize;
	
	aal_device_t *device;
	reiser4_bitmap_t *bitmap;

	char *crc;

	void *data;
} alloc40_t;

#define PLUG_ENT(p) ((alloc40_t *)p)

extern reiser4_alloc_plug_t alloc40_plug;

extern int alloc40_occupied(reiser4_alloc_ent_t *entity, 
			    uint64_t start, uint64_t count);

extern errno_t alloc40_layout(reiser4_alloc_ent_t *entity,
			      region_func_t region_func,
			      void *data);

#endif
#endif