From: "Takashi Sato" Subject: RE: [PATCH 2/3] Fix problems on multi-TB filesystem and file Date: Fri, 13 Jan 2006 22:50:19 +0900 Message-ID: <000101c61848$4dd3b5b0$4168010a@bsd.tnes.nec.co.jp> References: <20060112183319.526b877a.akpm@osdl.org> Cc: , , , , Return-path: Received: from TYO206.gate.nec.co.jp ([202.32.8.206]:25830 "EHLO tyo202.gate.nec.co.jp") by vger.kernel.org with ESMTP id S1030278AbWAMNu1 (ORCPT ); Fri, 13 Jan 2006 08:50:27 -0500 Received: from mailgate3.nec.co.jp (mailgate53.nec.co.jp [10.7.69.161] (may be forged)) by tyo202.gate.nec.co.jp (8.11.7/3.7W01080315) with ESMTP id k0DDoQb08481 for ; Fri, 13 Jan 2006 22:50:26 +0900 (JST) Received: (from root@localhost) by mailgate3.nec.co.jp (8.11.7/3.7W-MAILGATE-NEC) id k0DDoQw24254 for linux-fsdevel@vger.kernel.org; Fri, 13 Jan 2006 22:50:26 +0900 (JST) Received: from secsv2.tnes.nec.co.jp (tnesvc1.tnes.nec.co.jp [10.1.101.14]) by mailsv4.nec.co.jp (8.11.7/3.7W-MAILSV4-NEC) with ESMTP id k0DDoPL03315 for ; Fri, 13 Jan 2006 22:50:25 +0900 (JST) Received: from TNESVC1.tnes.nec.co.jp ([10.1.101.14]) by secsv2.tnes.nec.co.jp (ExpressMail 5.10) with SMTP id 20060113.225049.56003444 for ; Fri, 13 Jan 2006 22:50:49 +0900 To: "'Andrew Morton'" In-Reply-To: <20060112183319.526b877a.akpm@osdl.org> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Hi, > > This is a patch to add blkcnt_t as the type of inode.i_blocks. > > This enables you to make the size of blkcnt_t either 4 bytes or 8 bytes > > on 32 bits architecture with CONFIG_LSF. > > What was the rationale behind CONFIG_LSF? It's a bit of an ugly thing and > I'm wondering if we wouldn't be better off just removing it and simply > fixing >2TB support for all .configs? We should avoid needless growth of heavily-used structure such as inode for a small system like embedded system. So I make it possible to configure the size of i_blocks with CONFIG_LSF. > Do the common userspace tools need to be updated for this, or do they > already get it right? glibc's st_blocks is always 8 bytes as below. __blkcnt64_t st_blocks; On the original kernel, a padding for st_blocks is set at appropriate location for each endian types as below. So, there is no need to fix user program(glibc). include/asm-i386/stat.h: -------------------------------------------------------------------------- unsigned long st_blocks; /* Number 512-byte blocks allocated. */ unsigned long __pad4; /* future possible st_blocks high bits */ --------------------------------------------------------------------------- include/asm-m68k/stat.h: -------------------------------------------------------------------------- unsigned long __pad4; /* future possible st_blocks high bits */ unsigned long st_blocks; /* Number 512-byte blocks allocated. */ -------------------------------------------------------------------------- -- Takashi Sato