Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1591038rbb; Mon, 26 Feb 2024 14:47:52 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVusxqyd7opUqMB44YD/bq8TPZgKoI63Sq9xAVp7kHfa1EBVpXndGk9Hrl7KCGQ5zUlX4tVDtXtj3ZgavOn9472lqCana8+uaTds3QHjA== X-Google-Smtp-Source: AGHT+IGPhQEsDkdl6DRFJeSf6admPKS/ApBdJEy74sT+IS+xEVUqvN4ziPbcV1KslN9L0V1zO2Cv X-Received: by 2002:a05:6214:1c45:b0:68f:3263:d94d with SMTP id if5-20020a0562141c4500b0068f3263d94dmr612820qvb.26.1708987672263; Mon, 26 Feb 2024 14:47:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708987672; cv=pass; d=google.com; s=arc-20160816; b=xAuKvi4IGg9YkvP1vCYjyRY0zH1lwhcF3tVXLgjUGoi54RTUlLgo6sea74bsR6AW6J ADj7/VhiKHlX1t76IaVh7RI3h4p6oH8jwJ/RTlRYmXyEN+v7j4QMQ7xRJuP8e/MYJAsh hBi7+JPCf0C1eFZ55SieqK5HcYdnJVoawCFMgTc8bdFdSOzLSGdMmMrZP47a/1mAn1v+ wjbItKWwiD86qcImvsDZYoj91v95g464RUIOJPhfxrdO4j/sj6otZH/SEJKB6s3W22fl 9VhPp1CE+vAJX1Kbsc/2kkUEp57jpTWDr1p6JjDNMTgbaihIn6wpeFa+oOGxeExRc3hd mOTA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=8lbptSU57JD2hlE6MWgKbuhahaE/sQ4zzkDcWOQfFpA=; fh=4FxsWC7i9dY/kSSM2xSvyId8rl7MYdv4G8j5bnMQznQ=; b=d2uXNS6MmyI2VMdXeGpJ+vXv21iPeGnmX3JjYM1UYx8xXWNAzqFSrIrKmbcC1gUtfE Ikv0aHoe7QhFPrkJZL1ixrbWEdzFz78IOpwiqjf9stFK/jSs3QTqL+N6dF5Ubhxwh5Ri xv+zd39EMXmll5fPeSIjuE+hWSxA6SwveG1bf6A3xypw4sMt2wOKukhyQ4PfTSFr3kxM GZGDGIKEShrnyEhnMC8G1wg9nPQXhhL8IYiE3oCNyFUJTBEJkhRbsBQytdMaIe/ECsC5 zPHt+qUW5lR3K+03Po2O0X9jrLYkUKaQ+I8HaNxQXYadUuF5RyU9YytvnfYWXZH1/nh8 7W5A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=p00DO6yd; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-82421-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82421-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id jm9-20020ad45ec9000000b0068fd34ed059si6360891qvb.291.2024.02.26.14.47.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 14:47:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-82421-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=p00DO6yd; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-82421-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82421-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 0907B1C24375 for ; Mon, 26 Feb 2024 22:47:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ED8CA13541E; Mon, 26 Feb 2024 22:47:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="p00DO6yd" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 26DD9130AEE for ; Mon, 26 Feb 2024 22:47:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708987657; cv=none; b=sDiLYkU93KZDgHqJI6yTrExguBBnNGfi3VE3G0aPGxeMlepJOoSQyI6hhV5zv5K4JkvFhUn3rW+GWB9xQspXVQ36tKh35ewUitgvYkMCDKWM4dvagvQYj1A67xuR2HVd5Hmv9cbDXoxINiBzLkJULr7d4LuiCYYNnQIfiJhz5kw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708987657; c=relaxed/simple; bh=SIF6l2OHEXEE3BAbQV6qsonqNnLgzP8DvqtGYEaQfO4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=bZ+4twaqO+QAgMVyWBYtFFhGz9BTW6PxD12grjxicam7vzBGiWGN+jCmZkFP4xREFcw6+8xZ76L3ecRUZ0OrZhE8p5DU/C4R5iZouB45WHIYHTQbPaFEloRWTTbkmaDAihLbUj7k1STOnVoRyIQdcYntvbbgGyCWIC2uDFMkZp0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=p00DO6yd; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7C472C433C7; Mon, 26 Feb 2024 22:47:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708987656; bh=SIF6l2OHEXEE3BAbQV6qsonqNnLgzP8DvqtGYEaQfO4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=p00DO6ydaneDwhDZD87n2MMe5t7m6vJWietj9ki3VDSivg0mFNftdWa+kwiBfnfZY uUTWl2aw3awaqTWx6rU1iWJXAP0Urgz0r2xkvwbXAbfTPqcEHRDDjT4qpc5RrQt1O1 pl7KzGBS0BGdDvNQcx7U961icohJeNW3AzOE0NbaUE63ZF/gM/eeulShaEZmPzVxcr 8xd1UKweq57OMo57Sm4Vj6SDhXOMrtVUr2clqZgtK34L7cgZSWBn+yTfBG8EGO9Ku1 fntyYzlhzyi1YIo9QPm1xGaSdV/tst2hNuclApwV4HFpjqKKXhcdMvgGeNN0xlfL9b WEoqzCPEXU0vw== Date: Mon, 26 Feb 2024 14:47:34 -0800 From: Jaegeuk Kim To: Daeho Jeong Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Subject: Re: [f2fs-dev] [PATCH 5/5] f2fs: allow to mount if cap is 100 Message-ID: References: <20240223205535.307307-1-jaegeuk@kernel.org> <20240223205535.307307-5-jaegeuk@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On 02/26, Daeho Jeong wrote: > On Fri, Feb 23, 2024 at 12:56 PM Jaegeuk Kim wrote: > > > > Don't block mounting the partition, if cap is 100%. > > > > Signed-off-by: Jaegeuk Kim > > --- > > fs/f2fs/segment.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c > > index 6d586ae8b55f..f11361152d2a 100644 > > --- a/fs/f2fs/segment.c > > +++ b/fs/f2fs/segment.c > > @@ -904,6 +904,9 @@ int f2fs_disable_cp_again(struct f2fs_sb_info *sbi, block_t unusable) > > { > > int ovp_hole_segs = > > (overprovision_segments(sbi) - reserved_segments(sbi)); > > + > > + if (F2FS_OPTION(sbi).unusable_cap_perc == 100) > > + return 0; > > With this, f2fs will not execute GC. What is this 100 > unusable_cap_perc used for? Theoritically, it won't, but I was hitting a GC loop, and I suspected a wrong section/segment layout. So, I posted the below, and guess we need this patch as workaround. https://patchwork.kernel.org/project/f2fs/patch/20240224011411.3820719-1-jaegeuk@kernel.org/ > > > if (unusable > F2FS_OPTION(sbi).unusable_cap) > > return -EAGAIN; > > if (is_sbi_flag_set(sbi, SBI_CP_DISABLED_QUICK) && > > -- > > 2.44.0.rc0.258.g7320e95886-goog > > > > > > > > _______________________________________________ > > Linux-f2fs-devel mailing list > > Linux-f2fs-devel@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel