Red Hat Bugzilla – Bug 765363
zero byte files when perl search and replace script
Last modified: 2015-12-01 11:45:32 EST
Reported on a user mailing list. When perl search and replace string command is used, it created zero byte files. Happens only when executed manually but works fine when executed within a script.
This issue is not seen with quick-read disabled.
echo 'test' > dot
perl -i -pe 's/test/somethingelse/' dot
ls -lh dot
-rw-r--r-- 1 root root 0 2011-09-26 11:43 dot
Patch sent, waiting for it to be pulled in.
please work on review comments and resubmit.
CHANGE: http://review.gluster.com/506 (performance/quick-read: make unlink aware of open-behind behaviour of quick-read.) merged in master by Vijay Bellur (email@example.com)
CHANGE: http://review.gluster.com/3028 (performance/quick-read: fix build errors.) merged in master by Vijay Bellur (firstname.lastname@example.org)
*** Bug 800381 has been marked as a duplicate of this bug. ***
Verified in the mainline [fbfb4d48491b160436e6ac986057a8fe5e320502]