linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@clusterfs.com>
To: "Amit K. Arora" <aarora@linux.vnet.ibm.com>
Cc: linux-ext4@vger.kernel.org, suparna@in.ibm.com, cmm@us.ibm.com,
	suzuki@in.ibm.com, alex@clusterfs.com
Subject: Re: [RFC][Patch 2/2] Persistent preallocation in ext4
Date: Fri, 15 Dec 2006 16:02:25 -0700	[thread overview]
Message-ID: <20061215230225.GT5937@schatzie.adilger.int> (raw)
In-Reply-To: <20061215123920.GB24572@amitarora.in.ibm.com>

On Dec 15, 2006  18:09 +0530, Amit K. Arora wrote:
> This patch makes writing to the unitialized extent possible. A write operation on an unitialized extent *may* (depending on the relative block location in the extent and number of blocks being written) result in spliting the extent. There are three possibilities:
> 1. The extent does not split : This will happen when the entire extent is being written to. In this case the extent will be marked "initialized" and merged (if possible) with the neighbouring extents in the tree.

This should also be true if the write is at the beginning or the end of the
uninitialized extent and the disk allocation matches the previous or next
extent.  The newly-written part is merged with the adjacent extent, and the
uninitialized extent is shrunk appropriately.

Doing this as a special case of #2 may result in extra tree rebalancing as
the extra extent is added and removed repeatedly (consider the case of a
large hole being overwritten in smaller chunks that is just at the limit
of the number of extents in the parent block).

> 2. The extent splits in two portions : This will happen when someone is writing to any one end of the extent (i.e. not in the middle, and not to the entire extent). This will result in breaking the extent in two portions, an initialized extent (the set of blocks being written to) and an uninitialized extent (rest of the blocks in the parent extent).
> 3. The extent is split in three parts: This occurs when someone writes in the middle of the extent. It will result into three extents, two uninitialized (at the both ends) and one initialized (in middle).
> 
> Since the extent merge logic was getting redundant, it has been put into a new function ext4_ext_try_to_merge(). This gets called from ext4_ext_insert_extent() and ext4_ext_get_blocks(), when required.

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

  reply	other threads:[~2006-12-15 23:02 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-05 13:43 [RFC][Patch 1/1] Persistent preallocation in ext4 Amit K. Arora
2006-12-06  5:58 ` Amit K. Arora
2006-12-12  1:28   ` Mingming Cao
2006-12-12  6:23     ` Amit K. Arora
2006-12-13  0:20       ` Mingming Cao
2006-12-13 10:01         ` Amit K. Arora
2006-12-13 13:36           ` Dave Kleikamp
2006-12-13 15:38             ` Suparna Bhattacharya
2006-12-13 15:54             ` Mingming Cao
2006-12-15 12:35   ` [RFC][Patch 1/2] " Amit K. Arora
2006-12-19 11:05     ` Amit K. Arora
     [not found]       ` <20061219211206.GO5937@schatzie.adilger.int>
2006-12-20  6:28         ` Amit K. Arora
2006-12-27 23:30     ` Mingming Cao
2007-01-02 11:04       ` Amit K. Arora
2007-01-02 22:47         ` Mingming Cao
2007-01-09  9:05         ` Amit K. Arora
2006-12-15 12:39 ` [RFC][Patch 2/2] " Amit K. Arora
2006-12-15 23:02   ` Andreas Dilger [this message]
2006-12-16  4:30     ` Amit K. Arora
2006-12-19 11:42   ` Amit K. Arora
2006-12-19 11:54     ` Amit K. Arora
2006-12-19 21:14     ` Andreas Dilger
2006-12-19 21:23       ` Eric Sandeen
2006-12-20  8:19         ` Amit K. Arora
2006-12-22 15:16       ` Amit K. Arora
2006-12-22 15:31         ` Alex Tomas

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=20061215230225.GT5937@schatzie.adilger.int \
    --to=adilger@clusterfs.com \
    --cc=aarora@linux.vnet.ibm.com \
    --cc=alex@clusterfs.com \
    --cc=cmm@us.ibm.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=suparna@in.ibm.com \
    --cc=suzuki@in.ibm.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).