Whamcloud - gitweb
ChangeLog, Makefile.in, version.h:
[tools/e2fsprogs.git] / resize / resize2fs.h
1 /*
2  * resize2fs.h --- ext2 resizer header file
3  *
4  * Copyright (C) 1997 Theodore Ts'o
5  * 
6  * %Begin-Header%
7  * All rights reserved.
8  * %End-Header%
9  */
10
11 #include <stdio.h>
12 #include <string.h>
13 #include <unistd.h>
14 #include <stdlib.h>
15 #include <sys/types.h>
16 #include <sys/time.h>
17
18 #ifdef HAVE_LINUX_FS_H
19 #include <linux/fs.h>
20 #endif
21 #include <linux/ext2_fs.h>
22
23 #include "ext2fs/ext2fs.h"
24 #include "ext2fs/brel.h"
25 #include "banalysis.h"
26
27 #ifdef __STDC__
28 #define NOARGS void
29 #else
30 #define NOARGS
31 #define const
32 #endif
33
34 /*
35  * Flags for the resizer; most are debugging flags only
36  */
37 #define RESIZE_DEBUG_IO                 0x0001
38 #define RESIZE_DEBUG_BMOVE              0x0002
39 #define RESIZE_DEBUG_INODEMAP           0x0004
40 #define RESIZE_DEBUG_ITABLEMOVE         0x0008
41
42 #define RESIZE_PERCENT_COMPLETE         0x0100
43
44 /*
45  * The core state structure for the ext2 resizer
46  */
47
48 struct ext2_resize_struct {
49         ext2_filsys     old_fs;
50         ext2_filsys     new_fs;
51         ext2_brel       block_relocate;
52         ext2fs_block_bitmap reserve_blocks;
53         int             needed_blocks;
54         int             flags;
55         char            *itable_buf;
56 };
57
58 typedef struct ext2_resize_struct *ext2_resize_t;
59
60 /* prototypes */
61 extern errcode_t resize_fs(ext2_filsys fs, blk_t new_size, int flags);