Opened 13 years ago

Last modified 7 years ago

#7903 assigned enhancement

Tracker/Installer Report File copy finish when File copys are not actually completed

Reported by: SeanCollins Owned by: nobody
Priority: normal Milestone: R1
Component: System/Kernel Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

I have been bitten by this numerous times, specifically when handling large file and installs to usb drives.Tracker and Installer both report finished file copy operations, that have not actually finished. I do not know if this behavior is tolerable as it can result in incomplete file transfers leading to fustrated users.

Using the sync command alleviates the issue of incomplete files copys. Tracker and Installer should only report a finished file copy operation, when it is actually completed.

Change History (6)

comment:1 by SeanCollins, 13 years ago

Component: Add-Ons/TrackerApplications/Tracker
Owner: changed from nobody to axeld

comment:2 by umccullough, 13 years ago

Priority: highnormal
Type: bugenhancement

Changing this to an enhancement request.

I know that's going to piss off a few people who have been bitten by this and don't understand why, but there's a simple reason why this happens:

The file cache reports that writes are complete before they actually are.

This is not specific to Haiku either - most OSes use cached I/O so that the user can continue with their work without waiting for the physical device to finish writing. Some will use different caching strategies for removable media, however.

I'm pretty sure with Windows 7 now, copying files to a removable USB device with Explorer doesn't prematurely claim that the copy is completed. I can often times remove a USB stick immediately once a write operation is complete without using the "remove device" tray icon. Perhaps we could adopt some similar mechanism for Tracker file copies? That's the one time when telling the user the copy operation is complete can yield unexpected loss of data.

in reply to:  2 comment:3 by SeanCollins, 13 years ago

Replying to umccullough:

Changing this to an enhancement request.

I know that's going to piss off a few people who have been bitten by this and don't understand why, but there's a simple reason why this happens:

The file cache reports that writes are complete before they actually are.

This is not specific to Haiku either - most OSes use cached I/O so that the user can continue with their work without waiting for the physical device to finish writing. Some will use different caching strategies for removable media, however.

I'm pretty sure with Windows 7 now, copying files to a removable USB device with Explorer doesn't prematurely claim that the copy is completed. I can often times remove a USB stick immediately once a write operation is complete without using the "remove device" tray icon. Perhaps we could adopt some similar mechanism for Tracker file copies? That's the one time when telling the user the copy operation is complete can yield unexpected loss of data.

I would be find it completely acceptable to only resolve the issue on removeable media, HDD docks though are a sticky one ?? But as for USB drives etc, yeah Haiku should not be reporting finished file copys, AFAIK WinXP SP3 does not have the partial copy behavior of SP1 and some version of SP2 with regards to reporting finished files copys.

I also understand your point about cached I/O and disk performance. Both totally valid reasons to keep the current scheme. Given the effect however on USB and other easily removed storage, I think in those instances the current design is broken.

Thank you for taking the time to reply. I had a sneaking suspicion that your reply would be what it was.

comment:4 by anevilyak, 13 years ago

Component: Applications/TrackerSystem/Kernel
Version: R1/alpha3R1/Development

comment:5 by axeld, 13 years ago

That feature was already available in earlier Windows versions, it was just disabled by default. In any case, that's something to be solved at the kernel level (or when a device is mounted) - it would need to detect that this is a removable device that is only needed temporarily, and use a write-through cache in this case.

And yes, it's indeed an enhancement.

comment:6 by axeld, 7 years ago

Owner: changed from axeld to nobody
Status: newassigned
Note: See TracTickets for help on using tickets.