Received: by 2002:ab2:3c46:0:b0:1f5:f2ab:c469 with SMTP id x6csp153816lqf; Fri, 26 Apr 2024 02:37:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCViSTA6P50eBOeTMfTTleom6Cbj3JhCc4k4RaeAhnM9X+3W+1VCW5iBmkStE1OJuQbLZc7wzpOAx487TuLU7TUHHHFMnfDOccCQHEHjxg== X-Google-Smtp-Source: AGHT+IEOjdZX3A7/3oCQio/a+KyQbB/DueJLoxYECkPmtHbqjUDPtZIV9/hr1Kejvf5UGEKt3Z5P X-Received: by 2002:a17:906:12c1:b0:a55:3707:781d with SMTP id l1-20020a17090612c100b00a553707781dmr1405118ejb.73.1714124240916; Fri, 26 Apr 2024 02:37:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714124240; cv=pass; d=google.com; s=arc-20160816; b=ZAILOAkkqbUg3TcN+9PTsFRzfFgzUqTZw1Q3CbjGGC334qLoo+nESOW9crly1IWLnz 8xoBYByjFAjpftN+G8Ob5Z1SjucIwiXmJoGT0KhM+JoZ6JRsGNaePoZLTPugOBIWqd1H CJgvWd6J7Uf/c8BdMG90h7OKLOiSWMOjpM+3PtZFeJes7zOkxT2dWuRO64zeBbeHaQV4 nij7YQj7A3CJKew2CD42SiQdLarv4x+5zmNIGmOw+pIXnSOuOJm6vQDX0VUYCUgMsWuN lI5cH7wMHJPWtWNE4hLSw4wDDy271qoM0UC90YHIcuJM6PtNUedRpkzs4GB3y/mpXP7c DPJA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=vDCJp1EFbT0oUoxHy5xbgqWzgY/qe/c4AqHj2Xw3lnk=; fh=H5v+CjkY1nRWdftDHNboMCIe1nH85PkL3QB3W/+Szvo=; b=xQ7kxO7Ocdpyu7+ed4CcQareYp0NXmRedyVoHUkr22h8QOrqdxX7Ox7LszKGV1bC3X aK2VxA8024/twr/HMk3YEd6nH7bl50tA7PFBEPs19O3PQaj4NbQ0T/uR74K4stXIlymC Skk/ctV8FuSN4uRybl0h2mQfTwRWGfwf8Smie+nS/dwZhcV34FZyOY3IOCrDvPS84A+N E9XbjbDPNm0PgvLT6w4xaggi0lM5oJ2BITfcV2vEmm8DQnzkE2fhTkosA0L8FvcvbwAo NOBvAjUh8EV0jN4CU7UVGsMHIT+DJtEDFNljdc9rNJ8xZLrQf30cEbj/xB6PAbSN2HJ6 WYGA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Jr9lNuEO; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-159800-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159800-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id q18-20020a1709066b1200b00a5210154eb2si11045635ejr.195.2024.04.26.02.37.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 02:37:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-159800-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Jr9lNuEO; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-159800-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159800-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 6E9431F21871 for ; Fri, 26 Apr 2024 09:37:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B8C9313F451; Fri, 26 Apr 2024 09:37:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Jr9lNuEO" 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 E3AD913C9A0 for ; Fri, 26 Apr 2024 09:37:11 +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=1714124232; cv=none; b=mPGqQHnkpskVYlZPGWUm7Ev/ABvncmi+p9Rf3Prmk/KeAfyYUI+BcAjsM78U0LON7U6Q6k2hhlY3OaHIW2iBk4SDl6ofK0S53G7cGXn6FZDAamb/XSnorwi8T7oF2aQw0LsieXYRzOOEDNjOAdk6e8d9eyQcoe4iRfUYEN0JdQE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714124232; c=relaxed/simple; bh=P/GTw1XxjReEuD9Ww1RsUUzrNV6/qF1pdeMu8tj7+48=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=LcQB4lcrifv6XQ+RxCjSJ5URGGSACJjqRK+sSvtUPTNXyurDGicHnpvrRJCjGKpX19uV8H/IOs8t/sCMtkL8X0hM0guTaKV+kk6OzQ2rgy0fVdxoOXOog4N1nH/nJk8OFT4DFfwe1RurnoLnwnFJFZNBhu/6K9X0LMmvdjdKcd4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Jr9lNuEO; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0886AC2BD10; Fri, 26 Apr 2024 09:37:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714124231; bh=P/GTw1XxjReEuD9Ww1RsUUzrNV6/qF1pdeMu8tj7+48=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Jr9lNuEOMS2DqrFPyu5S68MJZ5GqIrU58Lm1iTr7ajshWHlSGu4NSC7S+Wh7qgoLf nBiDDBAGM7uD1/N1uurBI18fqYwsCxShr/DPNAw27+eZfaWge+whlBUZKmQvoUMUuF z+/q4AwN0R1eUknJ2+T3+4oEcsQt+Nj5xHII/oA2K9O7fgo069jlMhfgvD2kPfFVDl sFFOnwBuBm+CsBXL+cQkrIpEA57IadsDMXRoBF3JKF/VggDDu64O02HdINKOrYt8GY +/q7rvkRZAp/WVrYm/BEAPP+1Z8Spv5lStRB+89Vl8ADJQieJ9Z6RCW1umZXCPlZn2 mphuzlHKnrw5Q== Message-ID: <235d9db4-2ca5-4d7a-bd2a-36f98d1880a9@kernel.org> Date: Fri, 26 Apr 2024 17:37:07 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [f2fs-dev] [PATCH 2/2] f2fs: remove unnecessary block size check in init_f2fs_fs() To: Zhiguo Niu Cc: jaegeuk@kernel.org, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net References: <20240416072108.5819-1-chao@kernel.org> <20240416072108.5819-2-chao@kernel.org> Content-Language: en-US From: Chao Yu In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2024/4/16 19:12, Zhiguo Niu wrote: > On Tue, Apr 16, 2024 at 3:22 PM Chao Yu wrote: >> >> After commit d7e9a9037de2 ("f2fs: Support Block Size == Page Size"), >> F2FS_BLKSIZE equals to PAGE_SIZE, remove unnecessary check condition. >> >> Signed-off-by: Chao Yu >> --- >> fs/f2fs/super.c | 6 ------ >> 1 file changed, 6 deletions(-) >> >> diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c >> index 6d1e4fc629e2..32aa6d6fa871 100644 >> --- a/fs/f2fs/super.c >> +++ b/fs/f2fs/super.c >> @@ -4933,12 +4933,6 @@ static int __init init_f2fs_fs(void) >> { >> int err; >> >> - if (PAGE_SIZE != F2FS_BLKSIZE) { >> - printk("F2FS not supported on PAGE_SIZE(%lu) != BLOCK_SIZE(%lu)\n", >> - PAGE_SIZE, F2FS_BLKSIZE); >> - return -EINVAL; >> - } >> - >> err = init_inodecache(); >> if (err) >> goto fail; > Dear Chao, > > Can you help modify the following comment msg together with this patch? > They are also related to commit d7e9a9037de2 ("f2fs: Support Block > Size == Page Size"). > If you think there is a more suitable description, please help modify > it directly. Zhiguo, I missed to reply this, I guess you can update "f2fs: fix some ambiguous comments". > thanks! > > diff --git a/include/linux/f2fs_fs.h b/include/linux/f2fs_fs.h > index a357287..241e7b18 100644 > --- a/include/linux/f2fs_fs.h > +++ b/include/linux/f2fs_fs.h > @@ -394,7 +394,8 @@ struct f2fs_nat_block { > > /* > * F2FS uses 4 bytes to represent block address. As a result, supported size of > - * disk is 16 TB and it equals to 16 * 1024 * 1024 / 2 segments. > + * disk is 16 TB for a 4K page size and 64 TB for a 16K page size and it equals disk is 16 TB for 4K size block and 64 TB for 16K size block and it equals to (1 << 32) / 512 segments. #define F2FS_MAX_SEGMENT ((1 << 32) / 512) Thanks, > + * to 16 * 1024 * 1024 / 2 segments. > */ > #define F2FS_MAX_SEGMENT ((16 * 1024 * 1024) / 2) > > @@ -424,8 +425,10 @@ struct f2fs_sit_block { > /* > * For segment summary > * > - * One summary block contains exactly 512 summary entries, which represents > - * exactly one segment by default. Not allow to change the basic units. > + * One summary block with 4KB size contains exactly 512 summary entries, which > + * represents exactly one segment with 2MB size. > + * Similarly, in the case of 16k block size, it represents one > segment with 8MB size. > + * Not allow to change the basic units. > * > * NOTE: For initializing fields, you must use set_summary > * > @@ -556,6 +559,7 @@ struct f2fs_summary_block { > > /* > * space utilization of regular dentry and inline dentry (w/o extra > reservation) > + * when block size is 4KB. > > > >> -- >> 2.40.1 >> >> >> >> _______________________________________________ >> Linux-f2fs-devel mailing list >> Linux-f2fs-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel