.\" 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 "GET_NR_FREE_CLUSTERS" "9" "09 October 2005" "" "" .SH NAME get_nr_free_clusters \- return the number of free clusters on a volume .SH SYNOPSIS "SYNOPSIS" .sp \fB .sp s64 get_nr_free_clusters (ntfs_volume * \fIvol\fB); \fR .SH "ARGUMENTS" .TP \fB\fIvol\fB\fR ntfs volume for which to obtain free cluster count .SH "DESCRIPTION" .PP Calculate the number of free clusters on the mounted NTFS volume \fIvol\fR\&. We actually calculate the number of clusters in use instead because this allows us to not care about partial pages as these will be just zero filled and hence not be counted as allocated clusters. .PP The only particularity is that clusters beyond the end of the logical ntfs volume will be marked as allocated to prevent errors which means we have to discount those at the end. This is important as the cluster bitmap always has a size in multiples of 8 bytes, i.e. up to 63 clusters could be outside the logical volume and marked in use when they are not as they do not exist. .PP If any pages cannot be read we assume all clusters in the erroring pages are in use. This means we return an underestimate on errors which is better than an overestimate.