1N/A/*
1N/A * lcnalloc.h - Exports for cluster (de)allocation. Part of the Linux-NTFS
1N/A * project.
1N/A *
1N/A * Copyright (c) 2002 Anton Altaparmakov
1N/A * Copyright (c) 2004 Yura Pakhuchiy
1N/A *
1N/A * This program/include file is free software; you can redistribute it and/or
1N/A * modify it under the terms of the GNU General Public License as published
1N/A * by the Free Software Foundation; either version 2 of the License, or
1N/A * (at your option) any later version.
1N/A *
1N/A * This program/include file is distributed in the hope that it will be
1N/A * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
1N/A * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1N/A * GNU General Public License for more details.
1N/A *
1N/A * You should have received a copy of the GNU General Public License
1N/A * along with this program (in the main directory of the Linux-NTFS
1N/A * distribution in the file COPYING); if not, write to the Free Software
1N/A * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1N/A */
1N/A
1N/A#ifndef _NTFS_LCNALLOC_H
1N/A#define _NTFS_LCNALLOC_H
1N/A
1N/A#include "types.h"
1N/A#include "runlist.h"
1N/A#include "volume.h"
1N/A
1N/A/**
1N/A * enum NTFS_CLUSTER_ALLOCATION_ZONES -
1N/A */
1N/Atypedef enum {
1N/A FIRST_ZONE = 0, /* For sanity checking. */
1N/A MFT_ZONE = 0, /* Allocate from $MFT zone. */
1N/A DATA_ZONE = 1, /* Allocate from $DATA zone. */
1N/A LAST_ZONE = 1, /* For sanity checking. */
1N/A} NTFS_CLUSTER_ALLOCATION_ZONES;
1N/A
1N/Aextern runlist *ntfs_cluster_alloc(ntfs_volume *vol, VCN start_vcn, s64 count,
1N/A LCN start_lcn, const NTFS_CLUSTER_ALLOCATION_ZONES zone);
1N/A
1N/Aextern int ntfs_cluster_free_from_rl(ntfs_volume *vol, runlist *rl);
1N/A
1N/Aextern int ntfs_cluster_free(ntfs_volume *vol, ntfs_attr *na, VCN start_vcn,
1N/A s64 count);
1N/A
1N/A#endif /* defined _NTFS_LCNALLOC_H */
1N/A