.\" This manpage has been automatically generated by docbook2man .\" from a DocBook document. This tool can be found at: .\" .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . .TH "__NTFS_CLUSTER_FREE" "9" "09 October 2005" "" "" .SH NAME __ntfs_cluster_free \- free clusters on an ntfs volume .SH SYNOPSIS "SYNOPSIS" .sp \fB .sp s64 __ntfs_cluster_free (struct inode * \fIvi\fB, const VCN \fIstart_vcn\fB, s64 \fIcount\fB, const BOOL \fIis_rollback\fB); \fR .SH "ARGUMENTS" .TP \fB\fIvi\fB\fR vfs inode whose runlist describes the clusters to free .TP \fB\fIstart_vcn\fB\fR vcn in the runlist of \fIvi\fR at which to start freeing clusters .TP \fB\fIcount\fB\fR number of clusters to free or -1 for all clusters .TP \fB\fIis_rollback\fB\fR if TRUE this is a rollback operation .SH "DESCRIPTION" .PP Free \fIcount\fR clusters starting at the cluster \fIstart_vcn\fR in the runlist described by the vfs inode \fIvi\fR\&. .PP If \fIcount\fR is -1, all clusters from \fIstart_vcn\fR to the end of the runlist are deallocated. Thus, to completely free all clusters in a runlist, use \fIstart_vcn\fR = 0 and \fIcount\fR = -1. .PP \fIis_rollback\fR should always be FALSE, it is for internal use to rollback errors. You probably want to use \fBntfs_cluster_free\fR instead. .PP Note, \fBntfs_cluster_free\fR does not modify the runlist at all, so the caller has to deal with it later. .PP Return the number of deallocated clusters (not counting sparse ones) on success and -errno on error. .SH "LOCKING" .PP - The runlist described by \fIvi\fR must be unlocked on entry and is unlocked on return. - This function takes the runlist lock of \fIvi\fR 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.