public inbox for linux-f2fs-devel@lists.sourceforge.net
 help / color / mirror / Atom feed
From: Chao Yu <chao@kernel.org>
To: Jack Qiu <jack.qiu@huawei.com>, linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH] f2fs: correct statistic of APP_DIRECT_IO
Date: Sun, 30 Aug 2020 11:38:44 +0800	[thread overview]
Message-ID: <3eeb2066-cf73-1b96-2e0c-cfad33df5987@kernel.org> (raw)
In-Reply-To: <20200829100552.29043-1-jack.qiu@huawei.com>

On 2020-8-29 18:05, Jack Qiu wrote:
> Miss to update APP_DIRECT_IO when receiving async DIO. For example:
> fio -filename=/data/test.0 -bs=1m -ioengine=libaio -direct=1
> 	-name=fill -size=10m -numjobs=1 -iodepth=32 -rw=write
>
> Signed-off-by: Jack Qiu <jack.qiu@huawei.com>
> ---
>  fs/f2fs/data.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
> index a19e2a7891f3..f9f25bc52487 100644
> --- a/fs/f2fs/data.c
> +++ b/fs/f2fs/data.c
> @@ -3671,12 +3671,18 @@ static ssize_t f2fs_direct_IO(struct kiocb *iocb, struct iov_iter *iter)
>  									err);
>  			if (!do_opu)
>  				set_inode_flag(inode, FI_UPDATE_WRITE);
> +		} else if (err == -EIOCBQUEUED) {
> +			f2fs_update_iostat(F2FS_I_SB(inode), APP_DIRECT_IO,
> +						count - iov_iter_count(iter));
>  		} else if (err < 0) {
>  			f2fs_write_failed(mapping, offset + count);
>  		}
>  	} else {
>  		if (err > 0)
>  			f2fs_update_iostat(sbi, APP_DIRECT_READ_IO, err);
> +		else if (err == -EIOCBQUEUED)
> +			f2fs_update_iostat(F2FS_I_SB(inode), APP_DIRECT_IO,

APP_DIRECT_READ_IO

Thanks,

> +						count - iov_iter_count(iter));
>  	}
>
>  out:
> --
> 2.17.1
>
>
>
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
>


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

      reply	other threads:[~2020-08-30  3:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-29 10:05 [f2fs-dev] [PATCH] f2fs: correct statistic of APP_DIRECT_IO Jack Qiu
2020-08-30  3:38 ` Chao Yu [this message]

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=3eeb2066-cf73-1b96-2e0c-cfad33df5987@kernel.org \
    --to=chao@kernel.org \
    --cc=jack.qiu@huawei.com \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    /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