I made a nandroid backup with TWRP 3.0.2 on Sony Xperia M4 Aqua. When I tried to restore it, TWRP reported error 255 while restoring system partition. Upon closer examination, I realized that the size of backup is actually larger than available space on system partition. Available space after formatting is 2432MB, while backup size is 2483MB - 51MB larger.
As I understand, nandroid backup is actually a TAR archive of all files in a single partition, so I can't imagine a scenario under which this is possible. Partitions certainly weren't resized in the mean time. And I am certain the partition wasn't even close to full, because I already uninstalled many system apps using Link2SD. TWRP bug comes to mind, but while parsing the backup archive, I can't spot anything that doesn't belong there. Any ideas how this could happen? Could this be something Sony-specific?
EDIT: If someone finds themselves in similar situation, I found a workaround. I located some non-essential files inside the archive and deleted them using IZArc utility in Windows. I then copied the archive back to phone and this time restore went through. The mystery still remains, how could TAR create an archive larger than the original.