linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Jason Yan <yanaijie@huawei.com>,
	linux-block@vger.kernel.org, viro@zeniv.linux.org.uk,
	linux-fsdevel@vger.kernel.org
Cc: miaoxie@huawei.com, zhaohongjiang@huawei.com,
	Christoph Hellwig <hch@lst.de>, Ming Lei <ming.lei@redhat.com>
Subject: Re: [PATCH v2] block: fix the return errno for direct IO
Date: Thu, 11 Apr 2019 21:22:33 -0600	[thread overview]
Message-ID: <1c494aba-2f6c-a6c0-4d86-82e54dabe581@kernel.dk> (raw)
In-Reply-To: <20190412020916.1160-1-yanaijie@huawei.com>

On 4/11/19 8:09 PM, Jason Yan wrote:
> If the last bio returned is not dio->bio, the status of the bio will
> not assigned to dio->bio if it is error. This will cause the whole IO
> status wrong.
> 
>     ksoftirqd/21-117   [021] ..s.  4017.966090:   8,0    C   N 4883648 [0]
>           <idle>-0     [018] ..s.  4017.970888:   8,0    C  WS 4924800 + 1024 [0]
>           <idle>-0     [018] ..s.  4017.970909:   8,0    D  WS 4935424 + 1024 [<idle>]
>           <idle>-0     [018] ..s.  4017.970924:   8,0    D  WS 4936448 + 321 [<idle>]
>     ksoftirqd/21-117   [021] ..s.  4017.995033:   8,0    C   R 4883648 + 336 [65475]
>     ksoftirqd/21-117   [021] d.s.  4018.001988: myprobe1: (blkdev_bio_end_io+0x0/0x168) bi_status=7
>     ksoftirqd/21-117   [021] d.s.  4018.001992: myprobe: (aio_complete_rw+0x0/0x148) x0=0xffff802f2595ad80 res=0x12a000 res2=0x0
> 
> We always have to assign bio->bi_status to dio->bio.bi_status because we
> will only check dio->bio.bi_status when we return the whole IO to
> the upper layer.

Looks good, thanks. Applide for 5.1, marked stable.

-- 
Jens Axboe


  parent reply	other threads:[~2019-04-12  3:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-12  2:09 [PATCH v2] block: fix the return errno for direct IO Jason Yan
2019-04-12  2:43 ` Ming Lei
2019-04-12  3:22 ` Jens Axboe [this message]
2019-04-12  3:37 ` Chaitanya Kulkarni

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=1c494aba-2f6c-a6c0-4d86-82e54dabe581@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=miaoxie@huawei.com \
    --cc=ming.lei@redhat.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=yanaijie@huawei.com \
    --cc=zhaohongjiang@huawei.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).