From: Christoph Hellwig <hch@infradead.org> To: Jonathan Nicklin <jnicklin@blockbridge.com> Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: BUG: aio/direct-io data corruption in 4.7 Date: Wed, 21 Sep 2016 07:15:39 -0700 Message-ID: <20160921141539.GA17898@infradead.org> (raw) In-Reply-To: <CAHex0corhi5He41qdenWovgkVyD5Rpj0YLxeN+-ex4cOycqKdQ@mail.gmail.com> Hi Jonathan, please keep linux-fsdevel on the Cc list for something like, and if you already track down a commit the author of that commit. > Description: "fs: simplify the generic_write_sync prototype" > Committed: Apr 7, 2016 > Hash: e259221763a40403d5bb232209998e8c45804ab8 > Affects: 4.7-rc1 - master > > I have confirmed a fix for the AIO/Direct-IO failure condition but > have not reviewed the rest of the changes associated with that commit. > If you would like a small patch for direct-io.c, let me know. On travel right now, but I suspect you want something like this fix? diff --git a/fs/direct-io.c b/fs/direct-io.c index 7c3ce73..891f71f 100644 --- a/fs/direct-io.c +++ b/fs/direct-io.c @@ -276,7 +276,7 @@ static ssize_t dio_complete(struct dio *dio, ssize_t ret, bool is_async) dio->iocb->ki_pos += transferred; if (dio->op == REQ_OP_WRITE) - ret = generic_write_sync(dio->iocb, transferred); + ret = generic_write_sync(dio->iocb, ret); dio->iocb->ki_complete(dio->iocb, ret, 0); }
next prev parent reply index Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-09-12 18:38 Jonathan Nicklin 2016-09-21 14:15 ` Christoph Hellwig [this message] 2018-11-05 15:16 Gregory Shapiro 2018-11-06 7:28 ` Jack Wang 2018-11-06 11:31 ` Gregory Shapiro 2018-11-09 15:44 ` Jack 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=20160921141539.GA17898@infradead.org \ --to=hch@infradead.org \ --cc=jnicklin@blockbridge.com \ --cc=linux-fsdevel@vger.kernel.org \ --cc=linux-kernel@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
LKML Archive on lore.kernel.org Archives are clonable: git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git git clone --mirror https://lore.kernel.org/lkml/8 lkml/git/8.git git clone --mirror https://lore.kernel.org/lkml/9 lkml/git/9.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \ linux-kernel@vger.kernel.org public-inbox-index lkml Example config snippet for mirrors Newsgroup available over NNTP: nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel AGPL code for this site: git clone https://public-inbox.org/public-inbox.git