Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4446153ybi; Mon, 3 Jun 2019 11:00:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqz/CKsXP5sH8qxYVOD7wbW++J0BbB0f9b3KgPWkFFqU4rIBunvdsoFLvudTFWisG7VJzTLa X-Received: by 2002:a17:90a:3801:: with SMTP id w1mr30345355pjb.99.1559584812846; Mon, 03 Jun 2019 11:00:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559584812; cv=none; d=google.com; s=arc-20160816; b=clfTSPQiOe8Dni0nE2BPahQ24yeXm2KSl4CX/vHOvkk4bLYXHorIL10JcTliLDemi/ 3j1rPuD3P4U8R0xHfYuZ/aKy0/wDibS3wiIvr3FJcyeVmzVOdg4R19kEjUmy3HsEwtr5 PDa5dmiGJ5xeB0APYgI5A9ZQqCg02lp91ixOQabBiPhTHi0xvMfe20YfR2n0rQ+8Bwwn hF2lvjsLkfBYFW9eIcS7RgMcgBspVQ3Ki0vwY7yVzQqrcK/EE2VPmLkkvXMPdFPBDIgv HRihLkJ2eakY643hz9SRcl5muHTbXjIkMseUpexs3fWpfmgIKmzLFf+sUGmGdOZtvfM2 k29g== 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=+fmM+PlDXC+Sd1khZBB3OxsseXAF9mqbUMw9qBu2rjM=; b=NdXbDCNgdY4Jq2razInXJfuXppMi4wHtpQFUjShgBR9Y22jHcplp5d8bsoDkuzIHbO Lbn3sA53LphNcdu/3Ss5E6ucx8SZzMT8v1yC0sNix5Y4XBvo2Iny7tta5sWEAE8Y9drx R5dKucdl9r5s1h2eq0T9YUA605+tsJFRfH4DTLLphd14AaaIKy8cYuAibOeqe9nBecaT MIc1IEyCs/UbWvxfvxbLkVctMgK1H08tn8bqMwsniEHc49TVnWzRzb814R968EO6nstn FxTxwFJVXGjFtm0KHr0KGzfb+MBdwgg+NbljEfgU8eQb1R3p2dPCp0J2EKAgIItJjiQP 7gwg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bh2si20959936plb.430.2019.06.03.10.59.56; Mon, 03 Jun 2019 11:00:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727083AbfFCKef (ORCPT + 99 others); Mon, 3 Jun 2019 06:34:35 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:49380 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726791AbfFCKef (ORCPT ); Mon, 3 Jun 2019 06:34:35 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id B8A478589F240428C33B; Mon, 3 Jun 2019 18:34:32 +0800 (CST) Received: from [10.134.22.195] (10.134.22.195) by smtp.huawei.com (10.3.19.208) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 3 Jun 2019 18:34:29 +0800 Subject: Re: [PATCH v3 2/4] f2fs: Fix root reserved on remount To: Daniel Rosenberg , Jaegeuk Kim , Jonathan Corbet , CC: , , , References: <20190530004906.261170-1-drosen@google.com> <20190530004906.261170-3-drosen@google.com> From: Chao Yu Message-ID: Date: Mon, 3 Jun 2019 18:34:28 +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: <20190530004906.261170-3-drosen@google.com> Content-Type: text/plain; charset="utf-8" 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 2019/5/30 8:49, Daniel Rosenberg wrote: > On a remount, you can currently set root reserved if it was not > previously set. This can cause an underflow if reserved has been set to > a very high value, since then root reserved + current reserved could be > greater than user_block_count. inc_valid_block_count later subtracts out > these values from user_block_count, causing an underflow. > > Signed-off-by: Daniel Rosenberg Reviewed-by: Chao Yu Thanks,