Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4842929pxj; Tue, 22 Jun 2021 09:11:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6y3Vvi2zP6F30plNLQ0zOlVxuumq7IV6f4b9RbaFDrfs3WJoSA8TlP3Br0v+XCeu4B/Ph X-Received: by 2002:a92:690d:: with SMTP id e13mr3150942ilc.257.1624378314593; Tue, 22 Jun 2021 09:11:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624378314; cv=none; d=google.com; s=arc-20160816; b=Mbg5RFaWGEVjmqxPYywxKKfiVKAsYE80DYiPVwOW7194EylFU1IB+6tzBkYZFrZ7ON nGijUnyT5OyF2jX2RxLgcxlYAG0aWZoElZss2iSaa8Sh+PcJCtxLvt9kGngNwSNZevUU aVJsDXlQ9GGhrnIqhlcnfE8O6i8tTBXltVXE+XyYLP1uQTU3p62NA5OmEtRcnafLVmPp LI0LCs4xL3iDCxOh6nSQ4/TA2GIyNlaeeD9oNidMRiJEAhf1FUf0FCMI8COQtu1y3n4O 4yyExjpy7pr80RslHjts5uKsfvR6DrON44xgCGWWrch16fKRL9oIOtj3PfIHNjD6sPma tNWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:dkim-signature:dkim-signature :dkim-signature; bh=OBsiPuL7h3qkYc/fzzIiZgnMwkZnm2LoFEaxuYiK7oU=; b=Tfw8jZl87R8C0Fi6NSCBeuAXuxowEO1Dp2pMNUbe35WedyQHcDIh0h73AB7w5fKFXi aE2nd+Om+3A0Efivuntp7efFsZ0gSJW5w3Y/jNzw3Rb9+8eBtoAIrwEQlQ1R2Smw4AgZ WWbyDGZw+nCNSqiToQ0CBt52wq4wM6gcVtIvg8tEwWTrIpFGyZGNiJUj1cR9xL/kqtL8 jAIsX+JmiKDvJglji8cWkf0h+KBXwyhXiHwOYZURrYnT2TXKSOXHc6iU7K+1TBoBR6AE lF+uvna7hdMR+k4EUhOrqckETfV/6srlcJl737SDt3QUT+suhG+81mBcQa+UBUvHnWGc q5LQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="0qpUDOz/"; dkim=neutral (no key) header.i=@suse.de; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="0qpUDOz/"; dkim=neutral (no key) header.i=@suse.de header.b=XtIutccX; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w21si22506968jal.38.2021.06.22.09.11.41; Tue, 22 Jun 2021 09:11:54 -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=@suse.de header.s=susede2_rsa header.b="0qpUDOz/"; dkim=neutral (no key) header.i=@suse.de; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="0qpUDOz/"; dkim=neutral (no key) header.i=@suse.de header.b=XtIutccX; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230121AbhFVQMw (ORCPT + 99 others); Tue, 22 Jun 2021 12:12:52 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:56250 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229913AbhFVQMs (ORCPT ); Tue, 22 Jun 2021 12:12:48 -0400 Received: from imap.suse.de (imap-alt.suse-dmz.suse.de [192.168.254.47]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id BB9A12196C; Tue, 22 Jun 2021 16:10:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1624378231; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OBsiPuL7h3qkYc/fzzIiZgnMwkZnm2LoFEaxuYiK7oU=; b=0qpUDOz/k6ZY3yfuY681vkq6Y0DDYra8sUKngniDbHSZA9WWr9yeh44EWcnKBHyuIBHw6/ NtJe7XPyzDkthNliUvKxwF62SZ0S32+VeHg+aRcW3STKsNJQOhpuFqlUxAF8MxtPSLqZEh KHgVsPxZoVqmWgU/MEZXlJGEP1jBhDw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1624378231; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OBsiPuL7h3qkYc/fzzIiZgnMwkZnm2LoFEaxuYiK7oU=; b=XtIutccXexZz64VEqwafXQ1xCTbg+rpiSuXnTbnMgzb57ucrRTsLr9bpveTi/D68k2aWHK 7xz2JtekQXzhPTBg== Received: from imap3-int (imap-alt.suse-dmz.suse.de [192.168.254.47]) by imap.suse.de (Postfix) with ESMTP id 7861111A97; Tue, 22 Jun 2021 16:10:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1624378231; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OBsiPuL7h3qkYc/fzzIiZgnMwkZnm2LoFEaxuYiK7oU=; b=0qpUDOz/k6ZY3yfuY681vkq6Y0DDYra8sUKngniDbHSZA9WWr9yeh44EWcnKBHyuIBHw6/ NtJe7XPyzDkthNliUvKxwF62SZ0S32+VeHg+aRcW3STKsNJQOhpuFqlUxAF8MxtPSLqZEh KHgVsPxZoVqmWgU/MEZXlJGEP1jBhDw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1624378231; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OBsiPuL7h3qkYc/fzzIiZgnMwkZnm2LoFEaxuYiK7oU=; b=XtIutccXexZz64VEqwafXQ1xCTbg+rpiSuXnTbnMgzb57ucrRTsLr9bpveTi/D68k2aWHK 7xz2JtekQXzhPTBg== Received: from director2.suse.de ([192.168.254.72]) by imap3-int with ESMTPSA id dotLC3QL0mDIHgAALh3uQQ (envelope-from ); Tue, 22 Jun 2021 16:10:28 +0000 Subject: Re: [PATCH] md: use BLK_STS_OK instead of hardcode To: Xianting Tian Cc: linux-bcache@vger.kernel.org, agk@redhat.com, snitzer@redhat.com, kent.overstreet@gmail.com, linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org, Xianting Tian , song@kernel.org, dm-devel@redhat.com References: <1624377241-8642-1-git-send-email-xianting_tian@126.com> From: Coly Li Message-ID: <930e7a23-a22e-409f-e058-0b1576c5d9d0@suse.de> Date: Wed, 23 Jun 2021 00:10:23 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <1624377241-8642-1-git-send-email-xianting_tian@126.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/22/21 11:54 PM, Xianting Tian wrote: > When setting io status, sometimes it uses BLK_STS_*, sometimes, > it uses hardcode 0. > Use the macro to replace hardcode in multiple places. > > Signed-off-by: Xianting Tian > --- > drivers/md/bcache/request.c | 2 +- > drivers/md/dm-clone-target.c | 2 +- > drivers/md/dm-integrity.c | 2 +- > drivers/md/dm-mpath.c | 2 +- > drivers/md/dm-raid1.c | 2 +- > drivers/md/dm.c | 2 +- > drivers/md/raid1.c | 4 ++-- > drivers/md/raid10.c | 2 +- > 8 files changed, 9 insertions(+), 9 deletions(-) > > diff --git a/drivers/md/bcache/request.c b/drivers/md/bcache/request.c > index 6d1de88..73ba5a6 100644 > --- a/drivers/md/bcache/request.c > +++ b/drivers/md/bcache/request.c > @@ -790,7 +790,7 @@ static void cached_dev_read_error(struct closure *cl) > /* Retry from the backing device: */ > trace_bcache_read_retry(s->orig_bio); > > - s->iop.status = 0; > + s->iop.status = BLK_STS_OK; > do_bio_hook(s, s->orig_bio, backing_request_endio); > > /* XXX: invalidate cache */ Hi Xianting, NACK for bcache part. The change is incomplete, if you want to replace 0 by BLK_STS_OK, you should check all locations where s->iop.status is checked and replace with BLK_STS_OK when necessary. One but not the only one example is, 871         if (s->iop.status) 872                 continue_at_nobarrier(cl, cached_dev_read_error, bcache_wq); Maybe you should change to         if (s->iop.status != BLK_STS_OK)                     continue_at_nobarrier(cl, cached_dev_read_error, bcache_wq); Just FYI. Coly Li