linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Tso <tytso@mit.edu>
To: Eric Sandeen <sandeen@redhat.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH 1/3] libext2fs: ext2fs_node_split
Date: Sat, 17 May 2008 19:20:43 -0400	[thread overview]
Message-ID: <20080517232043.GF16496@mit.edu> (raw)
In-Reply-To: <1210875464-25552-2-git-send-email-sandeen@redhat.com>

> +	/* splitting root level means moving them all out */
> +	if (handle->level == 0) {
> +		new_root = 1;
> +		tocopy = ext2fs_le16_to_cpu(eh->eh_entries);
> +	} else {
> +		tocopy = ext2fs_le16_to_cpu(eh->eh_entries) / 2;
> +	}

This is probably in the "would be nice" category, but if we know that
we are appending to the file, it might actually be better to move all
of the entries into one block, and create an empty block to the right.
That way, the average density of the leaf nodes will be much closer to
100%, instead of 50% full.

This optimization is far more important in the kernel, though.

     		     	      		       - Ted

  parent reply	other threads:[~2008-05-17 23:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1210875464-25552-1-git-send-email-sandeen@redhat.com>
2008-05-15 18:17 ` [PATCH 1/3] libext2fs: ext2fs_node_split Eric Sandeen
2008-05-17 22:52   ` Theodore Tso
2008-05-17 23:21     ` Eric Sandeen
2008-05-17 23:20   ` Theodore Tso [this message]
2008-05-15 18:17 ` [PATCH 2/3] libext2fs: allow ext2fs_extent_insert to split if needed Eric Sandeen
2008-05-15 18:17 ` [PATCH 3/3] libext2fs: add ext2fs_extent_set_bmap Eric Sandeen
2008-05-20 15:11 [PATCH 0/3] e2fsprogs set_bmap & friends V2 Eric Sandeen
2008-05-20 15:14 ` [PATCH 1/3] libext2fs: ext2fs_node_split Eric Sandeen
2008-05-27  4:22   ` Theodore Tso
2008-06-02  6:53     ` Theodore Tso

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=20080517232043.GF16496@mit.edu \
    --to=tytso@mit.edu \
    --cc=linux-ext4@vger.kernel.org \
    --cc=sandeen@redhat.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).