From: Christoph Hellwig <hch@lst.de>
To: Dave Chinner <david@fromorbit.com>
Cc: linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-block@vger.kernel.org, hch@lst.de, rdorr@microsoft.com
Subject: Re: [PATCH 2/3] iomap: iomap_dio_rw() handles all sync writes
Date: Wed, 28 Mar 2018 09:38:47 +0200 [thread overview]
Message-ID: <20180328073847.GC18726@lst.de> (raw)
In-Reply-To: <20180327070717.7107-3-david@fromorbit.com>
> @@ -769,12 +777,9 @@ static void iomap_dio_complete_work(struct work_struct *work)
> {
> struct iomap_dio *dio = container_of(work, struct iomap_dio, aio.work);
> struct kiocb *iocb = dio->iocb;
> - bool is_write = (dio->flags & IOMAP_DIO_WRITE);
> ssize_t ret;
>
> ret = iomap_dio_complete(dio);
> - if (is_write && ret > 0)
> - ret = generic_write_sync(iocb, ret);
> iocb->ki_complete(iocb, ret, 0);
Could be simplified to:
{
struct iomap_dio *dio = container_of(work, struct iomap_dio, aio.work);
iocb->ki_complete(dio->iocb, iomap_dio_complete(dio); 0);
}
Otherwise looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
next prev parent reply other threads:[~2018-03-28 7:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-27 7:07 [PATCH 0/3 V2] iomap: Use FUA for O_DSYNC DIO writes Dave Chinner
2018-03-27 7:07 ` [PATCH 1/3] xfs: move generic_write_sync calls inwards Dave Chinner
2018-03-28 7:36 ` Christoph Hellwig
2018-03-27 7:07 ` [PATCH 2/3] iomap: iomap_dio_rw() handles all sync writes Dave Chinner
2018-03-28 7:38 ` Christoph Hellwig [this message]
2018-03-28 7:44 ` Christoph Hellwig
2018-03-27 7:07 ` [PATCH 3/3] iomap: Use FUA for pure data O_DSYNC DIO writes Dave Chinner
2018-03-28 7:48 ` Christoph Hellwig
2018-05-02 5:38 [PATCH 0/3 v3] iomap: Use FUA for " Dave Chinner
2018-05-02 5:38 ` [PATCH 2/3] iomap: iomap_dio_rw() handles all sync writes Dave Chinner
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=20180328073847.GC18726@lst.de \
--to=hch@lst.de \
--cc=david@fromorbit.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=rdorr@microsoft.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;
as well as URLs for NNTP newsgroup(s).