linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: 陈国祺 <chenguoqic@163.com>
To: linux-mm@kvack.org
Cc: chenhuacai@loongson.cn, wangrui@loongson.cn
Subject: [BUG] tmpfs:losing data when preallocating space multiple times with fallocate
Date: Mon, 31 Oct 2022 23:13:20 +0800 (CST)	[thread overview]
Message-ID: <33b85d82.7764.1842e9ab207.Coremail.chenguoqic@163.com> (raw)


Hi, all

When using the system call fallocate to pre-allocate more space on the tmpfs file
system, if the kernel returns an error EINTR, the original data on the file will
be lost (it seems to be the beginning of the file every time, the size is one page).

- Test case: https://github.com/abner-chenc/abner/blob/master/fallocate.c
- Kernel commit: b229b6ca5abbd63ff40c1396095b1b36b18139c3
- Arch: x86, loongarch64


                 reply	other threads:[~2022-10-31 15:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=33b85d82.7764.1842e9ab207.Coremail.chenguoqic@163.com \
    --to=chenguoqic@163.com \
    --cc=chenhuacai@loongson.cn \
    --cc=linux-mm@kvack.org \
    --cc=wangrui@loongson.cn \
    /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;
as well as URLs for NNTP newsgroup(s).