From: Namjae Jeon Subject: RE: [PATCH v5 1/5] fat: add i_disksize to represent uninitialized size Date: Tue, 14 Oct 2014 12:50:14 +0900 Message-ID: <003001cfe761$f618ad10$e24a0730$@samsung.com> References: <000101cfd881$e50255b0$af070110$@samsung.com> <87d29x78qe.fsf@devron.myhome.or.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: 'Andrew Morton' , linux-fsdevel@vger.kernel.org To: 'OGAWA Hirofumi' Return-path: Received: from mailout1.samsung.com ([203.254.224.24]:32520 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754487AbaJNDuU (ORCPT ); Mon, 13 Oct 2014 23:50:20 -0400 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NDF00CGH1BTVA60@mailout1.samsung.com> for linux-fsdevel@vger.kernel.org; Tue, 14 Oct 2014 12:50:17 +0900 (KST) In-reply-to: <87d29x78qe.fsf@devron.myhome.or.jp> Content-language: ko Sender: linux-fsdevel-owner@vger.kernel.org List-ID: > > Namjae Jeon writes: > > > Adding i_disksize to represent uninitialized allocated size. > > And mmu_private represent initialized allocated size. > > i_disksize - is always kept cluster size aligned > > mmu_private - is normally block size aligned > > Hi, Hi OGAWA, > > While reading this with fresh mind, I've now noticed i_disksize is > lesser i_blocks in fatfs? Yes. > > Well, if fallocate inode, what number should we return? I.e. it returns > really allocated blocks, or fake blocks in i_size? It should return allocated blocks. And i_blocks is also updated by fat_chain_add in fat_fallocate. > > If we can use i_blocks (fatfs doesn't have hole), maybe, this patch > become simpler. If not, I think we should add i_disksize changes more > like i_blocks does. Yes, We can use i_blocks instead of i_disksize. > > What do you think? As you pointed out, Using i_blocks will make this patch more simple. Thanks for review! > > Thanks. > > OGAWA Hirofumi