8d48c92b | 16-Dec-2016 |
Stefan Brüns <stefan.bruens@rwth-aachen.de> |
fs/fat: simplify get_fatent for FAT12
Instead of shuffling bits from two adjacent 16 bit words, use one 16 bit word with the appropriate byte offset in the buffer.
Signed-off-by: Stefan Brüns <stef
fs/fat: simplify get_fatent for FAT12
Instead of shuffling bits from two adjacent 16 bit words, use one 16 bit word with the appropriate byte offset in the buffer.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
show more ...
|
b8948d2a | 16-Dec-2016 |
Stefan Brüns <stefan.bruens@rwth-aachen.de> |
fs/fat: merge readwrite get_fatent_value() with readonly get_fatent()
get_fatent_value(...) flushes changed FAT entries to disk when fetching the next FAT blocks, in every other aspect it is identic
fs/fat: merge readwrite get_fatent_value() with readonly get_fatent()
get_fatent_value(...) flushes changed FAT entries to disk when fetching the next FAT blocks, in every other aspect it is identical to get_fatent(...).
Provide a stub implementation for flush_dirty_fat_buffer if CONFIG_FAT_WRITE is not set. Calling flush_dirty_fat_buffer during read only operation is fine as it checks if any buffers needs flushing.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
show more ...
|
6c1a8080 | 16-Dec-2016 |
Stefan Brüns <stefan.bruens@rwth-aachen.de> |
fs/fat: Avoid corruption of sectors following the FAT
The FAT is read/flushed in segments of 6 (FATBUFBLOCKS) disk sectors. The last segment may be less than 6 sectors, cap the length.
Signed-off-b
fs/fat: Avoid corruption of sectors following the FAT
The FAT is read/flushed in segments of 6 (FATBUFBLOCKS) disk sectors. The last segment may be less than 6 sectors, cap the length.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
show more ...
|
66a47ff2 | 06-Nov-2016 |
Stefan Brüns <stefan.bruens@rwth-aachen.de> |
ext4: Allow reading files with non-zero offset, clamp read len
Support was already implemented, but not hooked up. This fixes several fails in the test cases.
Signed-off-by: Stefan Brüns <stefan.br
ext4: Allow reading files with non-zero offset, clamp read len
Support was already implemented, but not hooked up. This fixes several fails in the test cases.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Acked-by: Stephen Warren <swarren@wwwdotorg.org>
show more ...
|
805e3e00 | 09-Oct-2016 |
Stefan Brüns <stefan.bruens@rwth-aachen.de> |
ext4: Only write journal entries for modified blocks in unlink_filename
Instead of creating a journal entry for each directory block, even if the block is unmodified, only log the modified block.
S
ext4: Only write journal entries for modified blocks in unlink_filename
Instead of creating a journal entry for each directory block, even if the block is unmodified, only log the modified block.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
show more ...
|
d1bdf224 | 09-Oct-2016 |
Stefan Brüns <stefan.bruens@rwth-aachen.de> |
ext4: Fix handling of direntlen in unlink_filename
The direntlen checks were quite bogus, i.e. the loop termination used "len + offset == blocksize" (exact match only), and checked for a direntlen l
ext4: Fix handling of direntlen in unlink_filename
The direntlen checks were quite bogus, i.e. the loop termination used "len + offset == blocksize" (exact match only), and checked for a direntlen less than 0. The latter can never happen as the len is unsigned, this has been reported by Coverity, CID 153384.
Use the same code as in search_dir for directory traversal. This code has the correct checks for direntlen >= sizeof(struct dirent), and offset < blocksize.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Reported-by: Coverity (CID: 153383, 153384) Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
show more ...
|
b4976b49 | 16-Sep-2016 |
Stefan Brüns <stefan.bruens@rwth-aachen.de> |
ext4: Revert rejection of 64bit enabled ext4 fs
Enable mounting of ext4 fs with 64bit feature, as it is supported now. These had been disabled in 6f94ab6656ceffb3f2a972c8de4c554502b6f2b7.
Signed-of
ext4: Revert rejection of 64bit enabled ext4 fs
Enable mounting of ext4 fs with 64bit feature, as it is supported now. These had been disabled in 6f94ab6656ceffb3f2a972c8de4c554502b6f2b7.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
show more ...
|
688d0e79 | 16-Sep-2016 |
Stefan Brüns <stefan.bruens@rwth-aachen.de> |
ext4: Use helper function to access group descriptor and its fields
The descriptor size is variable, thus array indices are not generically applicable. The larger group descriptors also contain e.g.
ext4: Use helper function to access group descriptor and its fields
The descriptor size is variable, thus array indices are not generically applicable. The larger group descriptors also contain e.g. high parts of block numbers, which have to be read and written.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
show more ...
|
f798b1dd | 16-Sep-2016 |
Stefan Brüns <stefan.bruens@rwth-aachen.de> |
ext4: Use correct descriptor size when reading the block group descriptor
The correct descriptor size must be used when calculating offsets, and also to read the correct amount of data.
Signed-off-
ext4: Use correct descriptor size when reading the block group descriptor
The correct descriptor size must be used when calculating offsets, and also to read the correct amount of data.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
show more ...
|
9f5dd8b6 | 19-Sep-2016 |
Stefan Brüns <stefan.bruens@rwth-aachen.de> |
ext4: Add helper functions for block group descriptor field access
The helper functions encapsulate access of the block group descriptors, independent of group descriptor size. The helpers also deal
ext4: Add helper functions for block group descriptor field access
The helper functions encapsulate access of the block group descriptors, independent of group descriptor size. The helpers also deal with the endianess of the fields, and with split fields like free_blocks/ free_blocks_high.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
show more ...
|
fc214ef9 | 16-Sep-2016 |
Stefan Brüns <stefan.bruens@rwth-aachen.de> |
ext4: determine group descriptor size for 64bit feature
If EXT4_FEATURE_INCOMPAT_64BIT is set, the descriptor can be read from the superblocks, otherwise it defaults to 32.
Signed-off-by: Stefan Br
ext4: determine group descriptor size for 64bit feature
If EXT4_FEATURE_INCOMPAT_64BIT is set, the descriptor can be read from the superblocks, otherwise it defaults to 32.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
show more ...
|