Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp276160ybg; Wed, 3 Jun 2020 00:03:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZFS6lP1mrIeXXAsVxKDRpwwowvhTXYxuUlqTOwaSL6+XjTJrxaCeps55sMFa4R3lWmxt7 X-Received: by 2002:aa7:c2ca:: with SMTP id m10mr11081361edp.221.1591167837086; Wed, 03 Jun 2020 00:03:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591167837; cv=none; d=google.com; s=arc-20160816; b=QjKh+zkRnGLSsLJFEQevfekaTjlC/5lkoIK6njPA5Y2N3etbehgDB/+1mbxJoax7y+ SCNEFYI5uxm4OKISwf0wN1TJ+vlfZq+fjUSJtz7ZkGiHuFVhEgeHCYLbPrCBwJG+A2+0 Gncnnhb6q61ajM46NhgPN8V2swpAEtLXGl1BHZwtDBOdMqOKfYW4Wl6n27lcbk6C5HS3 PwbrfJWNOHPMzFIF6hseXEab5hbQnwUa4YRywyLi9inmb/c9DNfMjCpPWegOYg4hAqz2 pgxMaMYJAnFLwCbs7qQhUuJz1gdwv+9YgQT24jsVAnYt62XJgVQxUhI7mIWj+hzw4Jvj DOQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=HvHM54r/0dziqaV1hSLLDsO19f2WmwAK8vEn/13BShs=; b=irNKrSDgm2blKY+AbbYDG0uE341OSJi3qeOsp9rPURBZgXpSfv+UKHmpcPMOdLXXpZ mRVDzUUjUrsjvDkq2HEN3NADBudoD/tyGGeXysgJqsiUk84N8l5R3JDPHvplLlvQcnct URzE5jSEfTUwKqPcOHNj3MqKVR7+O8eFvn59zTnOip3MStRHhuSGJQWaib7wyRTLAdxs 5tHrP94ckN+rkyxvJIZR+cEtgSTIFrAKKqpkTd1voEQz+SdGPZoNEnEIOmwa4WnqMcgY KuNCJ2IAx4qh4TCzkChbiK3l3HOcxeraXIBCe00j+pb5fiwu77ilDT4i2N8OSmvNiwka 4e2w== ARC-Authentication-Results: i=1; mx.google.com; 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 s23si626306ejq.306.2020.06.03.00.03.34; Wed, 03 Jun 2020 00:03:57 -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; 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 S1726097AbgFCG7e (ORCPT + 99 others); Wed, 3 Jun 2020 02:59:34 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:5778 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725275AbgFCG7d (ORCPT ); Wed, 3 Jun 2020 02:59:33 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id EF3F929B01C3B7124A8C; Wed, 3 Jun 2020 14:59:31 +0800 (CST) Received: from [10.134.22.195] (10.134.22.195) by smtp.huawei.com (10.3.19.207) with Microsoft SMTP Server (TLS) id 14.3.487.0; Wed, 3 Jun 2020 14:59:28 +0800 Subject: Re: [PATCH v2] f2fs: fix retry logic in f2fs_write_cache_pages() To: Sahitya Tummala , Jaegeuk Kim , CC: References: <1591101707-18802-1-git-send-email-stummala@codeaurora.org> From: Chao Yu Message-ID: Date: Wed, 3 Jun 2020 14:59:26 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <1591101707-18802-1-git-send-email-stummala@codeaurora.org> Content-Type: text/plain; charset="windows-1252" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.134.22.195] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/6/2 20:41, Sahitya Tummala wrote: > In case a compressed file is getting overwritten, the current retry > logic doesn't include the current page to be retried now as it sets > the new start index as 0 and new end index as writeback_index - 1. > This causes the corresponding cluster to be uncompressed and written > as normal pages without compression. Fix this by allowing writeback to > be retried for the current page as well (in case of compressed page > getting retried due to index mismatch with cluster index). So that > this cluster can be written compressed in case of overwrite. > > Also, align f2fs_write_cache_pages() according to the change - > <64081362e8ff>("mm/page-writeback.c: fix range_cyclic writeback vs > writepages deadlock"). > > Signed-off-by: Sahitya Tummala Reviewed-by: Chao Yu Thanks,