| To: | DS <xfs@xxxxxxxxxxxx> |
|---|---|
| Subject: | Re: is the flush-on-close-after-truncate still needed? |
| From: | Eric Sandeen <sandeen@xxxxxxxxxxx> |
| Date: | Thu, 26 Jun 2008 16:24:42 -0500 |
| Cc: | xfs@xxxxxxxxxxx |
| In-reply-to: | <486407EB.70703@sandeen.net> |
| References: | <4859415B.3000009@sandeen.net> <200806181049.07812.dchinner@agami.com> <20080626210904.GA15920@bob.dscon.sk> <486407EB.70703@sandeen.net> |
| Sender: | xfs-bounce@xxxxxxxxxxx |
| User-agent: | Thunderbird 2.0.0.14 (X11/20080501) |
Eric Sandeen wrote:
> DS wrote:
>> Hmm, but file overwrite in perl/php is slow, very slow.
>
> If you have control over your perl/php, perhaps you can change it to do
> unlink/create/write instead of truncate/write?
Or even:
--- test.perl.orig 2008-06-26 16:22:48.163869293 -0500
+++ test.perl 2008-06-26 16:23:25.426869060 -0500
@@ -3,7 +3,7 @@
$time=time();
for ($i=1;$i<100;$i++)
{
-open (SUBOR,">$i.txt");
+open (SUBOR,"+<$i.txt");
print SUBOR "aaaaaaaaaaaaaaaaaaa\n";
close (SUBOR);
print "WRITE $i. FILE\n";
which gives you RW access, but does not do the truncate.
Or use sysopen. Or ...
-Eric
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: is the flush-on-close-after-truncate still needed?, Eric Sandeen |
|---|---|
| Next by Date: | Re: TAKE 976035 - streamline init/exit path, Dave Chinner |
| Previous by Thread: | Re: is the flush-on-close-after-truncate still needed?, Eric Sandeen |
| Next by Thread: | Re: is the flush-on-close-after-truncate still needed?, DS |
| Indexes: | [Date] [Thread] [Top] [All Lists] |