v9fs.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Itaru Kitayama <itaru.kitayama@linux.dev>
To: v9fs@lists.linux.dev
Subject: ftruncate fails
Date: Mon, 8 Apr 2024 10:44:51 +0900	[thread overview]
Message-ID: <E7D462A2-EE93-4A57-9F15-8565EE1567F3@linux.dev> (raw)

Hi,
With a recent kernel I see below program fails (Bus error) if executed from 9p mounted directory, not with the local filesystem (Ext4).


#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/syscall.h>
#include <linux/memfd.h>

int main() {
        char filename[] = __FILE__"_tmpfile_XXXXXX";
        int fd, size;
        size = getpagesize();
        fd = mkstemp(filename);
        if (ftruncate(fd, size)) {
                printf("error");
        }


}

             reply	other threads:[~2024-04-08  1:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-08  1:44 Itaru Kitayama [this message]
2024-04-08  2:01 ` ftruncate fails Dominique Martinet
2024-04-08  2:08   ` Itaru Kitayama
2024-04-08  2:22     ` Itaru Kitayama
2024-04-08  4:07       ` Dominique Martinet
2024-04-16 14:16       ` Eric Van Hensbergen
2024-04-12 20:36         ` Itaru Kitayama
2024-04-17  0:20           ` Eric Van Hensbergen
2024-04-17  0:25             ` Itaru Kitayama
2024-04-17  0:41               ` Eric Van Hensbergen

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=E7D462A2-EE93-4A57-9F15-8565EE1567F3@linux.dev \
    --to=itaru.kitayama@linux.dev \
    --cc=v9fs@lists.linux.dev \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).