[U-Boot] [PATCH 5/5] fs/ext4: Support device block sizes != 512 bytes.

Wolfgang Denk wd at denx.de
Tue Mar 26 12:32:27 CET 2013


Dear egbert.eich at googlemail.com,

In message <1364285735-2364-6-git-send-email-egbert.eich at gmail.com> you wrote:
> From: Egbert Eich <eich at suse.com>
> 
> The 512 byte block size was hard coded in the ext4 file systems. Large
> harddisks today support bigger block sizes typically 4096 bytes.
> 
> Signed-off-by: Egbert Eich <eich at suse.com>
> ---
>  fs/ext4/dev.c          |   52 +++++++++++++++++++++++++++++------------------
>  fs/ext4/ext4_common.c  |   26 +++++++++++------------
>  fs/ext4/ext4_common.h  |    2 +-
>  fs/ext4/ext4_journal.c |    6 +---
>  fs/ext4/ext4_write.c   |   27 ++++++++++++------------
>  fs/ext4/ext4fs.c       |   11 +++++----
>  include/ext4fs.h       |    1 +
>  include/ext_common.h   |    9 +-------
>  8 files changed, 68 insertions(+), 66 deletions(-)


WARNING: line over 80 characters
#139: FILE: fs/ext4/dev.c:56:
+	get_fs()->total_sect = (info->size * info->blksz) >> get_fs()->dev_desc->log2blksz;

WARNING: line over 80 characters
#148: FILE: fs/ext4/dev.c:64:
+				 (ext4fs_block_dev_desc ? ext4fs_block_dev_desc->blksz: 0));

ERROR: spaces required around that ':' (ctx:VxW)
#148: FILE: fs/ext4/dev.c:64:
+				 (ext4fs_block_dev_desc ? ext4fs_block_dev_desc->blksz: 0));
 				                                                      ^

WARNING: line over 80 characters
#157: FILE: fs/ext4/dev.c:72:
+	    || ((sector + ((byte_offset + byte_len - 1) >> ext4fs_block_dev_desc->log2blksz)) >=

WARNING: line over 80 characters
#186: FILE: fs/ext4/dev.c:94:
+			min(ext4fs_block_dev_desc->blksz - byte_offset, byte_len));

WARNING: line over 80 characters
#187: FILE: fs/ext4/dev.c:95:
+		buf += min(ext4fs_block_dev_desc->blksz - byte_offset, byte_len);

WARNING: line over 80 characters
#188: FILE: fs/ext4/dev.c:96:
+		byte_len -= min(ext4fs_block_dev_desc->blksz - byte_offset, byte_len);

WARNING: line over 80 characters
#213: FILE: fs/ext4/dev.c:119:
+					       block_len >> ext4fs_block_dev_desc->log2blksz,

WARNING: line over 80 characters
#216: FILE: fs/ext4/dev.c:121:
+					       block_len >> ext4fs_block_dev_desc->log2blksz) {

WARNING: line over 80 characters
#279: FILE: fs/ext4/ext4_common.c:106:
+						  size >> fs->dev_desc->log2blksz,

WARNING: line over 80 characters
#288: FILE: fs/ext4/ext4_common.c:1471:
+	return ext4fs_devread(blkno << (LOG2_BLOCK_SIZE(data) - get_fs()->dev_desc->log2blksz),

WARNING: line over 80 characters
#297: FILE: fs/ext4/ext4_common.c:1497:
+	status = ext4fs_devread(blkno << (LOG2_BLOCK_SIZE(data) - fs->dev_desc->log2blksz), blkoff,

WARNING: line over 80 characters
#306: FILE: fs/ext4/ext4_common.c:1517:
+	log2_blksz = LOG2_BLOCK_SIZE(ext4fs_root) - get_fs()->dev_desc->log2blksz;

ERROR: space prohibited after that open parenthesis '('
#388: FILE: fs/ext4/ext4_write.c:623:
+	if (!ext4_read_superblock( (char *)fs->sb))

WARNING: line over 80 characters
#406: FILE: fs/ext4/ext4_write.c:768:
+	int log2blocksize = LOG2_BLOCK_SIZE(ext4fs_root) - fs->dev_desc->log2blksz;

WARNING: line over 80 characters
#415: FILE: fs/ext4/ext4_write.c:797:
+					delayed_next += blockend >> fs->dev_desc->log2blksz;

WARNING: line over 80 characters
#420: FILE: fs/ext4/ext4_write.c:800:
+							     fs->dev_desc->log2blksz),

WARNING: line over 80 characters
#429: FILE: fs/ext4/ext4_write.c:808:
+					    (blockend >> fs->dev_desc->log2blksz);

WARNING: line over 80 characters
#446: FILE: fs/ext4/ext4_write.c:822:
+						     fs->dev_desc->log2blksz), delayed_buf,

WARNING: line over 80 characters
#464: FILE: fs/ext4/ext4_write.c:923:
+	file_inode->blockcnt = (blks_reqd_for_file * fs->blksz) >> fs->dev_desc->log2blksz;

WARNING: line over 80 characters
#481: FILE: fs/ext4/ext4fs.c:66:
+	int log2blocksize = LOG2_BLOCK_SIZE(node->data) - fs->dev_desc->log2blksz;

WARNING: line over 80 characters
#491: FILE: fs/ext4/ext4fs.c:114:
+					delayed_next += blockend >> fs->dev_desc->log2blksz;

WARNING: line over 80 characters
#500: FILE: fs/ext4/ext4fs.c:128:
+						(blockend >> fs->dev_desc->log2blksz);

WARNING: line over 80 characters
#551: FILE: include/ext_common.h:65:
+				    (data->sblock.log2_block_size) + EXT2_MIN_BLOCK_LOG_SIZE)

total: 2 errors, 22 warnings, 375 lines checked

/home/wd/Mail/U-Boot/7153 has style problems, please review.


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Brain: an apparatus with which we think we think.    - Ambrose Bierce


More information about the U-Boot mailing list