summaryrefslogtreecommitdiffstats
path: root/fs/ext4
Commit message (Collapse)AuthorAgeFilesLines
* fs: ext4: fix symlink read functionRonald Zachariah2016-07-071-1/+1
| | | | | | | | | | | | | | | | | | | | | From U-Boot commit: | commit 37f23885e4905ff500a8524328aa3084ac11cdb4 | Author: Ronald Zachariah <rozachar@cisco.com> | Date: Thu Apr 28 07:08:34 2016 +0200 | | fs: ext4: fix symlink read function | | The function ext4fs_read_symlink was unable to handle a symlink | which had target name of exactly 60 characters. | | Signed-off-by: Ronald Zachariah <rozachar@cisco.com> | Signed-off-by: Stefan Roese <sr@denx.de> | Reviewed-by: Stephen Warren <swarren@nvidia.com> | Cc: Tom Rini <trini@konsulko.com> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: ext4: make locally used ext4fs_get_indir_block() staticAntony Pavlov2016-02-171-1/+2
| | | | | | | | | | | | | | The patch fixes this compiler's warning: CC fs/ext4/ext4_common.o fs/ext4/ext4_common.c:130:5: warning: no previous prototype for 'ext4fs_get_indir_block' [-Wmissing-prototypes] int ext4fs_get_indir_block(struct ext2fs_node *node, struct ext4fs_indir_block *indir, int blkno) ^ Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: import magic.h from Linux kernelYegor Yefremov2016-02-032-3/+2
| | | | | | | | include/linux/magic.h provides MAGIC numbers for various file systems. Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* drop <stddef.h> includesSascha Hauer2015-07-231-1/+0
| | | | | | | The compilers stddef.h should not be included. We declare all types ourselves. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: rename inode member of struct filep to privSascha Hauer2015-03-091-3/+3
| | | | | | | Because that's what it is. 'inode' will become confusing once we support real inodes. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: ext4: le32_to_cpu() used on a 16-bit fieldSascha Hauer2014-07-251-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* fs: ext4: use EXT2_BLOCK_SIZE instead of fs->blkszSascha Hauer2014-07-251-1/+2
| | | | | | | | | | | | | | | | | | | | 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>
* fs: ext4: fix "invalid extent block" errorSascha Hauer2014-07-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* fs: cleanup backingstore handlingSascha Hauer2013-09-291-10/+4
| | | | | | | | | | | 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>
* ext4: switch debug and printf to dev_xxxJean-Christophe PLAGNIOL-VILLARD2013-03-091-6/+6
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: implement initial ext4 support from U-BootSascha Hauer2012-12-038-0/+1381
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>