From: Rodrigo Campos <rodrigo@sdfg.com.ar>
To: Karel Zak <kzak@redhat.com>
Cc: util-linux@vger.kernel.org
Subject: Re: [PATCH v3] fallocate: Add "--dig-holes" option
Date: Mon, 17 Feb 2014 14:15:29 +0000 [thread overview]
Message-ID: <20140217141529.GA29685@sdfg.com.ar> (raw)
In-Reply-To: <20140217103248.GA2254@x2.net.home>
On Mon, Feb 17, 2014 at 11:32:48AM +0100, Karel Zak wrote:
> On Fri, Feb 14, 2014 at 11:47:56AM +0100, Karel Zak wrote:
> > On Sun, Jan 26, 2014 at 03:06:50PM +0000, Rodrigo Campos wrote:
> > > bash-completion/fallocate | 2 +-
> > > sys-utils/fallocate.1 | 19 +++++++-
> > > sys-utils/fallocate.c | 114 ++++++++++++++++++++++++++++++++++++++++------
> > > 3 files changed, 120 insertions(+), 15 deletions(-)
> >
> > Applied with some changes and I believe that the code still need some
> > improvements, see below
>
>
> OK, I did some changes to the code:
>
> The minimal hole size is based on filesystem blocksize (st_blksize) and
> --length is no more used for this thing. I think it's better to use
This was not updated in the manpage, where it shows the run modes. It still
says on the top "fallocate -d [-l length] filename"
> buffer size which "just works" than expect any input from users. It
> also dramatically simplify the code and the command semantic.
I looked at the code and this is probably too personal :)
>
> The original 32K is too large, I guess that we prefer optimal sparse
> files rather than --dig-hole speed. (And it isn't so slow with 4KiB
> chunks.)
>
> Now the --offset and --length options are used as usually to specify
> an area with in the file.
>
>
> $ ls -lash yyy
> 1.1G -rw-rw-r-- 1 kzak kzak 1.0G Feb 17 11:09 yyy
> ^^^^
>
> $ time ./fallocate --dig-holes yyy
> real 0m0.393s
> user 0m0.045s
> sys 0m0.345s
>
> $ ls -lash yyy
> 28K -rw-rw-r-- 1 kzak kzak 1.0G Feb 17 11:10 yyy
> ^^^
How did you create the file ? With fallocate ? Is it all zeros ? If it's all
zeros, 28K used seems like a bug maybe ?
Any comparisson to see how much it took before (to see the improvement or the
slowdown) seems interesting. But, in any case, it doesn't seem *too* slow
(although 1GB is kind of a small file), and maybe is even faster :)
I can't test it in my new laptop because it fails to compile (autogen and
configure run fine). It throws:
rm -f ca.gmo && : -c --statistics --verbose -o ca.gmo ca.po
mv: cannot stat ‘t-ca.gmo’: No such file or directory
make[3]: *** [ca.gmo] Error 1
is this a known issue ?
Thanks a lot,
Rodrigo
next prev parent reply other threads:[~2014-02-17 14:15 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-25 19:17 fallocate: Add "--dig-holes" options and minor fixes Rodrigo Campos
2014-01-25 19:17 ` [PATCH 1/3] fallocate: Clarify that space can also be deallocated Rodrigo Campos
2014-01-25 19:17 ` [PATCH 2/3] fallocate: Hide #ifdef tricks to call fallocate in a function Rodrigo Campos
2014-01-25 19:17 ` [PATCH 3/3] fallocate: Add "--dig-holes" option Rodrigo Campos
2014-01-26 14:43 ` [PATCH v2] " Rodrigo Campos
2014-01-26 15:06 ` [PATCH v3] " Rodrigo Campos
2014-02-14 10:47 ` Karel Zak
2014-02-14 11:34 ` Karel Zak
2014-02-14 13:16 ` Rodrigo Campos
2014-02-14 13:07 ` Rodrigo Campos
2014-02-14 13:30 ` Karel Zak
2014-02-14 13:35 ` Rodrigo Campos
2014-02-17 10:32 ` Karel Zak
2014-02-17 14:15 ` Rodrigo Campos [this message]
2014-02-17 14:49 ` Karel Zak
2014-02-17 15:42 ` Rodrigo Campos
2014-01-25 19:23 ` fallocate: Add "--dig-holes" options and minor fixes Rodrigo Campos
[not found] ` <20140201040414.GA23360@sdfg.com.ar>
2014-02-11 11:31 ` Rodrigo Campos
2014-02-11 18:34 ` Karel Zak
2014-02-11 18:43 ` Rodrigo Campos
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=20140217141529.GA29685@sdfg.com.ar \
--to=rodrigo@sdfg.com.ar \
--cc=kzak@redhat.com \
--cc=util-linux@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.