File: fsw_reiserfs.h

package info (click to toggle)
refind 0.14.2-2.1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 9,432 kB
  • sloc: ansic: 52,757; sh: 2,086; python: 592; makefile: 351; perl: 5
file content (88 lines) | stat: -rw-r--r-- 2,447 bytes parent folder | download | duplicates (7)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/**
 * \file fsw_reiserfs.h
 * ReiserFS file system driver header.
 */

/*-
 * Copyright (c) 2006 Christoph Pfisterer
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */

#ifndef _FSW_REISERFS_H_
#define _FSW_REISERFS_H_

#define VOLSTRUCTNAME fsw_reiserfs_volume
#define DNODESTRUCTNAME fsw_reiserfs_dnode
#include "fsw_core.h"

#include "fsw_reiserfs_disk.h"


//! Block size (in shift bits) to be used when reading the reiserfs superblock.
#define REISERFS_SUPERBLOCK_BLOCKSIZEBITS  12
//! Block size (in bytes) to be used when reading the reiserfs superblock.
#define REISERFS_SUPERBLOCK_BLOCKSIZE  (1<<REISERFS_SUPERBLOCK_BLOCKSIZEBITS)


/**
 * ReiserFS: Results from a tree search.
 */

struct fsw_reiserfs_item {
    int valid;
    
    // the found item
    struct item_head ih;
    fsw_u64 item_offset;
    fsw_u32 item_type;
    
    fsw_u8 *item_data;
    
    // path information
    fsw_u32 path_bno[MAX_HEIGHT];
    fsw_u32 path_index[MAX_HEIGHT];
    
    // block release information
    fsw_u32 block_bno;
    void *block_buffer;
};


/**
 * ReiserFS: Volume structure with reiserfs-specific data.
 */

struct fsw_reiserfs_volume {
    struct fsw_volume g;            //!< Generic volume structure
    
    struct reiserfs_super_block *sb;  //!< Full raw reiserfs superblock structure
    int version;                    //!< Flag for 3.5 or 3.6 format
};

/**
 * ReiserFS: Dnode structure with reiserfs-specific data.
 */

struct fsw_reiserfs_dnode {
    struct fsw_dnode g;             //!< Generic dnode structure
    
    fsw_u32 dir_id;                 //!< Locality ID for the reiserfs tree (parent dir id)
    struct stat_data_v1 *sd_v1;     //!< Full stat_data, version 1
    struct stat_data *sd_v2;        //!< Full stat_data, version 2
};


#endif