-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Loss of data on copy to full partition #2829
Comments
Replying to onlyjob (#2829):
This is another bug that isn't related with copy/move file operation. See #2470 and #15. |
I see, thank you (somehow I didn't know about mcedit' save modes).
To avoid reporting two issues as one I should be better searching for corresponding ticket next time.
Cheers, |
Branch: 2829_copy_to_full_partition (parent: master). |
Thanks for the patch.
When copying one file to full partition a dialog "No space left on device (28)" appears.
When copying many files [Skip] also behaves like [Retry].
But the most unexpected thing happened when I tried to copy small file just about 12 KB: |
|
Replying to onlyjob:
Thanks for the feedback!
I don't have an unallocated free space on my hard drive to create small partition and test with it. But I tested my patch with two ways:
Unfortunately, I'm unable to reproduce and confirm none of you feedback issues.
Works as expected for me. "No space left on device (28)" error isn't appears again.
Cannot confirm.
Cannot confirm too. |
Replying to andrew_b:
That's what I did as well. I used ext4 partition of 80M.
Perhaps we're doing something in a different way. I noticed that some of the problems getting worse when there is no free space in partition whatsoever. If there are few KB still available errors may be harder to reproduce.
Also I was using 3.8.3 with patch I've made of your changeset.
I hope this may be of help. |
Do you use the "Preallocate space" option (Menu->Options->Configuration->File operation options)? |
Replying to andrew_b:
No, it is not in use. Sorry for not mentioning it. |
OK. I added the tweak commit [fddfb7bf96a2f76c28ac85352b7d96e58fddae21]. Please test it together with [6c59cff328bc0728cd9a4105b9b19bfd397422e8]. |
patch for 4.8.3 |
Andrew, it is perfect. Thank you.
Patch for 4.8.3 is attached.
Fantastic work. :) |
Thanks for test and feedback. My initial mistake was to use errno regardless of what mc_write() returned. If some function returns success value, it does't changes errno (and doesn't set it to 0). errno should be used if and only if function returns error. |
|
|
Merged to master: [af2fe31]. |
|
Important
This issue was migrated from Trac:
onlyjob
(@onlyjob)To reproduce:
If copying many files to partition with no free space, choosing "Skip All" may lead to weird condition when copying seemingly continue after filling all the space in partition but leaving zero-size files behind. (Consequences of move may be devastating)
Another manifestation of this problem is when you're editing the file on full partition with mcedit and add text to the beginning of file it may be trimmed to 4096 bytes and loose its tail on save.
See
Please advise.
Note
Original attachments:
onlyjob
(@onlyjob) onJun 24, 2012 at 10:02 UTC
The text was updated successfully, but these errors were encountered: