mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 0/7] fix ext4 support for volumes greater than 4 GiB
@ 2017-03-20 12:35 Antony Pavlov
  2017-03-20 12:35 ` [PATCH 1/7] ext4: change structure fields to __le/__be types Antony Pavlov
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Antony Pavlov @ 2017-03-20 12:35 UTC (permalink / raw)
  To: barebox

At the moment barebox can't correctly handle ext4 filesystem volume
greater than 4 GiB.

This patchseries fixes the problem by adaption of U-Boot commits.

How to reproduce the problem:

    $ git clone https://git.pengutronix.de/git/barebox
    $ cd barebox
    barebox$ dd if=/dev/zero bs=128M count=40 of=5G.img
    barebox$ /sbin/mkfs.ext4 -F 5G.img
    barebox$ mkdir mnt
    barebox$ sudo mount 5G.img mnt/
    barebox$ sudo mkdir mnt/testdir
    barebox$ sudo touch mnt/testdir/testfile
    barebox$ ls mnt/testdir/testfile -l
    -rw-r--r-- 1 root root 0 Mar 20 14:53 mnt/testdir/testfile
    barebox$ sudo umount mnt/
    barebox$ make sandbox_defconfig
    ...
    barebox$ make -j3 -s
    ...
    barebox$ ./barebox -i 5G.img
    ...
    barebox@barebox sandbox:/ mount /dev/fd0 /mnt/
    ext4 ext40: EXT2 rev 1, inode_size 256
    barebox@barebox sandbox:/ ls /mnt/testdir/testfile
    ls: /mnt/testdir/testfile: No such file or directory
    barebox@barebox sandbox:/ ls /mnt/ -l
    drwxrwxrwx              0 .
    drwxrwxrwx              0 ..
    drwx------          16384 lost+found
    ?---------              0 testdir

On the other hand there is no problem with volumes
less than 4 GiB:

    barebox$ dd if=/dev/zero bs=128M count=24 of=3G.img
    barebox$ /sbin/mkfs.ext4 -F 3G.img
    barebox$ sudo mount 3G.img mnt/
    barebox$ sudo mkdir mnt/testdir
    barebox$ sudo touch mnt/testdir/testfile
    barebox$ ls mnt/testdir/testfile -l
    -rw-r--r-- 1 root root 0 Mar 20 15:05 mnt/testdir/testfile
    barebox$ sudo umount mnt/
    barebox$ ./barebox -i 3G.img
    ...
    barebox@barebox sandbox:/ mount /dev/fd0 /mnt/
    ext4 ext40: EXT2 rev 1, inode_size 256
    barebox@barebox sandbox:/ ls /mnt/testdir/testfile
    /mnt/testdir/testfile
    barebox@barebox sandbox:/ ls /mnt/ -l
    drwxrwxrwx              0 .
    drwxrwxrwx              0 ..
    drwx------          16384 lost+found
    drwxr-xr-x           4096 testdir

Antony Pavlov (7):
  ext4: change structure fields to __le/__be types
  ext4: use kernel names for byte swaps
  ext4: drop unused and misdefined INODE_SIZE_FILESYSTEM macro
  ext4: fix wrong usage of le32_to_cpu()
  ext4: Update ext2/3/4 superblock, group descriptor and inode
    structures
  ext4: determine group descriptor size for 64bit feature
  ext4: Use correct descriptor size when reading the block group
    descriptor

 fs/ext4/ext4_common.c |  83 +++++++++++++----------
 fs/ext4/ext4fs.c      |   2 +-
 fs/ext4/ext4fs.h      |   3 +
 fs/ext4/ext_barebox.c |  10 +--
 fs/ext4/ext_common.h  | 184 ++++++++++++++++++++++++++++++--------------------
 5 files changed, 168 insertions(+), 114 deletions(-)

-- 
2.11.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-03-22  6:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-20 12:35 [PATCH 0/7] fix ext4 support for volumes greater than 4 GiB Antony Pavlov
2017-03-20 12:35 ` [PATCH 1/7] ext4: change structure fields to __le/__be types Antony Pavlov
2017-03-20 12:35 ` [PATCH 2/7] ext4: use kernel names for byte swaps Antony Pavlov
2017-03-20 12:35 ` [PATCH 3/7] ext4: drop unused and misdefined INODE_SIZE_FILESYSTEM macro Antony Pavlov
2017-03-20 12:35 ` [PATCH 4/7] ext4: fix wrong usage of le32_to_cpu() Antony Pavlov
2017-03-20 12:35 ` [PATCH 5/7] ext4: Update ext2/3/4 superblock, group descriptor and inode structures Antony Pavlov
2017-03-20 12:35 ` [PATCH 6/7] ext4: determine group descriptor size for 64bit feature Antony Pavlov
2017-03-20 12:35 ` [PATCH 7/7] ext4: Use correct descriptor size when reading the block group descriptor Antony Pavlov
2017-03-22  6:57 ` [PATCH 0/7] fix ext4 support for volumes greater than 4 GiB Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox