From be58b3b1f62e747b20dc36ddd6af05ad5fb4237a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Pierre=20Andr=C3=A9?= Date: Mon, 22 Apr 2013 19:14:48 +0200 Subject: [PATCH] Fixed usa checking by ntfsck on 4K sectors The usa sequence is used to make sure the sectors containing metadata are fully written. The values are always put at the end of 512-byte chunks even if the sectors are greater. --- ntfsprogs/ntfsck.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ntfsprogs/ntfsck.c b/ntfsprogs/ntfsck.c index 277beee6..27816019 100644 --- a/ntfsprogs/ntfsck.c +++ b/ntfsprogs/ntfsck.c @@ -616,9 +616,9 @@ static BOOL check_file_record(u8 *buffer, u16 buflen) // Remove update seq & check it. usa = *(u16*)(buffer+usa_ofs); // The value that should be at the end of every sector. - assert_u32_equal(usa_count-1, buflen/bytes_per_sector, "USA length"); + assert_u32_equal(usa_count-1, buflen/NTFS_BLOCK_SIZE, "USA length"); for (i=1;i