From patchwork Tue Oct 18 04:55:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Senozhatsky X-Patchwork-Id: 13009909 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1D8FCC433FE for ; Tue, 18 Oct 2022 04:56:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AB32C8E0003; Tue, 18 Oct 2022 00:56:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A3B038E0002; Tue, 18 Oct 2022 00:56:02 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 92AC38E0003; Tue, 18 Oct 2022 00:56:02 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 845868E0002 for ; Tue, 18 Oct 2022 00:56:02 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 5C51540E19 for ; Tue, 18 Oct 2022 04:56:02 +0000 (UTC) X-FDA: 80032858164.07.D3CE021 Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) by imf19.hostedemail.com (Postfix) with ESMTP id 0FE331A0032 for ; Tue, 18 Oct 2022 04:56:01 +0000 (UTC) Received: by mail-pg1-f179.google.com with SMTP id bh13so12327743pgb.4 for ; Mon, 17 Oct 2022 21:56:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=z6j2M3ywUHsS1+ykQ/OfNhi067lR0Bt99BN92Wk+zcw=; b=H4tQqYyGb10hilriYTv+DvIcK69suR/MknRv/uI/c7Sq8IVi/fkI5CgIYlaPZTn3R3 fcnApKLzJ2JC3QxaMOGgeKe9UHO+kkbWQ0logwCwtTSA1l45M7ttQfjxjlmDarqRhC/q +YH2hyuuTFmys4kuUH7wG9CPoEgVf6/DURZSo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=z6j2M3ywUHsS1+ykQ/OfNhi067lR0Bt99BN92Wk+zcw=; b=hq3X1vF8rX/Fw0KzFQAdOIImcqM83/dX8/fHNnYuyz2AVqONgs3i6CQ2CaGNEC7naw cRWxTlUVQqh74m6UlegSn3eQ7GFgdyOSmkIrgFdkMyWiVHuIZLrWo66nwMmTMTcdJGym UwnXv6z6WhnNqkY10pvuuASMyEPSTWY93Ffulx6g3YLjcDfOXTK2e/sW/SsvBgAaIKVz 2Bv8HJMgyW+mQABRei3/zPw+7fcHVI1UYBeU3xI6bwZqbFwBC/6NDrDB5dx999K5KZDO wEgocDFQ3PTA7UTN2TPMaML4Ps/+2Q8wiAF24UFoZ53ZpT1mwRsu4fTZffJdMXrYkaWD bmng== X-Gm-Message-State: ACrzQf2TJS0A5bOVE9z2W6rx7lXQCTCOytoYmlsSXmtWMIOsX+A1GoeE aYcg6SkdbLK3xd3Pbi+53k3siw== X-Google-Smtp-Source: AMsMyM4x6naz3nZNmfa/NQmCK6M9uAvOmZsk0imfFXfuxX/g0/1/X6ammsTwTiolzSPSQ6r1RUIKpQ== X-Received: by 2002:a65:6849:0:b0:461:8779:2452 with SMTP id q9-20020a656849000000b0046187792452mr1089661pgt.383.1666068961162; Mon, 17 Oct 2022 21:56:01 -0700 (PDT) Received: from tigerii.tok.corp.google.com ([2401:fa00:8f:203:17a9:73b0:c262:eccd]) by smtp.gmail.com with ESMTPSA id p4-20020a170902e74400b0017b69f99321sm7549220plf.219.2022.10.17.21.55.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Oct 2022 21:56:00 -0700 (PDT) From: Sergey Senozhatsky To: Andrew Morton , Minchan Kim Cc: Nitin Gupta , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Sergey Senozhatsky Subject: [PATCHv4 8/9] zram: Clarify writeback_store() comment Date: Tue, 18 Oct 2022 13:55:32 +0900 Message-Id: <20221018045533.2396670-9-senozhatsky@chromium.org> X-Mailer: git-send-email 2.38.0.413.g74048e4d9e-goog In-Reply-To: <20221018045533.2396670-1-senozhatsky@chromium.org> References: <20221018045533.2396670-1-senozhatsky@chromium.org> MIME-Version: 1.0 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1666068962; a=rsa-sha256; cv=none; b=pK2mZNbJjs1HUrN4xbNeTlpg/zPD3fcwfF1SvQoa4UstDdrx6oO9u6vN7OrB5VYiqKcjJY nWFJUBhh2prkNrz/F6ZxkV90Tz3FzEgvf8EK+QjXQ+NE4ZH5Q1zE1UoL/3CxBPyPQ7wU+h rEMHYns4JCzAcR8oBRWuNqZ2O0mi2hM= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=H4tQqYyG; spf=pass (imf19.hostedemail.com: domain of senozhatsky@chromium.org designates 209.85.215.179 as permitted sender) smtp.mailfrom=senozhatsky@chromium.org; dmarc=pass (policy=none) header.from=chromium.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1666068962; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=z6j2M3ywUHsS1+ykQ/OfNhi067lR0Bt99BN92Wk+zcw=; b=65ltEK4RTN7zPbo4e8h89i3UNBt7FM8DrXigrYexTjcIjMGq8aoc5VR4V7+/Ekni1Etuca S0Ldzb7hW5hX+O0ClUzqOcO4ttzFul37g7gW28N+X2RgpKk/qnSPzMiZYqfFExYKGE3wKK TkgW3rKfaymoJsHWm1JurARFLiaJhjk= X-Rspam-User: Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=H4tQqYyG; spf=pass (imf19.hostedemail.com: domain of senozhatsky@chromium.org designates 209.85.215.179 as permitted sender) smtp.mailfrom=senozhatsky@chromium.org; dmarc=pass (policy=none) header.from=chromium.org X-Stat-Signature: 9uuzbeqrnjdk1544f7z43775m5h467gw X-Rspamd-Queue-Id: 0FE331A0032 X-Rspamd-Server: rspam10 X-HE-Tag: 1666068961-328930 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Re-phrase writeback BIO error comment. Reported-by: Andrew Morton Signed-off-by: Sergey Senozhatsky --- drivers/block/zram/zram_drv.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index 5d760467e0bc..6b56f6f2ce82 100644 --- a/drivers/block/zram/zram_drv.c +++ b/drivers/block/zram/zram_drv.c @@ -758,8 +758,12 @@ static ssize_t writeback_store(struct device *dev, zram_clear_flag(zram, index, ZRAM_IDLE); zram_slot_unlock(zram, index); /* - * Return last IO error unless every IO were - * not suceeded. + * BIO errors are not fatal, we continue and simply + * attempt to writeback the remaining objects (pages). + * At the same time we need to signal user-space that + * some writes (at least one, but also could be all of + * them) were not successful and we do so by returning + * the most recent BIO error. */ ret = err; continue;