File: node41.h

package info (click to toggle)
reiser4progs 1.2.2-1
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 5,904 kB
  • sloc: ansic: 34,331; sh: 4,251; makefile: 994
file content (47 lines) | stat: -rw-r--r-- 1,018 bytes parent folder | download | duplicates (4)
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
43
44
45
46
47
/* Copyright (C) 2001-2005 by Hans Reiser, licensing governed by
   reiser4progs/COPYING.

   node41.h -- reiser4 node41 layouts.
   The same as node40, but with 32-bit reference counter
*/

#ifndef NODE41_H
#define NODE41_H

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

#define NODE41_MAGIC 0x19051966

extern reiser4_node_plug_t node41_plug;

typedef struct node41_header {
	node40_header_t head;
	d32_t csum;
}  __attribute__((packed)) node41_header_t;

#define	nh41(block) ((node41_header_t *)block->data)

#define nh41_get_csum(node)			\
	aal_get_le32(nh41((node)->block), csum)

#define nh41_set_csum(node, val)			\
	aal_set_le32(nh41((node)->block), csum, val)


extern uint32_t node41_get_csum(reiser4_node_t *entity);
extern reiser4_node_t *node41_prepare(aal_block_t *block,
				      reiser4_key_plug_t *kplug);

#endif
/*
   Local variables:
   c-indentation-style: "K&R"
   mode-name: "LC"
   c-basic-offset: 8
   tab-width: 8
   fill-column: 120
   scroll-step: 1
   End:
*/