All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cong Wang <amwang@redhat.com>
To: Pekka Enberg <penberg@kernel.org>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	Hugh Dickins <hughd@google.com>,
	linux-mm@kvack.org, kay.sievers@vrfy.org
Subject: Re: [Patch] tmpfs: add fallocate support
Date: Wed, 16 Nov 2011 15:09:52 +0800	[thread overview]
Message-ID: <4EC361C0.7040309@redhat.com> (raw)
In-Reply-To: <CAOJsxLEXbWbEhqX2YfzcQhyLJrY0H2ifCJCvGkoFHZsYAZEMPA@mail.gmail.com>

于 2011年11月15日 19:23, Pekka Enberg 写道:
> Hello,
>
> On Tue, Nov 15, 2011 at 10:42 AM, Amerigo Wang<amwang@redhat.com>  wrote:
>> This patch adds fallocate support to tmpfs. I tested this patch
>> with the following test case,
>>
>>         % sudo mount -t tmpfs -o size=100 tmpfs /mnt
>>         % touch /mnt/foobar
>>         % echo hi>  /mnt/foobar
>>         % fallocate -o 3 -l 5000 /mnt/foobar
>>         fallocate: /mnt/foobar: fallocate failed: No space left on device
>>         % fallocate -o 3 -l 3000 /mnt/foobar
>>         % ls -l /mnt/foobar
>>         -rw-rw-r-- 1 wangcong wangcong 3003 Nov 15 16:10 /mnt/foobar
>>         % dd if=/dev/zero of=/mnt/foobar seek=3 bs=1 count=3000
>>         3000+0 records in
>>         3000+0 records out
>>         3000 bytes (3.0 kB) copied, 0.0153224 s, 196 kB/s
>>         % hexdump -C /mnt/foobar
>>         00000000  68 69 0a 00 00 00 00 00  00 00 00 00 00 00 00 00  |hi..............|
>>         00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
>>         *
>>         00000bb0  00 00 00 00 00 00 00 00  00 00 00                 |...........|
>>         00000bbb
>>         % cat /mnt/foobar
>>         hi
>>
>> Signed-off-by: WANG Cong<amwang@redhat.com>
>
> What's the use case for this?
>

Hi, Pekka,

Systemd needs it, see http://lkml.org/lkml/2011/10/20/275.
I am adding Kay into Cc.

Thanks.

WARNING: multiple messages have this Message-ID (diff)
From: Cong Wang <amwang@redhat.com>
To: Pekka Enberg <penberg@kernel.org>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	Hugh Dickins <hughd@google.com>,
	linux-mm@kvack.org, kay.sievers@vrfy.org
Subject: Re: [Patch] tmpfs: add fallocate support
Date: Wed, 16 Nov 2011 15:09:52 +0800	[thread overview]
Message-ID: <4EC361C0.7040309@redhat.com> (raw)
In-Reply-To: <CAOJsxLEXbWbEhqX2YfzcQhyLJrY0H2ifCJCvGkoFHZsYAZEMPA@mail.gmail.com>

ao? 2011a1'11ae??15ae?JPY 19:23, Pekka Enberg a??e??:
> Hello,
>
> On Tue, Nov 15, 2011 at 10:42 AM, Amerigo Wang<amwang@redhat.com>  wrote:
>> This patch adds fallocate support to tmpfs. I tested this patch
>> with the following test case,
>>
>>         % sudo mount -t tmpfs -o size=100 tmpfs /mnt
>>         % touch /mnt/foobar
>>         % echo hi>  /mnt/foobar
>>         % fallocate -o 3 -l 5000 /mnt/foobar
>>         fallocate: /mnt/foobar: fallocate failed: No space left on device
>>         % fallocate -o 3 -l 3000 /mnt/foobar
>>         % ls -l /mnt/foobar
>>         -rw-rw-r-- 1 wangcong wangcong 3003 Nov 15 16:10 /mnt/foobar
>>         % dd if=/dev/zero of=/mnt/foobar seek=3 bs=1 count=3000
>>         3000+0 records in
>>         3000+0 records out
>>         3000 bytes (3.0 kB) copied, 0.0153224 s, 196 kB/s
>>         % hexdump -C /mnt/foobar
>>         00000000  68 69 0a 00 00 00 00 00  00 00 00 00 00 00 00 00  |hi..............|
>>         00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
>>         *
>>         00000bb0  00 00 00 00 00 00 00 00  00 00 00                 |...........|
>>         00000bbb
>>         % cat /mnt/foobar
>>         hi
>>
>> Signed-off-by: WANG Cong<amwang@redhat.com>
>
> What's the use case for this?
>

Hi, Pekka,

Systemd needs it, see http://lkml.org/lkml/2011/10/20/275.
I am adding Kay into Cc.

Thanks.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2011-11-16  7:10 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-15  8:42 [Patch] tmpfs: add fallocate support Amerigo Wang
2011-11-15  8:42 ` Amerigo Wang
2011-11-15 10:23 ` Cong Wang
2011-11-15 10:23   ` Cong Wang
2011-11-15 17:43   ` Dave Hansen
2011-11-15 17:43     ` Dave Hansen
2011-11-16  7:21     ` Cong Wang
2011-11-16  7:21       ` Cong Wang
2011-11-16 23:21       ` Dave Hansen
2011-11-16 23:21         ` Dave Hansen
2011-11-15 11:23 ` Pekka Enberg
2011-11-15 11:23   ` Pekka Enberg
2011-11-16  7:09   ` Cong Wang [this message]
2011-11-16  7:09     ` Cong Wang
2011-11-16  7:12     ` Pekka Enberg
2011-11-16  7:12       ` Pekka Enberg
2011-11-16  7:16       ` Cong Wang
2011-11-16  7:16         ` Cong Wang
2011-11-17  1:31         ` Hugh Dickins
2011-11-18 10:27           ` Cong Wang
2011-11-18 10:27             ` Cong Wang
2011-11-16  1:18 ` KAMEZAWA Hiroyuki
2011-11-16  1:18   ` KAMEZAWA Hiroyuki
2011-11-16  7:12   ` Cong Wang
2011-11-16  7:12     ` Cong Wang

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=4EC361C0.7040309@redhat.com \
    --to=amwang@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=hughd@google.com \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=penberg@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.