http://linux-ntfs.sourceforge.net/snapshots/ntfsprogs-200307311516.tar.bz2
[ntfsprogs.git] / include / lcnalloc.h
1 /*
2  * lcnalloc.h - Exports for cluster (de)allocation. Part of the Linux-NTFS
3  *              project.
4  *
5  * Copyright (c) 2002 Anton Altaparmakov
6  *
7  * This program/include file is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License as published
9  * by the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program/include file is distributed in the hope that it will be
13  * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
14  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program (in the main directory of the Linux-NTFS
19  * distribution in the file COPYING); if not, write to the Free Software
20  * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21  */
22
23 #ifndef _NTFS_LCNALLOC_H
24 #define _NTFS_LCNALLOC_H
25
26 #include "types.h"
27 #include "runlist.h"
28 #include "volume.h"
29
30 typedef enum {
31         FIRST_ZONE      = 0,    /* For sanity checking. */
32         MFT_ZONE        = 0,    /* Allocate from $MFT zone. */
33         DATA_ZONE       = 1,    /* Allocate from $DATA zone. */
34         LAST_ZONE       = 1,    /* For sanity checking. */
35 } NTFS_CLUSTER_ALLOCATION_ZONES;
36
37 extern runlist *ntfs_cluster_alloc(ntfs_volume *vol, s64 count, LCN start_lcn,
38                 const NTFS_CLUSTER_ALLOCATION_ZONES zone);
39
40 extern int ntfs_cluster_free(ntfs_volume *vol, ntfs_attr *na, VCN start_vcn,
41                 s64 count);
42
43 #endif /* defined _NTFS_LCNALLOC_H */
44