Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp91973rbb; Fri, 23 Feb 2024 12:56:28 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCULpOwc2IGYZtzxYEVhPmlnur492dFqHIzU2bOWepf5rx9UlfmZeBgCCszrUHupXUo2yNUcHoSJANHj6FnsRHwbay5AUgTiYsgFALSzxQ== X-Google-Smtp-Source: AGHT+IG5m3EXKq6W06LKtn5k79LOepNm1slnfpAgLugq4Lkmni3h9sxxFFAoL5eXpEMSeNvI5FIw X-Received: by 2002:a17:90a:d505:b0:29a:67fa:7bb7 with SMTP id t5-20020a17090ad50500b0029a67fa7bb7mr725365pju.47.1708721787760; Fri, 23 Feb 2024 12:56:27 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708721787; cv=pass; d=google.com; s=arc-20160816; b=WzYD//8O/MclQhImjOczhlO/2riJ8f6GdE5B9IpfUs2KCJgBiw53t1boLPG5PsEwb/ l1zk45GWBDDn3f3WhoA0rzQdaxdux37woTUDmCK01SbClOStM4/1p7DTa1ZSzcu3etPR OjIQTNyJfvdTV/nRY1/tIKhdmYLbt0aBYBqSPgAA91t+qlp372CVHIFlTfCwnrmVQmYa MuIlm6oyEidr3YUC+WJFJayjdEFJf/+LVPMibKsxd4F2jmvA6E0LvDcxlvXTC3YdsbbR uhuRCbrUGALoxjL8i8ae8ckCgCYm6RX80JoKKFXLht8swHX3T4junpUuvC0t0u+wgT2e ag+w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=KEK4PKZpiKuqikEuPIITFI5x9Ipginm3gnaq5OfdLpo=; fh=rqHW7NazYv3wAmgqDKAbZUXWTmf0VaM5epB9R4zfTUE=; b=yTT/qBR4oMO4axb29HKIT2BQArpUlxFjco8h7UXhaxL5ya8C3zaLYYPSQRhXH9+Mux GYTvSKJe8ypjYEvtNhpYG/Bt4kMX27TNRE517crJp3ItqjL4PFERyO4AIAov/j287deh mC7T25dIWsylozNOuMqWCW4dumItx1DjEI7ipGTJaq42O8U1ZeF8AvZcfZC4pwAXIPsU izKn7Uie2NXGyJPnXh1qhzzf/DNSOQwLaJr6MZ+es1t7sOmwtZaae5+YHOkP/Hs1FKd8 eJ/p197Z2J+6K4kq1DaHTT/4wYnxh/EEBCSpc3L/z0WvqnIU4EPOSc2l8HE0pHzy5o5a B0eQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hmh02COf; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-79150-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79150-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id oc18-20020a17090b1c1200b0029a8f88f029si716489pjb.140.2024.02.23.12.56.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 12:56:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-79150-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hmh02COf; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-79150-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79150-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 6A007286374 for ; Fri, 23 Feb 2024 20:56:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 816F214CAB4; Fri, 23 Feb 2024 20:55:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="hmh02COf" 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 AF3841DDC3 for ; Fri, 23 Feb 2024 20:55:40 +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=1708721740; cv=none; b=ks7f7+Bd60gLyADcdFd5rjB6t9ZQgqvEEKQq7vt6JI/Wdo+m8WcIdGDexCo0MwReJpWWm7Kyp4eEajdTb0HipuwHvISCZe+fj3FySeGmW87IMp/Nj9eX8Tuiv0HpUQLY6qIboquKmkmApth0rW7Y0W00FJ0HEMu4Qm6fIHXyBoM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708721740; c=relaxed/simple; bh=Dks7ZYdpho4cTIrGeKroPJwikwZpUsV1Ym/LDVuEhMY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=aWeebP0C4O0Coc465eSPgr5yZvered3QWVyiIAuAVZrS46XVwPVdL+XsjUynnAhiNXxsur7il3auPsEQebCbuoMqlj+Z9M2rhNCp974DsE7V/nFabpvW2kvKMflKtLsYn0WUjYYatd3fYvSaVGDOcPiQ0aSs9uxk5C7LLAP7pto= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=hmh02COf; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 351D1C43390; Fri, 23 Feb 2024 20:55:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708721740; bh=Dks7ZYdpho4cTIrGeKroPJwikwZpUsV1Ym/LDVuEhMY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hmh02COfYfzXOAY/wQfnzDRk4Ol3gGYIn1gDcG02Bf2LrYPE/K1cx7LX/SVL2WF9Y WqtEQE8K4EUTV2MyulSisJi14ElRtimAP1qCg6blP4+VPLcEwhbntU9XTDIWE/O1uo 5lUk4hBsmPYcD6+EtNZWUM12c0f53Af/Wqjv6SyFL+PV0rqTv30oxOySWjpKKJJFlb rKjLFIb9CQXbR8X0t/AlGQCS5xV28QufjgyMHagNp6LWXie1aXQR5TuaDqINBkqCrR ToQ3A0XaoLjbIBW1jxCWMyUBzQW/LHF72Vvv1eMGAY5df4w/yuz5kj/kgyGhoyltk3 j410fPAfilfUA== From: Jaegeuk Kim To: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Cc: Jaegeuk Kim Subject: [PATCH 5/5] f2fs: allow to mount if cap is 100 Date: Fri, 23 Feb 2024 12:55:35 -0800 Message-ID: <20240223205535.307307-5-jaegeuk@kernel.org> X-Mailer: git-send-email 2.44.0.rc0.258.g7320e95886-goog In-Reply-To: <20240223205535.307307-1-jaegeuk@kernel.org> References: <20240223205535.307307-1-jaegeuk@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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; 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