mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: David Howells <dhowells@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>,
	John Hubbard <jhubbard@nvidia.com>,
	David Hildenbrand <david@redhat.com>,
	syzbot <syzbot+a440341a59e3b7142895@syzkaller.appspotmail.com>,
	linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: How does ftruncate() interact with DIO read?
Date: Fri, 3 Feb 2023 17:31:07 +0100	[thread overview]
Message-ID: <20230203163107.GA4082@lst.de> (raw)
In-Reply-To: <2116614.1675441630@warthog.procyon.org.uk>

On Fri, Feb 03, 2023 at 04:27:10PM +0000, David Howells wrote:
> Hi Christoph,
> 
> What does ftruncate() do if there's a conflicting DIO read happening on the
> same file?  Does it cancel the bio?

There is no way to cancel a bio.  ->setattr is supposed to call
inode_dio_wait to wait for pending I/O, although some file systems
like btrfs have their own hand crafted and more complicated version
of that.

  reply	other threads:[~2023-02-03 16:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-01 10:04 [syzbot] general protection fault in skb_dequeue (3) syzbot
2023-02-02  8:52 ` David Howells
2023-02-02  9:02   ` David Hildenbrand
2023-02-02 15:15   ` David Howells
2023-02-03  2:54     ` John Hubbard
2023-02-03  8:36     ` David Howells
2023-02-03 14:36     ` David Howells
2023-02-03 16:23     ` David Howells
2023-02-03 16:27     ` How does ftruncate() interact with DIO read? David Howells
2023-02-03 16:31       ` Christoph Hellwig [this message]
2023-02-03 16:30     ` [syzbot] general protection fault in skb_dequeue (3) David Howells
2023-02-02 23:10   ` John Hubbard
2023-02-07 11:22 ` David Howells
2023-02-07 12:29   ` syzbot

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=20230203163107.GA4082@lst.de \
    --to=hch@lst.de \
    --cc=david@redhat.com \
    --cc=dhowells@redhat.com \
    --cc=jhubbard@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+a440341a59e3b7142895@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    /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

Powered by JetHome