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

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 to 4k

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 value

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_le16(len);

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-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: 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-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 64KB blocksize, a directory entry can have size 64KB which does not fit

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 64KB blocksize, a directory entry can have size 64KB which does not fit

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 we have for entry lenght. So we store

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 have for entry lenght. So we store 0x instead and

[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-off-by:

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