errors for NTFS restore and imagefile write

Bug #250136 reported by Gene Czarcinski
2
Affects Status Importance Assigned to Milestone
partimage-ng
New
Undecided
Unassigned

Bug Description

When I saw that partimage-ng did not detect when writing of the imagefile was "out of space" on the output device, I saw that the problem was that ENOSPC errors were being ignored in write() ... the fix, well, delete that code which I posted in r117 of devel-gc1.

Fast forward to a current effort of mine: use ntfs-3g (libntfs-3g) instead of ntfsprogs (libntfs). My first testing failed! So I backed off all the way to r116 and that worked. I soon found that ignoring ENOSPC was there for a reason ... the last block write for an ntfs partition is a "short write" (it tries to write outside of the partition boundary).

Now the perfect fix would be do redo a lot of code so that the "short write" never happens. However, the old approach of ignoring ENOSPC is a "good enough" solution for ntfs partitions and the update in r117 has been backed off (old code restored) to fileio.cpp in r135 of devel-gc1.

But there is still the problem of detecting when writing imagefile is "out of space". The solution is to add a little code to savePartitionSnapshot() in imager.cpp. This code checks to see if the number of bytes written is less that specified and, if it is less, fail with an error message. This update is also in r135 of devel-gc1.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.