Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753315AbbHUM7c (ORCPT ); Fri, 21 Aug 2015 08:59:32 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:45920 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753114AbbHUM7a (ORCPT ); Fri, 21 Aug 2015 08:59:30 -0400 X-AuditID: cbfee61b-f79706d000001b96-3d-55d720b129b3 From: Chao Yu To: "'Jaegeuk Kim'" Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org References: <017601d0da6f$bcb555d0$36200170$@samsung.com> <20150820171718.GC42028@jaegeuk-mac02.mot-mobility.com> In-reply-to: <20150820171718.GC42028@jaegeuk-mac02.mot-mobility.com> Subject: RE: [PATCH 2/9] f2fs: avoid unneeded initializing when converting inline dentry Date: Fri, 21 Aug 2015 20:58:46 +0800 Message-id: <021901d0dc11$34e67e60$9eb37b20$@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: AQEbATjKIa9H3iooHIyxakkZE1x8wwFjyoaXn3cAeSA= Content-language: zh-cn X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrMLMWRmVeSWpSXmKPExsVy+t9jQd2NCtdDDR6+krJ4sn4Ws8WlRe4W l3fNYXNg9ti0qpPNY/eCz0wenzfJBTBHcdmkpOZklqUW6dslcGXcfzyBvWA7X8XJU5sZGxhv cncxcnBICJhI/J6o1MXICWSKSVy4t56ti5GLQ0hgFqPEu8tnmSGcV4wSM1Z/YAepYhNQkVje 8Z8JxBYRUJPo3TcFzGYW8JBo7PjOCmILCRRLXOv/ABbnFHCRmLV0OguILSwQJXF2/TmwOSwC qhJLNh8Es3kFLCX+PN7JAmELSvyYfI8FYqaWxPqdx6Hmy0tsXvOWGeJSBYkdZ18zQtxgJXFt ShNUjbjExiO3WCYwCs1CMmoWklGzkIyahaRlASPLKkaJ1ILkguKk9FyjvNRyveLE3OLSvHS9 5PzcTYzgoH8mvYPx8C73Q4wCHIxKPLwzIq+FCrEmlhVX5h5ilOBgVhLh3Sl7PVSINyWxsiq1 KD++qDQntfgQozQHi5I4r77JplAhgfTEktTs1NSC1CKYLBMHp1QD46TioLeMs0sK6z6WZ8yP 3zyT99itutLDGdFe3xN5yivv3NzZxa2TGnWmW2hVxvzWtA3N6RyL7H0v9Nz2cjecNk0ubWGH s902oXuFe7zFZvEblXx/sIRvdzWfp86TE8/mHhScYGbU9WjuAmP+mdKJVW9kJy/Yf2bX4Xaj fAcPobb4NCUzu4OflViKMxINtZiLihMBBVpZtnYCAAA= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2042 Lines: 55 Hi Jaegeuk, > -----Original Message----- > From: Jaegeuk Kim [mailto:jaegeuk@kernel.org] > Sent: Friday, August 21, 2015 1:17 AM > To: Chao Yu > Cc: linux-f2fs-devel@lists.sourceforge.net; linux-kernel@vger.kernel.org > Subject: Re: [PATCH 2/9] f2fs: avoid unneeded initializing when converting inline dentry > > Hi Chao, > > On Wed, Aug 19, 2015 at 07:10:19PM +0800, Chao Yu wrote: > > When converting inline dentry, we will zero out target dentry page before > > duplicating data of inline dentry into target page, it become overhead > > since inline dentry size is not small. > > > > So this patch tries to remove unneeded initializing in the space of target > > dentry page. > > > > Signed-off-by: Chao Yu > > --- > > fs/f2fs/inline.c | 15 ++++++++++++++- > > 1 file changed, 14 insertions(+), 1 deletion(-) > > > > diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c > > index 79d18d5..e4da0d7 100644 > > --- a/fs/f2fs/inline.c > > +++ b/fs/f2fs/inline.c > > @@ -384,17 +384,30 @@ static int f2fs_convert_inline_dir(struct inode *dir, struct page *ipage, > > goto out; > > > > f2fs_wait_on_page_writeback(page, DATA); > > - zero_user_segment(page, 0, PAGE_CACHE_SIZE); > > + zero_user_segment(page, MAX_INLINE_DATA, PAGE_CACHE_SIZE); > > > > dentry_blk = kmap_atomic(page); > > > > /* copy data from inline dentry block to new dentry block */ > > memcpy(dentry_blk->dentry_bitmap, inline_dentry->dentry_bitmap, > > INLINE_DENTRY_BITMAP_SIZE); > > + memset(dentry_blk->dentry_bitmap + INLINE_DENTRY_BITMAP_SIZE, 0, > > + SIZE_OF_DENTRY_BITMAP - INLINE_DENTRY_BITMAP_SIZE); > > Setting zeros for bitmap would be enough. > It doesn't need to copy or set zeros for reserved, dentries, and filename slots. Oh, you're right, I will fix it. :) 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/