From e71da36cde7b8ac41bf5a2bf531bfc0611895b36 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Sun, 24 Jul 2016 17:22:09 -0700 Subject: [PATCH] ntfs-3g_apply.c: note version in which ntfs_attr_pwrite() was fixed --- src/ntfs-3g_apply.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/ntfs-3g_apply.c b/src/ntfs-3g_apply.c index acf1b954..486f8890 100644 --- a/src/ntfs-3g_apply.c +++ b/src/ntfs-3g_apply.c @@ -805,11 +805,14 @@ out: return ret; } -/* Note: contrary to its documentation, ntfs_attr_pwrite() can return a short - * count in non-error cases --- specifically, when writing to a compressed - * attribute and the requested count exceeds the size of an NTFS "compression - * block". Therefore, we must continue calling ntfs_attr_pwrite() until all - * bytes have been written or a real error has occurred. */ +/* + * Note: prior to NTFS-3G version 2016.2.22, ntfs_attr_pwrite() could return a + * short count in non-error cases, contrary to its documentation. Specifically, + * a short count could be returned when writing to a compressed attribute and + * the requested count exceeded the size of an NTFS "compression block". + * Therefore, we must continue calling ntfs_attr_pwrite() until all bytes have + * been written or a real error has occurred. + */ static bool ntfs_3g_full_pwrite(ntfs_attr *na, u64 offset, size_t size, const u8 *data) { -- 2.43.0