__NTFS_CLUSTER_FREE

Section: (9)
Updated: 09 October 2005
Index Return to Main Contents

 

NAME

__ntfs_cluster_free - free clusters on an ntfs volume  

SYNOPSIS

"SYNOPSIS"

s64 __ntfs_cluster_free (struct inode * vi, const VCN start_vcn, s64 count, const BOOL is_rollback);  

ARGUMENTS

vi
vfs inode whose runlist describes the clusters to free
start_vcn
vcn in the runlist of vi at which to start freeing clusters
count
number of clusters to free or -1 for all clusters
is_rollback
if TRUE this is a rollback operation
 

DESCRIPTION

Free count clusters starting at the cluster start_vcn in the runlist described by the vfs inode vi.

If count is -1, all clusters from start_vcn to the end of the runlist are deallocated. Thus, to completely free all clusters in a runlist, use start_vcn = 0 and count = -1.

is_rollback should always be FALSE, it is for internal use to rollback errors. You probably want to use ntfs_cluster_free instead.

Note, ntfs_cluster_free does not modify the runlist at all, so the caller has to deal with it later.

Return the number of deallocated clusters (not counting sparse ones) on success and -errno on error.  

LOCKING

- The runlist described by vi must be unlocked on entry and is unlocked on return. - This function takes the runlist lock of vi for reading and sometimes for writing and sometimes modifies the runlist. - The volume lcn bitmap must be unlocked on entry and is unlocked on return. - This function takes the volume lcn bitmap lock for writing and modifies the bitmap contents.


 

Index

NAME
SYNOPSIS
ARGUMENTS
DESCRIPTION
LOCKING

This document was created by man2html, using the manual pages.
Time: 00:01:52 GMT, October 09, 2005