public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: DS <xfs@bob.dscon.sk>
Cc: xfs@oss.sgi.com
Subject: Re: is the flush-on-close-after-truncate still needed?
Date: Thu, 26 Jun 2008 16:24:42 -0500	[thread overview]
Message-ID: <4864091A.9010206@sandeen.net> (raw)
In-Reply-To: <486407EB.70703@sandeen.net>

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

  reply	other threads:[~2008-06-26 21:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-18 17:09 is the flush-on-close-after-truncate still needed? Eric Sandeen
2008-06-18 17:49 ` Dave Chinner
2008-06-18 17:59   ` Eric Sandeen
2008-06-26 21:09   ` DS
2008-06-26 21:19     ` Eric Sandeen
2008-06-26 21:24       ` Eric Sandeen [this message]
2008-06-27  7:13       ` DS
2008-06-27  7:28         ` Dave Chinner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4864091A.9010206@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=xfs@bob.dscon.sk \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox