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