Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:75331 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 7144 invoked from network); 8 Jul 2014 06:52:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Jul 2014 06:52:56 -0000 Authentication-Results: pb1.pair.com header.from=mike.php.net@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=mike.php.net@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.54 as permitted sender) X-PHP-List-Original-Sender: mike.php.net@gmail.com X-Host-Fingerprint: 209.85.215.54 mail-la0-f54.google.com Received: from [209.85.215.54] ([209.85.215.54:50370] helo=mail-la0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B3/B0-03372-7459BB35 for ; Tue, 08 Jul 2014 02:52:55 -0400 Received: by mail-la0-f54.google.com with SMTP id mc6so3685813lab.27 for ; Mon, 07 Jul 2014 23:52:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=jVkZDsDmnRhl3o7jdVXltwPqsGpBdAzLY5vvhYMyJhs=; b=opuFC2EjX3MRTqVs5YiNLdaFwzm0/Xh7uuutA5cvcsj4ccxIoUlYBDqYX72rMw1iMS qE/qQwUIS5eXh81kSyVT2CMxWalB6fVNZVmYdd1RUnO/bWZLuP8RW3EfI9UPehu/D98Q uZHgPFS6KeRZG9Xnttu6oN+n8g5F1IK4TCWp+zL9NQg5E/lq+ho8aX/Fb0DYukrp5NCJ 2EzyH6zbFfdN3k0P7HtnpjVbrwfj+rWJOQJp82esXbR4fIcoAJ86llv/owDcS7rO6HL4 hLqx/lJFpk53tsb9YoBCFsyXok89gH8XNg7yq3VNko0nHrl6K4tCwBNYr8H451AD/8sG sMHA== MIME-Version: 1.0 X-Received: by 10.112.138.134 with SMTP id qq6mr545624lbb.70.1404802372397; Mon, 07 Jul 2014 23:52:52 -0700 (PDT) Sender: mike.php.net@gmail.com Received: by 10.114.19.10 with HTTP; Mon, 7 Jul 2014 23:52:52 -0700 (PDT) In-Reply-To: <39a433499b80ad70849e642f9e355167.squirrel@webmail.klapt.com> References: <39a433499b80ad70849e642f9e355167.squirrel@webmail.klapt.com> Date: Tue, 8 Jul 2014 08:52:52 +0200 X-Google-Sender-Auth: yyHAFix8DvCPsuYnDq_1m4_f4Hg Message-ID: To: Anatol Belski Cc: Julien Pauli , PHP Internals Content-Type: multipart/alternative; boundary=089e0118366662efe704fda90a47 Subject: Re: [PHP-DEV] Implemented fallocate() syscall in streams From: mike@php.net (Michael Wallner) --089e0118366662efe704fda90a47 Content-Type: text/plain; charset=UTF-8 On 8 July 2014 08:42, Anatol Belski wrote: > Hi Julien, > > On Fri, June 13, 2014 16:20, Julien Pauli wrote: > > Hi, > > > > > > I just wrote a patch to add fallocate() syscall support for streams. > > It relies on posix_fallocate(), so that it should support many Unixes. > > Linux's got a specification with a fallocate() function, more powerful > > than the posix call. > > > Nice! > I propose two APIs for PHP : > > - One that adds a function : fallocate() > > https://github.com/jpauli/php-src/tree/fallocate > > > > > > - One that relies on ftruncate() , and adds a $use_fallocate > > flag https://github.com/jpauli/php-src/tree/fallocate_flag > > > > Please, note that the latest proposal requires patches in different > > extensions, as I changed a PHP_API function signature. > > I'd prefer the first option. > > I don't know if Windows can support that. Pierre, Anatol ? :-) > > > > > > Tests are beeing written at the moment. > > > > > > I didn't implement this is user stream handlers, as this really is a > > low level implementation design that is kind of useless for usage in user > > streams. > > > > Thoughts ? > > > I've found this code > > > http://hg.mozilla.org/mozilla-central/file/3d846420a907/xpcom/glue/FileUtils.cpp#l61 Very good catch! -- Regards, Mike --089e0118366662efe704fda90a47--