Upgraded to v1.1004

N2009_11_14_FIXES
jpandre 2007-10-06 14:48:10 +00:00
parent b0f972c764
commit 13a68a1864
3 changed files with 12 additions and 3 deletions

View File

@ -51,7 +51,7 @@
* the update of the mapping pairs which converges to the cubic Faulhaber's
* formula as the function of the number of extents (fragments, runs).
*/
#define NTFS_LCNALLOC_BSIZE 8192
#define NTFS_LCNALLOC_BSIZE 4096
#define NTFS_LCNALLOC_SKIP NTFS_LCNALLOC_BSIZE
static void ntfs_cluster_set_zone_pos(LCN start, LCN end, LCN *pos, LCN tc)
@ -89,6 +89,11 @@ static s64 max_empty_bit_range(unsigned char *buf, int size)
for (i = 0; i < size; i++, buf++) {
if (*buf == 0) {
run += 8;
continue;
}
for (j = 0; j < 8; j++) {
int bit = *buf & (1 << j);

View File

@ -797,6 +797,7 @@ static int ntfs_mft_bitmap_extend_initialized(ntfs_volume *vol)
ll = ntfs_attr_pwrite(mftbmp_na, old_initialized_size, 8, &ll);
if (ll == 8) {
ntfs_log_debug("Wrote eight initialized bytes to mft bitmap.\n");
vol->free_mft_records += (8 * 8);
return 0;
}
ntfs_log_error("Failed to write to mft bitmap.\n");
@ -1440,6 +1441,7 @@ found_free_rec:
/* Return the opened, allocated inode of the allocated mft record. */
ntfs_log_debug("Returning opened, allocated %sinode 0x%llx.\n",
base_ni ? "extent " : "", (long long)bit);
vol->free_mft_records--;
return ni;
undo_mftbmp_alloc:
@ -1508,8 +1510,10 @@ int ntfs_mft_record_free(ntfs_volume *vol, ntfs_inode *ni)
}
/* Throw away the now freed inode. */
if (!ntfs_inode_close(ni))
if (!ntfs_inode_close(ni)) {
vol->free_mft_records++;
return 0;
}
err = errno;
/* Rollback what we did... */

View File

@ -681,7 +681,7 @@ static int ntfs_volume_check_hiberfile(ntfs_volume *vol)
{
ntfs_inode *ni;
ntfs_attr *na = NULL;
int i, bytes_read, err;
int bytes_read, err;
char *buf = NULL;
ni = ntfs_hiberfile_open(vol);