Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2070934ybt; Thu, 2 Jul 2020 23:24:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJww3BTsPp8Pd68d9l3G0RNKxhW1sYPRu4BWUHxbeSw8iPEdFW1ZnT6hHP8K7hxbpsQw6/GG X-Received: by 2002:a17:906:e089:: with SMTP id gh9mr6815993ejb.482.1593757465951; Thu, 02 Jul 2020 23:24:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593757465; cv=none; d=google.com; s=arc-20160816; b=RJPIFOWsw+idVipsYXsDewp8a1prIhXJ7VaKiyw78lt6gl2pMsYa/W39/GpepkOzT5 lyAuJ3ur9UWtYAo5vydpL5P0IxifD4xRIGUaRs+Oqv27GWz25iSOip8LNc+SN0ksa7bb UfzB3K6141oF67Iz+1ZUTIs8zTbi2BOS3SfT3INRiSSRQF/z+CLCJSuxeorDNdz1IoC4 YK2zxNx+dC7x1jGXcgVfR0aJVblntIbAcGVEJX5IIMVjU0lcRso3LJDJAXGupq1lYMhX OvsIr7YvD9fxWVY6s/ghcGJ84xgehUl7wemfKiRwWNWR4Z4R2NPa4dsY+nJMimAw4gDw jZJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:user-agent :in-reply-to:mime-version:message-id:subject:cc:to:from:date :dkim-signature:dkim-filter; bh=wf+fydZyBcX1y3wQWBM/V8mRpwY1GdNat8dvYrhiqAQ=; b=kV4pJ+nE6hwK65Wwt3+rK7vAUNMlISNIQnx5XdAUlFNbcMi/uTDQzR5ko4H9X3HuOQ kmsyBFHSShA8EkeYmQtLIkhF+7ha3YoSB7cOw/PksWOhsoxsw5aFbruP3+RKOMJ71tVw MnN40EaqC6fLMvMpOAQfxXlUTuemWLAFURSypf3Q2TzrOlmNMamyvYMYh38bN7UXf2GF D1eaLmZ1jfSr4s01FZ2ZVT8jLVWrsgL0JOUOkESVM8fgI42enN9nhGHvCMfFQBwFT2wv a0scO0ICdXZVjv9RYiDkaRkj65ye6Ixzpb6B/TyYVXJcqeE3zBiCHMyJmsYyzB3wHCOl DodQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b="PBkD/F97"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b8si7533218edx.509.2020.07.02.23.24.03; Thu, 02 Jul 2020 23:24:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b="PBkD/F97"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726081AbgGCGXz (ORCPT + 99 others); Fri, 3 Jul 2020 02:23:55 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:53571 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725764AbgGCGXy (ORCPT ); Fri, 3 Jul 2020 02:23:54 -0400 Received: from epcas5p4.samsung.com (unknown [182.195.41.42]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20200703062353epoutp03c0428d2d1436096de3d08641a3b6b5bf~eKfD3DiIV2919929199epoutp03j for ; Fri, 3 Jul 2020 06:23:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20200703062353epoutp03c0428d2d1436096de3d08641a3b6b5bf~eKfD3DiIV2919929199epoutp03j DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1593757433; bh=wf+fydZyBcX1y3wQWBM/V8mRpwY1GdNat8dvYrhiqAQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=PBkD/F97m2A4l2lIIPz8RiaaLJZi07Rmo6G1BaCNJuDdrShUo3l1chv+UjgaL0Fs2 X819Nwyyu7E7ciyi/3Pwgroz7KM/Jti/QNx7iZruxtETtFBV510Ucf9ehINKqBIJvF 0smpzmtIb+LL+aFb1PG5KNBLStsbqvt+ecowrcIQ= Received: from epsmges5p2new.samsung.com (unknown [182.195.42.74]) by epcas5p2.samsung.com (KnoxPortal) with ESMTP id 20200703062352epcas5p25738828f4392f22d6038f378461d3048~eKfDaJNDR1329713297epcas5p2c; Fri, 3 Jul 2020 06:23:52 +0000 (GMT) Received: from epcas5p3.samsung.com ( [182.195.41.41]) by epsmges5p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 25.99.09703.8FECEFE5; Fri, 3 Jul 2020 15:23:52 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p1.samsung.com (KnoxPortal) with ESMTPA id 20200703062352epcas5p18d1fdaa1c52e3607dee464b6bdd8240f~eKfC-QTa60667506675epcas5p1D; Fri, 3 Jul 2020 06:23:52 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200703062352epsmtrp10b72ed0e345ed0f533408f527e7a7f67~eKfC_n0pw2823328233epsmtrp1l; Fri, 3 Jul 2020 06:23:52 +0000 (GMT) X-AuditID: b6c32a4a-4cbff700000025e7-e9-5efecef81535 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 36.03.08303.7FECEFE5; Fri, 3 Jul 2020 15:23:51 +0900 (KST) Received: from test-zns (unknown [107.110.206.5]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200703062350epsmtip26f4e374480b820059f7862f038499f0d~eKfBoKnIg2126121261epsmtip2m; Fri, 3 Jul 2020 06:23:50 +0000 (GMT) Date: Fri, 3 Jul 2020 11:50:55 +0530 From: Kanchan Joshi To: Damien Le Moal Cc: "axboe@kernel.dk" , "kbusch@kernel.org" , "linux-block@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "hch@lst.de" , Selvakumar S , Nitesh Shetty , Javier Gonzalez Subject: Re: [PATCH 1/2] block: fix error code for zone-append Message-ID: <20200703062055.GA26058@test-zns> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-Brightmail-Tracker: H4sIAAAAAAAAA02Se0hTcRTH+9273d0Jy9tMPCmtWlls0tTUuEUvqGiI9qCH9Foud/M915Zm L1hFqVkamqKjzGBZPrJaNkpT7IoNNUOxp5U500VlYQq1Flpt16D/Pud8zzlfvj9+JC4u5/uT idoDjF6rTpESXjxri0y20PlkQhXSYQmgq9/mE/SprO8YXVnditHv34wJ6AL2OaIbe4PonvqL BG39dRmnPzvbiFVCZU9nutJSlUMoG14ZCWVeXRVSjlkkyqzmXGwjscNrmYZJScxg9MErYr0S HGUFhG7IO7Pvjg0Z0SXRGSQkgQqHyis1vDPIixRTDQhuVHfjXDGK4HnJaz5XjCFw2L79VUjP yiPzFq5fjyDr7U+MKxwI8mxm5B7iUfPAmYO5kaBk0FWY7nabTsmhoumr5yZODWNw6qEVdws+ 1AooHijz3BdRC4GtOeRui6hp0FY6yHOzkNoNX66V8t3sS82FZqvNYwtUEQlGy28BF2cNFFd2 T7IPfLLVTbI/fMw/PckGcL1pxbnlbAQvjKU8TlgJ3Q/GMTfjVAK0/2AFHE+Fc78GMS68CLJP i7nxOdBXMMTn2A/sJeZJVsKofYDg3sSMQX9NO/88kpj+C2T6z4LjpZAzcoJv+muBUwFwbYLk UAY364PLEb8KzWB0htR4xhChW6RlDioM6lRDujZeEZeWakGeTySPv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zawHpRa3LvGpyW7aFD0zcetB qYV9TkGcU74FyvE+/eCxK0Zjlev17rvhloxRJ07c+XRAtWFq0cm1nrwlPmkKOms59gfp/5Sp 5ri94cPyVX3CpmcElxuLFZmeVfxcv+wu87fd87hyu/+t32Eyr+j3S9OCZ5EtLX6b2Y1OdQdl 3RLv/L2DR+DpRe72OcbrFeN2+x1a83nO8jNTOT5umPO9W6BV51lYlnh/0MoZk7yXz2bicKq1 Sru4SGHdlYSusoPJb55EOQsb8LJ/O/hqmfkW/xkbmbvmd/tvyLF8cf+ajs8p86z2aSFf0/64 uDFMfJ/kYHmo89mF+Z9ilViKMxINtZiLihMBMhlxePkCAAA= X-CMS-MailID: 20200703062352epcas5p18d1fdaa1c52e3607dee464b6bdd8240f X-Msg-Generator: CA Content-Type: multipart/mixed; boundary="----FBC7EIImzEv-3WQrgwRbJYn4xAlwhlhWWV1zALX9mq8rjZSB=_c4a69_" CMS-TYPE: 105P X-CMS-RootMailID: 20200702154208epcas5p39fe202f642a9d5c8dde9b911645c594c References: <1593704330-11540-1-git-send-email-joshi.k@samsung.com> <1593704330-11540-2-git-send-email-joshi.k@samsung.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ------FBC7EIImzEv-3WQrgwRbJYn4xAlwhlhWWV1zALX9mq8rjZSB=_c4a69_ Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Disposition: inline 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 >> Signed-off-by: Selvakumar S >> Signed-off-by: Nitesh Shetty >> Signed-off-by: Javier Gonzalez >> --- >> 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 Le Moal >Western Digital Research > ------FBC7EIImzEv-3WQrgwRbJYn4xAlwhlhWWV1zALX9mq8rjZSB=_c4a69_ Content-Type: text/plain; charset="utf-8" ------FBC7EIImzEv-3WQrgwRbJYn4xAlwhlhWWV1zALX9mq8rjZSB=_c4a69_--