Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp961381pxb; Wed, 3 Mar 2021 22:38:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJz64BZovhhuepc/7dxkVdntKnzyXwpmvoJYFcaFkqT86DsxfnAqhgwUTT/l0J8e9UJH96IM X-Received: by 2002:a17:906:5d12:: with SMTP id g18mr2565930ejt.246.1614839890291; Wed, 03 Mar 2021 22:38:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614839890; cv=none; d=google.com; s=arc-20160816; b=gltSBolufd5wJnVXzm+JohbtzgZM3OMSi8ykHohLTL0nHHKCvH52qeJ5QYTD1UcXAl pQnQuFE8mQmL+N0fgnoTGU9azzRsQF9jVB07braoJp4QN6aho6cAo1R5iVsEkluIRnlv HUhr+Edbgk68sFq8iG2eQcBZoSltOkC2GcqLeb/D87k40/zo1xRkQjPEErevTQ6v/mtj eaaXdW/LuvCJAPCOyJD3js1bwJTIT7AdwKRjlB2uLI5RDFyYUUYJUUzk3TRcG2dMOSI2 KQIGAfMwcyDi3eF6rh89brSy1kvZy6aIWSunM41pQt82k1EQZ/GPKkZnqdCCXXd2TWyg SGyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=iwW35ITG9Djbu6v8pSlRaf5fZJ4uqak5RPpuDxPk5io=; b=wQEaPvl7mgZnKX70sFgeBlKOwWsBxCA2tmdLh8qNGvUGLPrbWCfpd3lrwEbdsrYwwP SKnWmEKTsTR41tpXjHmtswLwobIL5GBbiQ8RjkW1OYpu7k9RMzhmQy6PGAQqb510uehF rMyUxBkXeOLvBs6lpKnau0pIeqMDUmJK9RJofMaZpMW6DCuAWv26y4wykOim7TFFwKvk fzi7pzTLTAjiZ9+7NNHnMhKsryASN413VFZmFP3tCoWaAFh/PZUtheHmHzyH3H/itFtS QQwROIYKaTSxusji2ZQn5gmh6swvYDTOSetaLxi+3zQD7R5BVZXVKJ9ShxwO+HBNz5pH TF7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LJcRlj9r; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g8si16110506eje.538.2021.03.03.22.37.48; Wed, 03 Mar 2021 22:38:10 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LJcRlj9r; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1574628AbhCBUA0 (ORCPT + 99 others); Tue, 2 Mar 2021 15:00:26 -0500 Received: from mail.kernel.org ([198.145.29.99]:53802 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343767AbhCBRcP (ORCPT ); Tue, 2 Mar 2021 12:32:15 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id EAE6B601FB; Tue, 2 Mar 2021 17:05:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1614704707; bh=apE6atfdCU5ynjww5gGzXPVqWZw4OaO9hE7kK5VtJI8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LJcRlj9re5bdGrm9vdA9SqBxE7WtM7/5azxcG7xoPjFZrl2mqlocqbIEkWl4gBLqL ozsszbnW0UxEf7FUs1Bz4wqzURZOkTwLLyMFvcYimjspOiv5qSwuG8URNyaNtwcxhr yGpUqqpyGbgXI2o60vmo6RzDdjT5iryfKtwJPCxbi460cbnRIhsF4P5CTnXDUwVtEe zL4vfY7RogF9MpvJGUYEelMZFcBbdhKvpFs7polpISSlE8uIbosCTrC9OFgNhp4Lym xZjX5eRWThag92bgmkvMW8QjxS4AdRzTW8ph3xhqkNwu3EUGL2hef775cBEu6gCWiE i8w5v3zU12oEg== Date: Tue, 2 Mar 2021 09:05:05 -0800 From: Jaegeuk Kim To: Chao Yu Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, kernel-team@android.com Subject: Re: [f2fs-dev] [PATCH] f2fs: expose # of overprivision segments Message-ID: References: <20210302054233.3886681-1-jaegeuk@kernel.org> <920469a9-45d3-68e3-1f8d-a436bdd60cfe@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <920469a9-45d3-68e3-1f8d-a436bdd60cfe@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/02, Chao Yu wrote: > On 2021/3/2 13:42, Jaegeuk Kim wrote: > > This is useful when checking conditions during checkpoint=disable in Android. > > This sysfs entry is readonly, how about putting this at > /sys/fs/f2fs//stat/? Urg.. "stat" is a bit confused. I'll take a look a better ones. > > > > > Signed-off-by: Jaegeuk Kim > > --- > > fs/f2fs/sysfs.c | 8 ++++++++ > > 1 file changed, 8 insertions(+) > > > > diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c > > index e38a7f6921dd..254b6fa17406 100644 > > --- a/fs/f2fs/sysfs.c > > +++ b/fs/f2fs/sysfs.c > > @@ -91,6 +91,13 @@ static ssize_t free_segments_show(struct f2fs_attr *a, > > (unsigned long long)(free_segments(sbi))); > > } > > +static ssize_t ovp_segments_show(struct f2fs_attr *a, > > + struct f2fs_sb_info *sbi, char *buf) > > +{ > > + return sprintf(buf, "%llu\n", > > + (unsigned long long)(overprovision_segments(sbi))); > > +} > > + > > static ssize_t lifetime_write_kbytes_show(struct f2fs_attr *a, > > struct f2fs_sb_info *sbi, char *buf) > > { > > @@ -629,6 +636,7 @@ F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, node_io_flag, node_io_flag); > > F2FS_RW_ATTR(CPRC_INFO, ckpt_req_control, ckpt_thread_ioprio, ckpt_thread_ioprio); > > F2FS_GENERAL_RO_ATTR(dirty_segments); > > F2FS_GENERAL_RO_ATTR(free_segments); > > +F2FS_GENERAL_RO_ATTR(ovp_segments); > > Missed to add document entry in Documentation/ABI/testing/sysfs-fs-f2fs? Yeah, thanks. > > Thanks, > > > F2FS_GENERAL_RO_ATTR(lifetime_write_kbytes); > > F2FS_GENERAL_RO_ATTR(features); > > F2FS_GENERAL_RO_ATTR(current_reserved_blocks); > >