mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@clusterfs.com>
To: Takashi Sato <sho@tnes.nec.co.jp>
Cc: Johann Lombardi <johann.lombardi@bull.net>,
	ext2-devel@lists.sourceforge.net, cmm@us.ibm.com,
	linux-kernel@vger.kernel.org
Subject: Re: [Ext2-devel] [RFC 1/2] ext3: enlarge blocksize and fix rec_lenoverflow
Date: Thu, 29 Jun 2006 10:30:45 -0600	[thread overview]
Message-ID: <20060629163045.GA5318@schatzie.adilger.int> (raw)
In-Reply-To: <04d401c69b69$581db0d0$4168010a@bsd.tnes.nec.co.jp>

On Jun 29, 2006  19:46 +0900, Takashi Sato wrote:
> >On Jun 28, 2006  17:50 +0200, Johann Lombardi wrote:
> >>ext2/ext3_dir_entry_2 has a 16-bit entry(rec_len) and it would overflow
> >>with 64KB blocksize.  This patch prevent from overflow by limiting
> >>rec_len to 65532.
> >
> >Having a max rec_len of 65532 is rather unfortunate, since the dir
> >blocks always need to filled with dir entries.
> 
> Oh, that's right.
> 
> >65536 - 65532 = 4, and
> >the minimum ext3_dir_entry size is 8 bytes.  I would instead make this
> >maybe 64 bytes less so that there is room for a filename in the "tail"
> >dir_entry.
> 
> What does "64 bytes" mean?
> Do you mean that the following dummy entry should be added
> at the tail of the directory block?
> 
> struct ext3_dir_entry_2 {
> __le32 inode   = 0
> __le16 rec_len = 16
> __u8 name_len  = 4
> __u8 file_type = 0
> char name      = "dir_end"
> };

Sure, something like this.  The goal of this dir entry is to:
a) fill up the remaining space in the dir block
b) be large enough to be used later on when the start of the block has
   been consumed, so it shouldn't be too small.  It could even be as
   large as 4kB or 8kB or 32kB.

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


  reply	other threads:[~2006-06-29 17:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-28 11:52 [RFC 1/2] ext3: enlarge blocksize and fix rec_len overflow sho
2006-06-28 15:50 ` Johann Lombardi
2006-06-28 20:24   ` Andreas Dilger
2006-06-29 10:46     ` [Ext2-devel] [RFC 1/2] ext3: enlarge blocksize and fix rec_lenoverflow Takashi Sato
2006-06-29 16:30       ` Andreas Dilger [this message]
2006-06-29 18:10     ` [RFC 1/2] ext3: enlarge blocksize and fix rec_len overflow Daniel Phillips
2006-06-29 20:27       ` Andreas Dilger
2006-06-29 22:14         ` Daniel Phillips
2006-06-30  9:31           ` Johann Lombardi
2006-06-30 18:19             ` Daniel Phillips
2006-07-01  8:39               ` Andreas Dilger
2006-07-01 10:27                 ` Michael Tokarev
2006-07-05 18:41                 ` Daniel Phillips

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=20060629163045.GA5318@schatzie.adilger.int \
    --to=adilger@clusterfs.com \
    --cc=cmm@us.ibm.com \
    --cc=ext2-devel@lists.sourceforge.net \
    --cc=johann.lombardi@bull.net \
    --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

all inboxes | Powered by JetHome®