Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752223AbbB0Jkg (ORCPT ); Fri, 27 Feb 2015 04:40:36 -0500 Received: from mailout4.samsung.com ([203.254.224.34]:15246 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750716AbbB0Jkd (ORCPT ); Fri, 27 Feb 2015 04:40:33 -0500 X-AuditID: cbfee61a-f79c06d000004e71-30-54f03b8fcaf4 From: Chao Yu To: "'Wanpeng Li'" , "'Jaegeuk Kim'" Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net References: <1425020704-10355-1-git-send-email-wanpeng.li@linux.intel.com> In-reply-to: <1425020704-10355-1-git-send-email-wanpeng.li@linux.intel.com> Subject: RE: [f2fs-dev] [PATCH] f2fs: fix max orphan inodes calculation Date: Fri, 27 Feb 2015 17:39:39 +0800 Message-id: <018001d05271$6cc02c20$46408460$@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: AQG8ujK5k+lGg+sYmhGnWuN/d6bbDp0rUtrg Content-language: zh-cn X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrOLMWRmVeSWpSXmKPExsVy+t9jQd1+6w8hBhuPSFg8WT+L2eLSIneL y7vmsFnce7KN3YHFY9OqTjaPeScDPXYv+Mzk8XmTXABLFJdNSmpOZllqkb5dAlfG9i9z2QuW 8lSsX7OKtYGxh6uLkYNDQsBE4sxSuS5GTiBTTOLCvfVsXYxcHEIC0xklNvU/ZwdJCAn8YJTY sNIDxGYTUJFY3vGfCcQWEQiW+Hz0JwvIHGYBD4ldx0ohyr0kjk2Zxgpicwp4S1ze/IoFxBYW cJfofrOGDcRmEVCVuHJjO1icV8BS4ubN/ewQtqDEj8n3wOLMAloS63ceZ4Kw5SU2r3nLDHGn gsSOs68ZIU4wkrjQeosVokZcYuORWywTGIVmIRk1C8moWUhGzULSsoCRZRWjaGpBckFxUnqu oV5xYm5xaV66XnJ+7iZGcPA/k9rBuLLB4hCjAAejEg9vB+uHECHWxLLiytxDjBIczEoivIwP 34cI8aYkVlalFuXHF5XmpBYfYpTmYFES51WybwsREkhPLEnNTk0tSC2CyTJxcEo1MAZtKlnk dbmQ+1LOgYt/9jzU3DdJNPWmKO/am2JST5LcLWsdPvrc0F6zlvmL3a/E3qumdl3F5h3XVkiH FVyx0Pz5Kzt4dueDz6l575p4WjunSn8oe6bhVsW1VDNiatT99UHNVoEbpP1n8G+yD/yUq6d6 3lHj4PSzUw7kLtOfunRHk968NaGc95RYijMSDbWYi4oTAY1iiTR6AgAA Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1778 Lines: 45 Hi Wanpeng, > -----Original Message----- > From: Wanpeng Li [mailto:wanpeng.li@linux.intel.com] > Sent: Friday, February 27, 2015 3:05 PM > To: Jaegeuk Kim > Cc: Wanpeng Li; linux-kernel@vger.kernel.org; linux-f2fs-devel@lists.sourceforge.net > Subject: [f2fs-dev] [PATCH] f2fs: fix max orphan inodes calculation > > cp_payload is introduced for sit bitmap to support large volume, and it is > just after the block of f2fs_checkpoint + nat bitmap, so the first segment > should include F2FS_CP_PACKS + NR_CURSEG_TYPE + cp_payload + orphan blocks. > However, current max orphan inodes calculation don't consider cp_payload, > this patch fix it by reducing the number of cp_payload from total blocks of > the first segment when calculate max orphan inodes. > > Signed-off-by: Wanpeng Li > --- > fs/f2fs/checkpoint.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c > index db82e09..3c9d677 100644 > --- a/fs/f2fs/checkpoint.c > +++ b/fs/f2fs/checkpoint.c > @@ -1109,7 +1109,7 @@ void init_ino_entry_info(struct f2fs_sb_info *sbi) > * for cp pack we can have max 1020*504 orphan entries The description above should be wrong, can you please update it in this patch? > */ > sbi->max_orphans = (sbi->blocks_per_seg - F2FS_CP_PACKS - > - NR_CURSEG_TYPE) * F2FS_ORPHANS_PER_BLOCK; > + NR_CURSEG_TYPE - __cp_payload(sbi)) * F2FS_ORPHANS_PER_BLOCK; There is a trivial coding style issue: "line over 80 characters" Thanks, -- 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/