linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kanchan Joshi <joshi.k@samsung.com>
To: Damien Le Moal <Damien.LeMoal@wdc.com>
Cc: "axboe@kernel.dk" <axboe@kernel.dk>,
	"kbusch@kernel.org" <kbusch@kernel.org>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"hch@lst.de" <hch@lst.de>,
	Selvakumar S <selvakuma.s1@samsung.com>,
	Nitesh Shetty <nj.shetty@samsung.com>,
	Javier Gonzalez <javier.gonz@samsung.com>
Subject: Re: [PATCH 1/2] block: fix error code for zone-append
Date: Fri, 3 Jul 2020 11:50:55 +0530	[thread overview]
Message-ID: <20200703062055.GA26058@test-zns> (raw)
In-Reply-To: <CY4PR04MB3751B8037BE65D573667A6D5E76A0@CY4PR04MB3751.namprd04.prod.outlook.com>

[-- Attachment #1: Type: text/plain, Size: 1643 bytes --]

On Fri, Jul 03, 2020 at 05:29:50AM +0000, Damien Le Moal wrote:
>On 2020/07/03 0:42, Kanchan Joshi wrote:
>> avoid returning success when it should report failure, preventing
>> odd behavior in caller.
>
>You can be more precise here: the odd behavior is an infinite loop in
>bio_iov_iter_get_pages() whcih is is the only user of __bio_iov_append_get_pages().
Sure. Kept that in cover letter, but missed here.
>>
>> Signed-off-by: Kanchan Joshi <joshi.k@samsung.com>
>> Signed-off-by: Selvakumar S <selvakuma.s1@samsung.com>
>> Signed-off-by: Nitesh Shetty <nj.shetty@samsung.com>
>> Signed-off-by: Javier Gonzalez <javier.gonz@samsung.com>
>> ---
>>  block/bio.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/block/bio.c b/block/bio.c
>> index a7366c0..0cecdbc 100644
>> --- a/block/bio.c
>> +++ b/block/bio.c
>> @@ -1044,7 +1044,7 @@ static int __bio_iov_append_get_pages(struct bio *bio, struct iov_iter *iter)
>>  	size_t offset;
>>
>>  	if (WARN_ON_ONCE(!max_append_sectors))
>> -		return 0;
>> +		return -EINVAL;
>>
>>  	/*
>>  	 * Move page array up in the allocated memory for the bio vecs as far as
>>
>
>Note: the odd behavior mentioned in the commit message cannot currently be
>triggered since only zonefs issues REQ_OP_ZONE_APPEND BIOs so we are guaranteed
>that max_append_sectors is not 0 in that case. But this fix certainly makes
>things more solid. So:
Yes, zonefs will not run into this. Future users of zone-append may. I
encountered this endless loop while testing user zone-append path.
>Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
>
>-- 
>Damien Le Moal
>Western Digital Research
>

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2020-07-03  6:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20200702154204epcas5p15106774a3d556b77050710722da89922@epcas5p1.samsung.com>
2020-07-02 15:38 ` [PATCH 0/2] fix/extend zone-append in block-layer Kanchan Joshi
     [not found]   ` <CGME20200702154208epcas5p39fe202f642a9d5c8dde9b911645c594c@epcas5p3.samsung.com>
2020-07-02 15:38     ` [PATCH 1/2] block: fix error code for zone-append Kanchan Joshi
2020-07-03  5:29       ` Damien Le Moal
2020-07-03  6:20         ` Kanchan Joshi [this message]
     [not found]   ` <CGME20200702154213epcas5p4e8d42861cb5ae91ddeccf1ed73107304@epcas5p4.samsung.com>
2020-07-02 15:38     ` [PATCH 2/2] block: enable zone-append for iov_iter of bvec type Kanchan Joshi
2020-07-03  5:32       ` Damien Le Moal
2020-07-03  6:53         ` Kanchan Joshi
2020-07-03  8:07           ` Damien Le Moal
2020-07-03 13:02           ` Johannes Thumshirn

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=20200703062055.GA26058@test-zns \
    --to=joshi.k@samsung.com \
    --cc=Damien.LeMoal@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=javier.gonz@samsung.com \
    --cc=kbusch@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nj.shetty@samsung.com \
    --cc=selvakuma.s1@samsung.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).