linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ted Ts'o <tytso@mit.edu>
To: Robin Dong <hao.bigrat@gmail.com>
Cc: linux-ext4@vger.kernel.org, Robin Dong <sanbai@taobao.com>
Subject: Re: [PATCH 0/9 v2 bigalloc] ext4: change unit of extent's ee_block and ee_len from block to cluster for bigalloc
Date: Fri, 18 Nov 2011 23:22:20 -0500	[thread overview]
Message-ID: <20111119042220.GF4130@thunk.org> (raw)
In-Reply-To: <1321612984-10228-1-git-send-email-hao.bigrat@gmail.com>

On Fri, Nov 18, 2011 at 06:42:55PM +0800, Robin Dong wrote:
> From: Robin Dong <sanbai@taobao.com>
> 
> This patch series change ee_block and ee_len (of extent) 's unit
> from "block" to "cluster", since it could reduce the space occupied
> by meta data.
> 
> This patch series should be used after Ted's bigalloc-patchs and it
> now can't support:
> 1. delay allocation
> 2. 1k/2k blocksize

It *can't* support delayed allocation or sub-4k block sizes?  That's
only with your modified bigalloc enabled, I presume, right?

If we are going to support this modified bigalloc, I think it only
makes sense to do it as new file system feature, so we can support
both extents which are denominated in blocks, as well as extents which
are denominated in clusters.

But it may be that we're better off biting the bullet and supporting
at 2nd extent format, which looks like this:

struct ext4_extent2 {
       __le64	   ee_block;	/* first logical block extent covers */
       __le64	   ee_start;	/* starting physical block */
       __le32	   ee_len;	/* number of blocks covered by extent */
       __le32	   ee_flags;    /* flags and future extension */
};

This is 24 bytes, which means we can only fit two extents in the inode
(12 bytes header, plus two 24 byte extents).  But it expands the size
of files we can support, as well as supporting larger volumes.

Yes, using units of clusters could support this as well, but the fact
that it is required that sparse blocks have to get zeroed out to the
nearest cluster binary means that it's only going to work for clusters
sizes of 128k at most, since the requirements that clusters get
zero'ed out when doing a partial write is going to get pretty onerous
much beyond that size.

						- Ted




      parent reply	other threads:[~2011-11-19  4:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-18 10:42 [PATCH 0/9 v2 bigalloc] ext4: change unit of extent's ee_block and ee_len from block to cluster for bigalloc Robin Dong
2011-11-18 10:42 ` [PATCH 1/9 v2 bigalloc] ext4: get blocks from ext4_ext_get_actual_blocks Robin Dong
2011-11-18 10:42 ` [PATCH 2/9 v2 bigalloc] ext4: change ext4_ext_map_blocks to allocate clusters instead of blocks Robin Dong
2011-11-18 10:42 ` [PATCH 3/9 v2 bigalloc] ext4: change unit of extent's ee_block to cluster Robin Dong
2011-11-18 10:42 ` [PATCH 4/9 v2 bigalloc] ext4: remove unused functions and tags Robin Dong
2011-11-18 10:43 ` [PATCH 5/9 v2 bigalloc] ext4: zero out extra pages when users write one page Robin Dong
2011-11-18 10:43 ` [PATCH 6/9 v2 bigalloc] ext4: zero out extra page when users truncate a file Robin Dong
2011-11-18 10:43 ` [PATCH 7/9 v2 bigalloc] ext4: allocate a cluster for a directory when it need spaces Robin Dong
2011-11-18 10:43 ` [PATCH 8/9 v2 bigalloc] ext4: align fallocate size to a whole cluster Robin Dong
2011-11-18 10:43 ` [PATCH 9/9 v2 bigalloc] ext4: make cluster works for mmap Robin Dong
2011-11-19  4:22 ` Ted Ts'o [this message]

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=20111119042220.GF4130@thunk.org \
    --to=tytso@mit.edu \
    --cc=hao.bigrat@gmail.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=sanbai@taobao.com \
    /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).