Skip to contentSkip to conversation

fs/ext4: Initialize group descriptor size for revision level 0 filesystems

PATCH In review Stefan Brüns 3 participants 5 messages Dec 27, 2016 – Dec 29, 2016 ext4 file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs/ext4: Initialize group descriptor size for revision level 0 filesystems

genext2fs creates revision level 0 filesystems, which are not readable by u-boot due to the initialized group descriptor size field. f798b1dda1c5de818b806189e523d1b75db7e72d

Reported-by FrostyBytes at protonmail.com
---
 fs/ext4/ext4_common.c | 1 +
 1 file changed, 1 insertion(+)
fs/ext4/ext4_common.c +1 -0
index bfebe7e379..621c61e5c7 100644
@@ -2334,6 +2334,7 @@ int ext4fs_mount(unsigned part_length)
 
 	if (le32_to_cpu(data->sblock.revision_level) == 0) {
 		fs->inodesz = 128;
+		fs->gdsize = 32;
 	} else {
 		debug("EXT4 features COMPAT: %08x INCOMPAT: %08x RO_COMPAT: %08x\n",
 		      __le32_to_cpu(data->sblock.feature_compatibility),
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/1 fs/ext4: Initialize group descriptor size for revision level 0 filesystems

Hi Stefan,

With this patch, the image create by genext2fs can be mount in
U-Boot, thanks.

Quoted 16 lines · Stefan Br?ns

genext2fs creates revision level 0 filesystems, which are not readable by u-boot due to the initialized group descriptor size field. f798b1dda1c5de818b806189e523d1b75db7e72d

Reported-by FrostyBytes at protonmail.com
---
  fs/ext4/ext4_common.c | 1 +
  1 file changed, 1 insertion(+)
fs/ext4/ext4_common.c +0 -0
index bfebe7e379..621c61e5c7 100644

fs/ext4/ext4_common.c int ext4fs_mount(unsigned part_length) · line 2340

Quoted 7 lines
fs/ext4/ext4_common.c +1 -0
@@ -2334,6 +2334,7 @@ int ext4fs_mount(unsigned part_length)
 
  	if (le32_to_cpu(data->sblock.revision_level) == 0) {
  		fs->inodesz = 128;
+		fs->gdsize = 32;
  	} else {
  		debug("EXT4 features COMPAT: %08x INCOMPAT: %08x RO_COMPAT: %08x\n",
  		      __le32_to_cpu(data->sblock.feature_compatibility),

Thanks,
- Kever

#2 lore raw

PATCH 1/1 fs/ext4: Initialize group descriptor size for revision level 0 filesystems

Quoted 4 lines · On Dienstag, 27. Dezember 2016 10:44:07 CET Kever Yang wrote:

Hi Stefan,

With this patch, the image create by genext2fs can be mount in
U-Boot, thanks.

Thanks for testing.

@Tom: this is probably a candidate for u-boot 2017.01 ...

Quoted 35 lines · Stefan Br?ns
Quoted 26 lines

genext2fs creates revision level 0 filesystems, which are not readable by u-boot due to the initialized group descriptor size field. f798b1dda1c5de818b806189e523d1b75db7e72d

Reported-by FrostyBytes at protonmail.com

---

  fs/ext4/ext4_common.c | 1 +
  1 file changed, 1 insertion(+)
fs/ext4/ext4_common.c +1 -0
index bfebe7e379..621c61e5c7 100644
@@ -2334,6 +2334,7 @@ int ext4fs_mount(unsigned part_length)
 
  	if (le32_to_cpu(data->sblock.revision_level) == 0) {
 
  		fs->inodesz = 128;
 
+		fs->gdsize = 32;
 
  	} else {
Quoted 3 lines

debug("EXT4 features COMPAT: %08x INCOMPAT: %08x RO_COMPAT: %08x\n",

__le32_to_cpu(data->sblock.feature_compatibility),

Thanks,
- Kever

Signature · 3 lines
Stefan Br?ns  /  Bergstra?e 21  /  52062 Aachen
home: +49 241 53809034     mobile: +49 151 50412019
work: +49 2405 49936-424
#3 lore raw

PATCH 1/1 fs/ext4: Initialize group descriptor size for revision level 0 filesystems

Quoted 9 lines · Stefan Bruens
Quoted 4 lines · On Dienstag, 27. Dezember 2016 10:44:07 CET Kever Yang wrote:

Hi Stefan,

With this patch, the image create by genext2fs can be mount in
U-Boot, thanks.

Thanks for testing.

@Tom: this is probably a candidate for u-boot 2017.01 ...

Thanks, I'm putting this and some other changes through their paces now.

Quoted 42 lines
Quoted 36 lines · Stefan Br?ns
Quoted 26 lines

genext2fs creates revision level 0 filesystems, which are not readable by u-boot due to the initialized group descriptor size field. f798b1dda1c5de818b806189e523d1b75db7e72d

Reported-by FrostyBytes at protonmail.com

---

  fs/ext4/ext4_common.c | 1 +
  1 file changed, 1 insertion(+)
fs/ext4/ext4_common.c +1 -0
index bfebe7e379..621c61e5c7 100644
@@ -2334,6 +2334,7 @@ int ext4fs_mount(unsigned part_length)
 
  	if (le32_to_cpu(data->sblock.revision_level) == 0) {
 
  		fs->inodesz = 128;
 
+		fs->gdsize = 32;
 
  	} else {
Quoted 3 lines

debug("EXT4 features COMPAT: %08x INCOMPAT: %08x RO_COMPAT: %08x\n",

__le32_to_cpu(data->sblock.feature_compatibility),

Thanks,
- Kever

Signature · 3 lines
Stefan Br?ns  /  Bergstra?e 21  /  52062 Aachen
home: +49 241 53809034     mobile: +49 151 50412019
work: +49 2405 49936-424
Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161227/7965c018/attachment.sig>
#4 lore raw
In reply to Stefan Brüns
Quoted 8 lines · Stefan Br?ns

genext2fs creates revision level 0 filesystems, which are not readable by u-boot due to the initialized group descriptor size field. f798b1dda1c5de818b806189e523d1b75db7e72d

Reported-by FrostyBytes at protonmail.com

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161229/f547d05a/attachment.sig>