Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753590AbbHSLDN (ORCPT ); Wed, 19 Aug 2015 07:03:13 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:51488 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751465AbbHSLDL (ORCPT ); Wed, 19 Aug 2015 07:03:11 -0400 X-AuditID: cbfee61b-f79706d000001b96-b6-55d4626d4619 From: Chao Yu To: Jaegeuk Kim Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: [PATCH 1/9] f2fs: add annotation for space utilization of regular/inline dentry Date: Wed, 19 Aug 2015 19:02:02 +0800 Message-id: <016d01d0da6e$a2d12e60$e8738b20$@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-index: AdDabPGBrrQzsOC8StSeAaQdDqKOAg== Content-language: zh-cn X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrDLMWRmVeSWpSXmKPExsVy+t9jQd3cpCuhBufXmFk8WT+L2eLSIneL y7vmsDkwe2xa1cnmsXvBZyaPz5vkApijuGxSUnMyy1KL9O0SuDK+da9kLLjLXfFq9gf2BsYZ nF2MnBwSAiYSS2f0MULYYhIX7q1n62Lk4hASmMUo8e/BWiYI5xWjxMvvD1hBqtgEVCSWd/xn ArFFgOxDiy6zg9jMAh4SjR3fwWqEBaIkzk66DmazCKhKPFr+mRnE5hWwlPhx/SQjhC0o8WPy PRaIXi2J9TuPM0HY8hKb17xlhrhIQWLH2deMELv0JPqe9UDtEpfYeOQWywRGoDMRRs1CMmoW klGzkLQsYGRZxSiRWpBcUJyUnmuUl1quV5yYW1yal66XnJ+7iREcxs+kdzAe3uV+iFGAg1GJ h3fGtsuhQqyJZcWVuYcYJTiYlUR4byVcCRXiTUmsrEotyo8vKs1JLT7EKM3BoiTOq2+yKVRI ID2xJDU7NbUgtQgmy8TBKdXA2HWFw9hF0cG6nrfe4peARxPnxA0bPp/ofKeWtPbkpl7OY2qZ d5VCLfu8WQodLCKlNnBlr/R9Yv3u2LX0SXKmDsI1i49dVJdbWtcScmTlwsNsARKssbOmWPYY zP1fq8p/KkDk58GI/UrsXw9qe2U2ejy6mzJf2Mlq0+l6YyZ7/o2i5TlNxdxKLMUZiYZazEXF iQAf1ZqsXwIAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1701 Lines: 50 Add annotation to let us know more clearly about space utilization information of regular dentry and inline dentry. Signed-off-by: Chao Yu --- include/linux/f2fs_fs.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/include/linux/f2fs_fs.h b/include/linux/f2fs_fs.h index 920408a..25c6324 100644 --- a/include/linux/f2fs_fs.h +++ b/include/linux/f2fs_fs.h @@ -417,15 +417,25 @@ typedef __le32 f2fs_hash_t; #define GET_DENTRY_SLOTS(x) ((x + F2FS_SLOT_LEN - 1) >> F2FS_SLOT_LEN_BITS) -/* the number of dentry in a block */ -#define NR_DENTRY_IN_BLOCK 214 - /* MAX level for dir lookup */ #define MAX_DIR_HASH_DEPTH 63 /* MAX buckets in one level of dir */ #define MAX_DIR_BUCKETS (1 << ((MAX_DIR_HASH_DEPTH / 2) - 1)) +/* + * space utilization of regular dentry and inline dentry + * regular dentry inline dentry + * bitmap 1 * 27 = 27 1 * 23 = 23 + * reserved 1 * 3 = 3 1 * 7 = 7 + * dentry 11 * 214 = 2354 11 * 182 = 2002 + * filename 8 * 214 = 1712 8 * 182 = 1456 + * total 4096 3488 + * + * Note: there are more reserved space in inline dentry than in regular + * dentry, when converting inline dentry we should handle this carefully. + */ +#define NR_DENTRY_IN_BLOCK 214 /* the number of dentry in a block */ #define SIZE_OF_DIR_ENTRY 11 /* by byte */ #define SIZE_OF_DENTRY_BITMAP ((NR_DENTRY_IN_BLOCK + BITS_PER_BYTE - 1) / \ BITS_PER_BYTE) -- 2.4.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/