linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@clusterfs.com>
To: Mingming Cao <cmm@us.ibm.com>
Cc: Andrew Morton <akpm@osdl.org>, Takashi Sato <sho@tnes.nec.co.jp>,
	Laurent Vivier <Laurent.Vivier@bull.net>,
	linux-kernel@vger.kernel.org,
	ext2-devel <ext2-devel@lists.sourceforge.net>,
	linux-fsdevel@vger.kernel.org
Subject: Re: [RFC][PATCH 0/2]Extend ext3 filesystem limit from 8TB to 16TB
Date: Thu, 30 Mar 2006 10:36:37 -0700	[thread overview]
Message-ID: <20060330173637.GV5030@schatzie.adilger.int> (raw)
In-Reply-To: <1143682730.4045.145.camel@dyn9047017067.beaverton.ibm.com>

On Mar 29, 2006  17:38 -0800, Mingming Cao wrote:
> There are places in ext3 code to use "int" to represent block numbers in
> kernel(not on-disk). This seems the "only" reason that why we can only
> have 8TB ext3 rather than 16TB.  Most times it just a bug with no
> particular reason why not use unsigned 32 bit value, so the fix is easy.
> 
> However, it is not so straightforward fix for the ext3 block allocation
> code, as ext3_new_block() returns a block number, and "-1" to indicating
> block allocation failure. Ext3 block reservation code, called by
> ext3_new_block(), thus also use "int" for block numbers in some places.

What might make the code a lot clearer, easier to audit, and easier to
fix in the future is to declare new types for fs block offsets and group
block offsets.  Something like "ext3_fsblk" and "ext3_grblk".  That way,
we can declare ext3_fsblk as "unsigned long" and "ext3_grblk" as "unsigned
int", and we could optionally change ext3_fsblk to be "unsigned long long"
later to support 64-bit filesystems without having to re-patch all of the
code.

It would be more clear what type of block offset a function is handling
(fs-wide or group-relative).  If we wanted to be able to overload the
block number with an error code we could use ERR_PTR and PTR_ERR like
macros, and just restrict the filesystem to 2^32 - 1024 blocks until we
extend it to 64 bits.

Cheers, Andreas
--
Andreas Dilger
Principal Software Engineer
Cluster File Systems, Inc.


  parent reply	other threads:[~2006-03-30 17:36 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20060325223358sho@rifu.tnes.nec.co.jp>
     [not found] ` <1143485147.3970.23.camel@dyn9047017067.beaverton.ibm.com>
     [not found]   ` <20060327131049.2c6a5413.akpm@osdl.org>
     [not found]     ` <20060327225847.GC3756@localhost.localdomain>
     [not found]       ` <1143530126.11560.6.camel@openx2.frec.bull.fr>
     [not found]         ` <1143568905.3935.13.camel@dyn9047017067.beaverton.ibm.com>
     [not found]           ` <1143623605.5046.11.camel@openx2.frec.bull.fr>
2006-03-30  1:38             ` [RFC][PATCH 0/2]Extend ext3 filesystem limit from 8TB to 16TB Mingming Cao
2006-03-30  1:54               ` Andrew Morton
2006-03-31 22:42                 ` Mingming Cao
2006-04-02 20:13                   ` Mingming Cao
2006-04-10  9:11                 ` [Ext2-devel] " Laurent Vivier
2006-04-10  8:24                   ` Andrew Morton
2006-04-13 15:26                     ` Laurent Vivier
2006-04-17 21:07                       ` Ravikiran G Thirumalai
2006-04-17 21:09                         ` Arjan van de Ven
2006-04-17 21:32                           ` Ravikiran G Thirumalai
2006-04-18  7:14                             ` Laurent Vivier
2006-04-18  7:30                               ` [Ext2-devel] " Arjan van de Ven
2006-04-18 10:57                                 ` Laurent Vivier
2006-04-18 19:08                                   ` Ravikiran G Thirumalai
2006-04-18 14:09                                 ` Laurent Vivier
2006-04-18 21:01                                 ` [Ext2-devel] " Mingming Cao
2006-04-20 11:28                                   ` Laurent Vivier
2006-04-20 14:39                                   ` Laurent Vivier
2006-04-21 11:17                                     ` [Ext2-devel] " Laurent Vivier
2006-04-10 16:57                   ` Mingming Cao
2006-04-10 19:06                     ` Mingming Cao
2006-04-11  7:07                       ` Laurent Vivier
2006-04-14 17:23                         ` [Ext2-devel] " Ravikiran G Thirumalai
2006-03-30 17:36               ` Andreas Dilger [this message]
2006-03-30 19:01                 ` Mingming Cao
2006-03-30 17:40               ` Andreas Dilger
2006-03-30 19:16                 ` Mingming Cao
2006-03-30 19:22                   ` Mingming Cao
2006-03-31  6:42                     ` Andreas Dilger
2006-03-31 13:33                   ` Andi Kleen
2006-04-01  6:50                     ` Nathan Scott
2006-05-26  5:00               ` [PATCH 0/2]Define ext3 in-kernel filesystem block types and extend " Mingming Cao
2006-05-26 18:08                 ` Andrew Morton
2006-05-30 17:55                   ` Mingming Cao
2006-03-30  1:39             ` [RFC][PATCH 1/2]ext3 block allocation/reservation fixes to support 2**32 block numbers Mingming Cao
2006-03-30  1:39             ` [RFC][PATCH 2/2]Other ext3 in-kernel block number type fix " Mingming Cao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060330173637.GV5030@schatzie.adilger.int \
    --to=adilger@clusterfs.com \
    --cc=Laurent.Vivier@bull.net \
    --cc=akpm@osdl.org \
    --cc=cmm@us.ibm.com \
    --cc=ext2-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sho@tnes.nec.co.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).