Message ID | 200902102257.n1AMvwKl006860@imap1.linux-foundation.org |
---|---|
State | Not Applicable, archived |
Headers | show |
On Tue, Feb 10, 2009 at 02:57:58PM -0800, akpm@linux-foundation.org wrote: > > The patch titled > ext2: fix support for empty directory blocks in 64k blocksize filesystems > has been added to the -mm tree. Its filename is > ext2-fix-support-for-empty-directory-blocks-in-64k-blocksize-filesystems.patch NACK. The commit description is incomplete, we need to discuss more what's the best way of handling this. See the discussion around the ext4 patch on linux-ext4 for more details. This patch is entirely moot for ext2 in any case, since EXT2_MAX_BLOCK_SIZE was never changed from 4096. - Ted -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff -puN fs/ext2/dir.c~ext2-fix-support-for-empty-directory-blocks-in-64k-blocksize-filesystems fs/ext2/dir.c --- a/fs/ext2/dir.c~ext2-fix-support-for-empty-directory-blocks-in-64k-blocksize-filesystems +++ a/fs/ext2/dir.c @@ -33,7 +33,7 @@ static inline unsigned ext2_rec_len_from { unsigned len = le16_to_cpu(dlen); - if (len == EXT2_MAX_REC_LEN) + if (len == EXT2_MAX_REC_LEN || len == 0) return 1 << 16; return len; } @@ -41,7 +41,7 @@ static inline unsigned ext2_rec_len_from static inline __le16 ext2_rec_len_to_disk(unsigned len) { if (len == (1 << 16)) - return cpu_to_le16(EXT2_MAX_REC_LEN); + return cpu_to_le16(0); else BUG_ON(len > (1 << 16)); return cpu_to_le16(len);