e48485f5 | 11-Feb-2019 |
Tien Fong Chee <tien.fong.chee@intel.com> |
fs: fat: Reduce default max clustersize 64KiB from malloc pool
Release cluster block immediately when no longer use would help to reduce 64KiB memory allocated to the memory pool.
Signed-off-by: Ti
fs: fat: Reduce default max clustersize 64KiB from malloc pool
Release cluster block immediately when no longer use would help to reduce 64KiB memory allocated to the memory pool.
Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
show more ...
|
8b021bb9 | 26-Nov-2018 |
Patrick Wildt <patrick@blueri.se> |
fs: fix FAT name extraction
The long name apparently can be accumulated using multiple 13-byte slots. Unfortunately we never checked how many we can actually fit in the buffer we are reading to.
S
fs: fix FAT name extraction
The long name apparently can be accumulated using multiple 13-byte slots. Unfortunately we never checked how many we can actually fit in the buffer we are reading to.
Signed-off-by: Patrick Wildt <patrick@blueri.se>
show more ...
|
f105fe7b | 02-Oct-2018 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
fs: fat: fix set_cluster()
Avoid CoverityScan warning SIGN_EXTENSION by changing the type of parameter size of set_cluster().
Avoid leaking stack content when writing an incomplete last sector.
Re
fs: fat: fix set_cluster()
Avoid CoverityScan warning SIGN_EXTENSION by changing the type of parameter size of set_cluster().
Avoid leaking stack content when writing an incomplete last sector.
Reported-by: Coverity (CID: 184096) Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
show more ...
|
f8240ce9 | 11-Sep-2018 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
fs: fat: support unlink
In this patch, unlink support is added to FAT file system. A directory can be deleted only if it is empty.
In this implementation, only a directory entry for a short file na
fs: fat: support unlink
In this patch, unlink support is added to FAT file system. A directory can be deleted only if it is empty.
In this implementation, only a directory entry for a short file name will be removed. So entries for a long file name can and should be reclaimed with fsck.
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
show more ...
|
31a18d57 | 11-Sep-2018 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
fs: fat: support mkdir
In this patch, mkdir support is added to FAT file system. A newly created directory contains only "." and ".." entries.
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro
fs: fat: support mkdir
In this patch, mkdir support is added to FAT file system. A newly created directory contains only "." and ".." entries.
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
show more ...
|
3a10e072 | 11-Sep-2018 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
fs: fat: remember the starting cluster number of directory
The starting cluster number of directory is needed to initialize ".." (parent directory) entry when creating a new directory.
Signed-off-b
fs: fat: remember the starting cluster number of directory
The starting cluster number of directory is needed to initialize ".." (parent directory) entry when creating a new directory.
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
show more ...
|
cb8af8af | 11-Sep-2018 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
fs: fat: support write with non-zero offset
In this patch, all the necessary code for allowing for a file offset at write is implemented. What plays a major roll here is get_set_cluster(), which, in
fs: fat: support write with non-zero offset
In this patch, all the necessary code for allowing for a file offset at write is implemented. What plays a major roll here is get_set_cluster(), which, in contrast to its counterpart, set_cluster(), only operates on already-allocated clusters, overwriting with data.
So, with a file offset specified, set_contents() seeks and writes data with set_get_cluster() until the end of a file, and, once it reaches there, continues writing with set_cluster() for the rest.
Please note that a file will be trimmed as a result of write operation if write ends before reaching file's end. This is an intended behavior in order to maintain compatibility with the current interface.
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
show more ...
|
704df6aa | 11-Sep-2018 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
fs: fat: refactor write interface for a file offset
The current write implementation is quite simple: remove existing clusters and then allocating new ones and filling them with data. This, inevitab
fs: fat: refactor write interface for a file offset
The current write implementation is quite simple: remove existing clusters and then allocating new ones and filling them with data. This, inevitably, enforces always writing from the beginning of a file.
As the first step to lift this restriction, fat_file_write() and set_contents() are modified to accept an additional parameter, file offset and further re-factored so that, in the next patch, all the necessary code will be put into set_contents().
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
show more ...
|
4ced2039 | 11-Sep-2018 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
fs: fat: support write with sub-directory path
In this patch, write implementation is overhauled and rewritten by making full use of directory iterator. The obvious bonus is that we are now able to
fs: fat: support write with sub-directory path
In this patch, write implementation is overhauled and rewritten by making full use of directory iterator. The obvious bonus is that we are now able to write to a file with a directory path, like /A/B/C/FILE.
Please note that, as there is no notion of "current directory" on u-boot, a file name specified must contain an absolute directory path. Otherwise, "/" (root directory) is assumed.
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
show more ...
|
f1149cea | 11-Sep-2018 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
fs: fat: write returns error code instead of -1
It would be good that FAT write function return error code instead of just returning -1 as fat_read_file() does. This patch attempts to address this i
fs: fat: write returns error code instead of -1
It would be good that FAT write function return error code instead of just returning -1 as fat_read_file() does. This patch attempts to address this issue although it is 'best effort (or estimate)' for now.
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
show more ...
|
25bb9dab | 11-Sep-2018 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
fs: fat: check and normalize file name
FAT file system's long file name support is a bit complicated and has some restrictions on its naming. We should be careful about it especially for write as it
fs: fat: check and normalize file name
FAT file system's long file name support is a bit complicated and has some restrictions on its naming. We should be careful about it especially for write as it may easily end up with wrong file system.
normalize_longname() check for the rules and normalize a file name if necessary. Please note, however, that this function is yet to be extended to fully comply with the standard.
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
show more ...
|
881042ef | 11-Sep-2018 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
Revert "fs: fat: cannot write to subdirectories"
This reverts commit 0dc1bfb7302d220a48364263d5632d6d572b069b. The succeeding patch series will supersede it.
Signed-off-by: AKASHI Takahiro <takahir
Revert "fs: fat: cannot write to subdirectories"
This reverts commit 0dc1bfb7302d220a48364263d5632d6d572b069b. The succeeding patch series will supersede it.
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
show more ...
|
f528c140 | 11-Sep-2018 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
fs: fat: assure iterator's ->dent belongs to ->clust
In my attempt to re-work write operation, it was revealed that iterator's "clust" does not always point to a cluster to which a current directory
fs: fat: assure iterator's ->dent belongs to ->clust
In my attempt to re-work write operation, it was revealed that iterator's "clust" does not always point to a cluster to which a current directory entry ("dent") belongs. This patch assures that it is always true by adding "next_clust" which is used solely for dereferencing a cluster chain.
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
show more ...
|
b94b6be5 | 11-Sep-2018 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
fs: fat: handle "." and ".." of root dir correctly with fat_itr_resolve()
FAT's root directory does not have "." nor ".." So care must be taken when scanning root directory with fat_itr_resolve(). W
fs: fat: handle "." and ".." of root dir correctly with fat_itr_resolve()
FAT's root directory does not have "." nor ".." So care must be taken when scanning root directory with fat_itr_resolve(). Without this patch, any file path starting with "." or ".." will not be resolved at all.
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
show more ...
|