From patchwork Wed Nov 9 11:50:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Senozhatsky X-Patchwork-Id: 13037465 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 A8421C433FE for ; Wed, 9 Nov 2022 11:52:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 90E628E0005; Wed, 9 Nov 2022 06:52:14 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 83E2E8E0007; Wed, 9 Nov 2022 06:52:14 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7233F8E0008; Wed, 9 Nov 2022 06:52:14 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 562D88E0007 for ; Wed, 9 Nov 2022 06:52:14 -0500 (EST) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 6EC91C131F for ; Wed, 9 Nov 2022 11:52:13 +0000 (UTC) X-FDA: 80113740546.23.463B433 Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by imf27.hostedemail.com (Postfix) with ESMTP id 256E440015 for ; Wed, 9 Nov 2022 11:52:07 +0000 (UTC) Received: by mail-pf1-f170.google.com with SMTP id y13so16455641pfp.7 for ; Wed, 09 Nov 2022 03:52:07 -0800 (PST) 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=Yx/j6NFsqMiBfWUe9MAE1kY4nyT9uBWrAowemE/mjWM=; b=PRtW06hqJjnQd/kkrH5EdBvx+MeI+nT/zaRSXLQ34yFFZSjedoVDMt0ITBHY9lEJZL zv+rYGTJbr/jbll1pBLICDHoduO6RLnRUwbZgzJ4UPSTNt9sozFtY/xW98UZAXvjbMTU R6GqKRwlu/wYEXfZCbhs9SLFZ3xhLlXZm6oO4= 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=Yx/j6NFsqMiBfWUe9MAE1kY4nyT9uBWrAowemE/mjWM=; b=LO+qnPC2UmGqpje+NMdR+sjfgpCbyEu3FZhNqtFyer7YhhU837SKKUdcimXy/Kexp9 ef7pfDgktruYsCkGfj2SESl0JG7wh9VCos+vpOiblL2yEIDz6Y43u5xB44w5HZbrF5fC VE0xvM3XOPpZ1gCcEZdNYpyNkCmuliS/MG3VZZwXXKqaROa/TLY/1nqHXrnQNGw7bBh8 sa05uFYdSAgV5F1JzhYS7MHAR48tJ8sJ0uqx0bi2snsWVMTuRE6gMhvBYOQ9koJKGwkW jxLvE5Z8WhJLHZcokIXeo3xJPb0RaVVc7FsNJkJ4itpUREzF2NZm71FQx89jPLZInsOs waNg== X-Gm-Message-State: ACrzQf2mMWRqPzwiCzmX/+S5X/Z8yTItCrFXZujVc9rrkaJ3YlF9Ivf4 gfnFL9V79OFDq2OXY81wTyJx/A== X-Google-Smtp-Source: AMsMyM4QC8IeHoMzd41nyT4jdl6i2t22PgNfGcqVzLXa+joYnG9IWHujjdaIiEn2O1jPLNxZ/+ziUQ== X-Received: by 2002:a63:f755:0:b0:44b:e438:ef2f with SMTP id f21-20020a63f755000000b0044be438ef2fmr52609729pgk.314.1667994670169; Wed, 09 Nov 2022 03:51:10 -0800 (PST) Received: from tigerii.tok.corp.google.com ([2401:fa00:8f:203:61f1:44d3:3f47:2cdb]) by smtp.gmail.com with ESMTPSA id f5-20020a655505000000b00434760ee36asm7292311pgr.16.2022.11.09.03.51.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Nov 2022 03:51:09 -0800 (PST) From: Sergey Senozhatsky To: Minchan Kim , Andrew Morton Cc: Nitin Gupta , Suleiman Souhlal , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Sergey Senozhatsky Subject: [PATCHv5 06/13] zram: Clarify writeback_store() comment Date: Wed, 9 Nov 2022 20:50:40 +0900 Message-Id: <20221109115047.2921851-7-senozhatsky@chromium.org> X-Mailer: git-send-email 2.38.1.431.g37b22c650d-goog In-Reply-To: <20221109115047.2921851-1-senozhatsky@chromium.org> References: <20221109115047.2921851-1-senozhatsky@chromium.org> MIME-Version: 1.0 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1667994728; a=rsa-sha256; cv=none; b=1YVPPJo6EVF1MiJ9zpnaUKfKwbhRWARvxz1L+3jZ0shUIfCcKGjWPoBEd0t3/h8SdGqdeM gA/W0eP3lv+kJx8ih4Y90cjQLZDxSdeWktp7r0TS2hsUFqwHAvyuYWphvPGXkv2me5ew0E xDtGSIT1ZexJkP0uFnTEVb+WMn6X91E= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=PRtW06hq; spf=pass (imf27.hostedemail.com: domain of senozhatsky@chromium.org designates 209.85.210.170 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=1667994728; 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=Yx/j6NFsqMiBfWUe9MAE1kY4nyT9uBWrAowemE/mjWM=; b=NEx8IFTI61es27BWzms/gyWjC8rWZI1cMCd5e014FOnolbXM9IDd/7gp6vau8oGbDFAG6R fcJRsP/DJUAOGCWfi9EnK1zxjYHkfvQvikEBmHv5I7pjfjTQY/pCLylazctw25oGlRGVvb T3BGwHipbWudZAfv1CrUIMLYprFo/KY= X-Stat-Signature: uhqx4zkzgs3mjtfrnnygiyde6kkpwujk X-Rspam-User: Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=PRtW06hq; spf=pass (imf27.hostedemail.com: domain of senozhatsky@chromium.org designates 209.85.210.170 as permitted sender) smtp.mailfrom=senozhatsky@chromium.org; dmarc=pass (policy=none) header.from=chromium.org X-Rspamd-Queue-Id: 256E440015 X-Rspamd-Server: rspam09 X-HE-Tag: 1667994727-301620 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 560e2932021e..a5d2ce0bcd5d 100644 --- a/drivers/block/zram/zram_drv.c +++ b/drivers/block/zram/zram_drv.c @@ -772,8 +772,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;