[patch 09/41] ext2: avoid rec_len overflow with 64KB block size

2007-10-21 Thread akpm
overflow-with-64kb-block-size fs/ext2/dir.c --- a/fs/ext2/dir.c~ext2-avoid-rec_len-overflow-with-64kb-block-size +++ a/fs/ext2/dir.c @@ -28,6 +28,24 @@ typedef struct ext2_dir_entry_2 ext2_dirent; +static inline unsigned ext2_rec_len_from_disk(__le16 dlen) +{ + unsigned len

- ext2-avoid-rec_len-overflow-with-64kb-block-size-checkpatch-fixes.patch removed from -mm tree

2007-10-19 Thread akpm
The patch titled ext2-avoid-rec_len-overflow-with-64kb-block-size-checkpatch-fixes has been removed from the -mm tree. Its filename was ext2-avoid-rec_len-overflow-with-64kb-block-size-checkpatch-fixes.patch This patch was dropped because it was folded into ext2-avoid-rec_len

Re: [PATCH 2/2] ext2: Avoid rec_len overflow with 64KB block size

2007-10-18 Thread Mingming Cao
On Wed, 2007-10-17 at 21:09 -0700, Andrew Morton wrote: > On Thu, 11 Oct 2007 13:18:49 +0200 Jan Kara <[EMAIL PROTECTED]> wrote: > > > With 64KB blocksize, a directory entry can have size 64KB which does not fit > > into 16 bits we have for entry lenght. So we store 0x instead and > > convert

Re: [PATCH 2/2] ext2: Avoid rec_len overflow with 64KB block size

2007-10-18 Thread Andrew Morton
On Thu, 18 Oct 2007 02:03:39 -0700 (PDT) Christoph Lameter <[EMAIL PROTECTED]> wrote: > On Wed, 17 Oct 2007, Andrew Morton wrote: > > > b) what happens when an old ext2 driver tries to read and/or write this > >directory entry? Do we need a compat flag for it? > > Old ext2 only supports up

Re: [PATCH 2/2] ext2: Avoid rec_len overflow with 64KB block size

2007-10-18 Thread Christoph Lameter
On Wed, 17 Oct 2007, Andrew Morton wrote: > b) what happens when an old ext2 driver tries to read and/or write this >directory entry? Do we need a compat flag for it? Old ext2 only supports up to 4k include/linux/ext2_fs.h: #define EXT2_MIN_BLOCK_SIZE 1024 #define EXT2_MAX_BLOC

+ ext2-avoid-rec_len-overflow-with-64kb-block-size-checkpatch-fixes.patch added to -mm tree

2007-10-17 Thread akpm
The patch titled ext2-avoid-rec_len-overflow-with-64kb-block-size-checkpatch-fixes has been added to the -mm tree. Its filename is ext2-avoid-rec_len-overflow-with-64kb-block-size-checkpatch-fixes.patch *** Remember to use Documentation/SubmitChecklist when testing your code *** See

Re: [PATCH 2/2] ext2: Avoid rec_len overflow with 64KB block size

2007-10-17 Thread Andrew Morton
On Thu, 11 Oct 2007 13:18:49 +0200 Jan Kara <[EMAIL PROTECTED]> wrote: > With 64KB blocksize, a directory entry can have size 64KB which does not fit > into 16 bits we have for entry lenght. So we store 0x instead and convert > value when read from / written to disk. btw, this changes ext2's

Re: [PATCH 2/2] ext2: Avoid rec_len overflow with 64KB block size

2007-10-17 Thread Andrew Morton
On Thu, 11 Oct 2007 13:18:49 +0200 Jan Kara <[EMAIL PROTECTED]> wrote: > +static inline __le16 ext2_rec_len_to_disk(unsigned len) > +{ > + if (len == (1 << 16)) > + return cpu_to_le16(EXT2_MAX_REC_LEN); > + else if (len > (1 << 16)) > + BUG(); > + return cpu_to_

Re: [PATCH 2/2] ext2: Avoid rec_len overflow with 64KB block size

2007-10-11 Thread Jan Kara
On Thu 04-10-07 13:12:07, Andrew Morton wrote: > On Mon, 01 Oct 2007 17:35:46 -0700 > Mingming Cao <[EMAIL PROTECTED]> wrote: > > > ext2: Avoid rec_len overflow with 64KB block size > > > > From: Jan Kara <[EMAIL PROTECTED]> > > > > With 6

Re: [PATCH 2/2] ext2: Avoid rec_len overflow with 64KB block size

2007-10-11 Thread Andrew Morton
rton wrote: > > > > On Mon, 01 Oct 2007 17:35:46 -0700 > > > > > ext2: Avoid rec_len overflow with 64KB block size > > > > > > > > > > into 16 bits we have for entry lenght. So we store 0x instead and > > > > > convert

Re: [PATCH 2/2] ext2: Avoid rec_len overflow with 64KB block size

2007-10-11 Thread Jan Kara
On Thu 04-10-07 16:11:21, Andrew Morton wrote: > On Thu, 4 Oct 2007 16:40:44 -0600 > Andreas Dilger <[EMAIL PROTECTED]> wrote: > > > On Oct 04, 2007 13:12 -0700, Andrew Morton wrote: > > > On Mon, 01 Oct 2007 17:35:46 -0700 > > > > ext2: A

Re: [PATCH 2/2] ext2: Avoid rec_len overflow with 64KB block size

2007-10-08 Thread Jan Kara
On Thu 04-10-07 13:12:07, Andrew Morton wrote: > On Mon, 01 Oct 2007 17:35:46 -0700 > Mingming Cao <[EMAIL PROTECTED]> wrote: > > > ext2: Avoid rec_len overflow with 64KB block size > > > > From: Jan Kara <[EMAIL PROTECTED]> > > > > With 6

Re: [PATCH 2/2] ext2: Avoid rec_len overflow with 64KB block size

2007-10-04 Thread Andrew Morton
On Thu, 4 Oct 2007 16:40:44 -0600 Andreas Dilger <[EMAIL PROTECTED]> wrote: > On Oct 04, 2007 13:12 -0700, Andrew Morton wrote: > > On Mon, 01 Oct 2007 17:35:46 -0700 > > > ext2: Avoid rec_len overflow with 64KB block size > > > > > > into 16 bits we

Re: [PATCH 2/2] ext2: Avoid rec_len overflow with 64KB block size

2007-10-04 Thread Andreas Dilger
On Oct 04, 2007 13:12 -0700, Andrew Morton wrote: > On Mon, 01 Oct 2007 17:35:46 -0700 > > ext2: Avoid rec_len overflow with 64KB block size > > > > into 16 bits we have for entry lenght. So we store 0x instead and > > convert value when read from / written to di

Re: [PATCH 2/2] ext2: Avoid rec_len overflow with 64KB block size

2007-10-04 Thread Andrew Morton
On Mon, 01 Oct 2007 17:35:46 -0700 Mingming Cao <[EMAIL PROTECTED]> wrote: > ext2: Avoid rec_len overflow with 64KB block size > > From: Jan Kara <[EMAIL PROTECTED]> > > With 64KB blocksize, a directory entry can have size 64KB which does not fit > into 16 bits w

[PATCH] ext3: Avoid rec_len overflow with 64KB block size

2007-10-03 Thread Theodore Ts'o
From: Jan Kara <[EMAIL PROTECTED]> With 64KB blocksize, a directory entry can have size 64KB which does not fit into 16 bits we have for entry lenght. So we store 0x instead and convert value when read from / written to disk. The patch also converts some places to use ext3_next_entry() when we

[PATCH] ext2: Avoid rec_len overflow with 64KB block size

2007-10-03 Thread Theodore Ts'o
From: Jan Kara <[EMAIL PROTECTED]> With 64KB blocksize, a directory entry can have size 64KB which does not fit into 16 bits we have for entry lenght. So we store 0x instead and convert value when read from / written to disk. Signed-off-by: Jan Kara <[EMAIL PROTECTED]> Signed-off-by: Mingming

[PATCH] ext4: Avoid rec_len overflow with 64KB block size

2007-10-03 Thread Theodore Ts'o
From: Jan Kara <[EMAIL PROTECTED]> With 64KB blocksize, a directory entry can have size 64KB which does not fit into 16 bits we have for entry lenght. So we store 0x instead and convert value when read from / written to disk. The patch also converts some places to use ext4_next_entry() when we

Re: [PATCH 2/2] ext3: Avoid rec_len overflow with 64KB block size

2007-10-01 Thread Mingming Cao
On Mon, 2007-10-01 at 18:01 -0700, Christoph Lameter wrote: > [Note that these will also be useful for 64K IA64 configurations] > > Acked-by: Christoph Lameter <[EMAIL PROTECTED]> > - Thanks! > To unsubscribe from this list: send the line "unsubscribe linux-ext4" in > the body of a message to [E

Re: [PATCH 2/2] ext3: Avoid rec_len overflow with 64KB block size

2007-10-01 Thread Christoph Lameter
[Note that these will also be useful for 64K IA64 configurations] Acked-by: Christoph Lameter <[EMAIL PROTECTED]> - To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 2/2] ext2: Avoid rec_len overflow with 64KB block size

2007-10-01 Thread Christoph Lameter
Acked-by: Christoph Lameter <[EMAIL PROTECTED]> - To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 2/2] ext4: Avoid rec_len overflow with 64KB block size

2007-10-01 Thread Christoph Lameter
Acked-by: Christoph Lameter <[EMAIL PROTECTED]> - To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH 2/2] ext3: Avoid rec_len overflow with 64KB block size

2007-10-01 Thread Mingming Cao
ext3: Avoid rec_len overflow with 64KB block size From: Jan Kara <[EMAIL PROTECTED]> With 64KB blocksize, a directory entry can have size 64KB which does not fit into 16 bits we have for entry lenght. So we store 0x instead and convert value when read from / written to disk. The patc

[PATCH 2/2] ext2: Avoid rec_len overflow with 64KB block size

2007-10-01 Thread Mingming Cao
ext2: Avoid rec_len overflow with 64KB block size From: Jan Kara <[EMAIL PROTECTED]> With 64KB blocksize, a directory entry can have size 64KB which does not fit into 16 bits we have for entry lenght. So we store 0x instead and convert value when read from / written to disk. Signed-

[PATCH 2/2] ext4: Avoid rec_len overflow with 64KB block size

2007-10-01 Thread Mingming Cao
ext4: Avoid rec_len overflow with 64KB block size From: Jan Kara <[EMAIL PROTECTED]> With 64KB blocksize, a directory entry can have size 64KB which does not fit into 16 bits we have for entry lenght. So we store 0x instead and convert value when read from / written to disk. The patc

Re: [PATCH 3/3] Avoid rec_len overflow with 64KB block size

2007-09-24 Thread Jan Kara
With 64KB blocksize, a directory entry can have size 64KB which does not fit into 16 bits we have for entry lenght. So we store 0x instead and convert value when read from / written to disk. The patch also converts some places to use ext4_next_entry() when we are changing them anyway. Signed-

Re: [PATCH 2/3] Avoid rec_len overflow with 64KB block size

2007-09-24 Thread Jan Kara
With 64KB blocksize, a directory entry can have size 64KB which does not fit into 16 bits we have for entry lenght. So we store 0x instead and convert value when read from / written to disk. The patch also converts some places to use ext3_next_entry() when we are changing them anyway. Signed-

Re: [PATCH 1/3] Avoid rec_len overflow with 64KB block size

2007-09-24 Thread Jan Kara
With 64KB blocksize, a directory entry can have size 64KB which does not fit into 16 bits we have for entry lenght. So we store 0x instead and convert value when read from / written to disk. Signed-off-by: Jan Kara <[EMAIL PROTECTED]> diff -rupX /home/jack/.kerndiffexclude linux-2.6.23-rc6/f

[PATCH 0/3] Avoid rec_len overflow with 64KB block size

2007-09-24 Thread Jan Kara
Hi, In the following series I'm sending patches to ext2, ext3 and ext4 solving possible overflow of rec_len when using 64KB blocksize. Minming, would you add these to the patch queue? Thanks. Honza -- Jan Kara <[EMAIL PROTECTED]

Re: Avoid rec_len overflow with 64KB block size

2007-09-21 Thread Jan Kara
> On Sep 20, 2007 18:17 +0200, Jan Kara wrote: > > With 64KB blocksize, a directory entry can have size 64KB which does not fit > > into 16 bits we have for entry lenght. So we store 0x instead and > > convert > > value when read from / written to disk. The patch also converts some places > >

Re: Avoid rec_len overflow with 64KB block size

2007-09-20 Thread Andreas Dilger
On Sep 20, 2007 18:17 +0200, Jan Kara wrote: > > when converting ext4 directories to pagecache I just came over > > Takashi's patch preventing overflowing of rec_len. Looking over the > > patch - can't we do it more elegantly by using say 0x instead of 64K > > and perform conversion (using s

Re: Avoid rec_len overflow with 64KB block size

2007-09-20 Thread Jan Kara
> when converting ext4 directories to pagecache I just came over > Takashi's patch preventing overflowing of rec_len. Looking over the > patch - can't we do it more elegantly by using say 0x instead of 64K > and perform conversion (using some helper) at the moment we read / store > rec_len? T

Avoid rec_len overflow with 64KB block size

2007-09-20 Thread Jan Kara
Hello, when converting ext4 directories to pagecache I just came over Takashi's patch preventing overflowing of rec_len. Looking over the patch - can't we do it more elegantly by using say 0x instead of 64K and perform conversion (using some helper) at the moment we read / store rec_len?