-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathfile_io.h
45 lines (43 loc) · 1.83 KB
/
file_io.h
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
/*
* Lessfs: A data deduplicating filesystem.
* Copyright (C) 2008 Mark Ruijter <[email protected]>
*
* This program is free software.
* You can redistribute lessfs and/or modify it under the terms of either
* (1) the GNU General Public License; either version 3 of the License,
* or (at your option) any later version as published by
* the Free Software Foundation; or (2) obtain a commercial license
* by contacting the Author.
*
* 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
*/
typedef struct {
unsigned long long offset;
unsigned long size;
unsigned long long inuse;
} INUSE;
typedef struct {
unsigned long long available_blocks;
unsigned long long offset;
} FLIST;
INUSE *file_get_inuse(unsigned char *);
unsigned int file_commit_block(unsigned char *,INOBNO,
unsigned long);
void file_sync_flush_dtaq();
void file_partial_truncate_block(struct stat *, unsigned long long,
unsigned int);
int file_unlink_file(const char *);
CCACHEDTA *file_update_stored(unsigned char *, INOBNO *, off_t);
void fl_write_cache(CCACHEDTA *, INOBNO *);
unsigned long long file_read_block(unsigned long long, const char *, char *, unsigned long long);
int file_fs_truncate(struct stat *, off_t, char *);
void file_update_inuse(unsigned char *, INUSE *);
DBT *file_tgr_read_data(unsigned char *);
unsigned long long round_512(unsigned long long );