9
0
Fork 0
Commit Graph

7 Commits

Author SHA1 Message Date
Sascha Hauer 6977292a34 fs: rename inode member of struct filep to priv
Because that's what it is. 'inode' will become confusing
once we support real inodes.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-09 08:06:41 +01:00
Sascha Hauer 772cc850ae fs: ext4: le32_to_cpu() used on a 16-bit field
From U-Boot commit:

| commit 8b415f703f88d1d3b0466830047affbbf7f24913
| Author: Rommel Custodio <sessyargc+uboot@gmail.com>
| Date:   Sun Jul 21 10:53:25 2013 +0200
|
|     ext4fs: le32_to_cpu() used on a 16-bit field
|
|     Fix reading ext4_extent_header struture on BE machines.  Some 16 bit
|     fields where converted to 32 bit fields, due to the byte swap on BE
|     machines the containing value was corrupted. Therefore reading ext4
|     filesystems on BE machines where broken before.
|
|     Signed-off-by: Rommel Custodio <sessyargc+uboot@gmail.com>
|     [sent via git-send-email; rework commit message]
|     Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
|     Reviewed-by: Simon Glass <sjg@chromium.org>
|     Tested-by: Simon Glass <sjg@chromium.org>
|     Tested-by: Lukasz Majewski <l.majewski@samsung.com>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-25 10:38:47 +02:00
Sascha Hauer 07f0462a45 fs: ext4: use EXT2_BLOCK_SIZE instead of fs->blksz
From U-Boot commit:

| commit 470173274d9ceb18a7140ef93e20be6c2236e7d9
| Author: Ionut Nicu <ioan.nicu.ext@nsn.com>
| Date:   Mon Jan 13 11:59:24 2014 +0100
|
|     ext4fs: use EXT2_BLOCK_SIZE instead of fs->blksz
|
|     Using fs->blksz in ext4fs_get_extent_block() is not
|     correct since fs->blksz is not initialized on the
|     read path. Use EXT2_BLOCK_SIZE() instead which will
|     produce the desired output.
|
|     Signed-off-by: Ionut Nicu <ioan.nicu.ext@nsn.com>
|     Signed-off-by: Mathias Rulf <mathias.rulf@nsn.com>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-25 10:38:39 +02:00
Sascha Hauer 400b4e2bb3 fs: ext4: fix "invalid extent block" error
From U-Boot commit:

| commit b5bbac1a9b07016602559ff483df265fef6c1f83
| Author: Ionut Nicu <ioan.nicu.ext@nsn.com>
| Date:   Mon Jan 13 12:00:08 2014 +0100
|
|     ext4fs: fix "invalid extent block" error
|
|     For files where we actually have extent indexes following
|     an extent header (ext_block->eh_depth != 0), the do/while
|     loop from ext4fs_get_extent_block() does not select the
|     proper extent index structure.
|
|     For example, if we have:
|
|     ext_block->eh_depth = 1
|     ext_block->eh_entries = 1
|     fileblock = 0
|     index[0].ei_block = 0
|
|     the do/while loop will exit with i set to 0 and the
|     ext4fs_get_extent_block() function will return 0, even if
|     there was a valid extent index structure following the
|     header.
|
|     Signed-off-by: Ionut Nicu <ioan.nicu.ext@nsn.com>
|     Signed-off-by: Mathias Rulf <mathias.rulf@nsn.com>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-25 10:38:27 +02:00
Sascha Hauer ecb3aaa23b fs: cleanup backingstore handling
All filesystem drivers which need a backingstore device do the same
ignoring of '/dev/' in the backingstore followed by a cdev_open. Add a
helper function for it and let the core handle the cdev. As a side
effect this makes sure that fsdev->cdev is also set when a device is
mounted without the leading '/dev/' which was previously ignored
by the mount code.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-29 12:11:14 +02:00
Jean-Christophe PLAGNIOL-VILLARD c44eabb109 ext4: switch debug and printf to dev_xxx
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-09 11:18:08 +01:00
Sascha Hauer ac6e464cb2 fs: implement initial ext4 support from U-Boot
The ext4 implementation has been taken from U-Boot with some
changes:

- No global variables to allow for multiple filesystems to
  be mounted and multiple files to be open.
- remove fs internal link following and use the barebox link
  implementation.
- remove write support. This is incomplete in U-Boot, so I decided
  to skip this for now.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-03 11:23:25 +01:00