/littlefs-2.7.6/ |
D | lfs.c | 15 // do not zero, cheaper if cache is readonly or only going to be in lfs_cache_drop() 32 if (block >= lfs->cfg->block_count || in lfs_bd_read() 40 if (pcache && block == pcache->block && in lfs_bd_read() 42 if (off >= pcache->off) { in lfs_bd_read() 57 if (block == rcache->block && in lfs_bd_read() 59 if (off >= rcache->off) { in lfs_bd_read() 74 if (size >= hint && off % lfs->cfg->read_size == 0 && in lfs_bd_read() 79 if (err) { in lfs_bd_read() 102 if (err) { in lfs_bd_read() 127 if (err) { in lfs_bd_cmp() [all …]
|
D | lfs.h | 128 LFS_O_CREAT = 0x0100, // Create a file if it does not exist 129 LFS_O_EXCL = 0x0200, // Fail if a file already exists 163 // May return LFS_ERR_CORRUPT if the block should be considered bad. 170 // May return LFS_ERR_CORRUPT if the block should be considered bad. 280 // Optional list of custom attributes related to the file. If the file 282 // during the open call. If the file is opened with write access, the 287 // to LFS_ATTR_MAX bytes. When read, if the stored attribute is smaller 288 // than the buffer, it will be padded with zeros. If the stored attribute 289 // is larger, then it will be silently truncated. If the attribute is not 431 // If removing a directory, the directory must be empty. [all …]
|
D | lfs_util.h | 13 // If LFS_CONFIG is used, none of the default utils will be emitted and must be 39 #if !defined(LFS_NO_DEBUG) || \ 153 #if !defined(LFS_NO_INTRINSICS) && (defined(__GNUC__) || defined(__CC_ARM)) in lfs_npw2() 170 #if !defined(LFS_NO_INTRINSICS) && defined(__GNUC__) in lfs_ctz() 179 #if !defined(LFS_NO_INTRINSICS) && (defined(__GNUC__) || defined(__CC_ARM)) in lfs_popc() 196 #if !defined(LFS_NO_INTRINSICS) && ( \ in lfs_fromle32() 220 #if !defined(LFS_NO_INTRINSICS) && ( \ in lfs_frombe32() 245 // Allocate memory, only used if buffers are not provided to littlefs 256 // Deallocate memory, only used if buffers are not provided to littlefs
|
D | .travis.yml | 68 # update status if we succeeded, compare with master if possible 70 if [ "$TRAVIS_TEST_RESULT" -eq 0 ] 80 if [ "$PREV" -ne 0 ] 90 if: branch = master AND type = push 215 if: branch !~ -prefix$ 229 - dd if=/dev/zero bs=512 count=128K of=disk 250 if: branch !~ -prefix$ 265 - dd if=/dev/zero bs=512 count=128K of=disk 348 if [ ! -z "$PREV" ] 375 …if ! curl https://api.github.com/repos/$TRAVIS_REPO_SLUG/status/${TRAVIS_PULL_REQUEST_SHA:-$TRAVIS… [all …]
|
D | README.md | 15 failures. All file operations have strong copy-on-write guarantees and if 64 // reformat if we can't mount the filesystem 66 if (err) { 100 usage for performance, and optional static buffers if the user wants to avoid 126 user may return a `LFS_ERR_CORRUPT` error if the implementation already can 131 If your storage caches writes, make sure that the provided `sync` function 133 from memory, otherwise data integrity can not be guaranteed. If the `write` 219 littlefs if you have an SD card handy.
|
D | SPEC.md | 93 1. **Revision count (32-bits)** - Incremented every erase cycle. If both blocks 137 tag contains a valid bit used to indicate if the tag and containing commit is 139 be used to tell if we've attempted to write to the remaining space in the 230 1. **Valid bit (1-bit)** - Indicates if the tag is valid. 580 which indicates if the following metadata pair is a part of the directory 601 but this may change if additional metadata pair state is added. 605 can cause this linked-list to become out of sync if a power-loss were to occur. 616 If the sync flag is set, the threaded linked-list must be checked for these 618 be ignored if littlefs is mounted read-only. 695 cause to filesystem to go out of sync if the power is lost. The operations [all …]
|
D | DESIGN.md | 47 If a power loss corrupts any persistent data structures, this can cause the 51 1. **Wear leveling** - Writing to flash is destructive. If a filesystem 56 1. **Bounded RAM/ROM** - If the above requirements weren't enough, these 71 however they often share and borrow feature from each other. If we look at 128 appends. And if that wasn't good enough, their cyclic nature means that 131 The main downside is performance. If we look at garbage collection, the 231 If we look at existing filesystems, there are two interesting design patterns 239 can't avoid these costs, _but_ if we put an upper bound on the size we can at 253 have weaknesses that limit their usefulness. But if we merge the two they can 357 1. If our block is not full and the program size is small enough to let us [all …]
|
D | CMakeLists.txt | 1 if(CONFIG_FILE_SYSTEM_LITTLEFS)
|
/littlefs-2.7.6/scripts/ |
D | test.py | 119 self.if_ = config.get('if', None) 123 if hasattr(self, 'permno'): 124 if any(k not in self.case.defines for k in self.defines): 128 if k not in self.case.defines)) 149 if k not in self.suite.defines: 155 if k not in self.defines))) 170 if k not in self.suite.defines: 174 if (self.filter is not None and 189 if k in if_: 209 if persist: [all …]
|
D | readmdir.py | 31 if len(args) == 1: 34 if isinstance(args[0], str): 39 if isinstance(args[1], str): 40 id = int(args[1], 0) if args[1] not in 'x.' else 0x3ff 44 if isinstance(args[2], str): 45 size = int(args[2], str) if args[2] not in 'x.' else 0x3ff 91 return 4 + (self.size if self.size != 0x3ff else 0) 106 0x700 if self.isunique else 0x7ff, 107 0x3ff if self.isattr else 0, 112 if hasattr(self, 'off'): ntag.off = self.off [all …]
|
D | readtree.py | 22 if set(m.blocks) == set(tail): 25 if cycle: 43 if mdir.tail.size != 8 or mdir.tail.data == 8*b'\xff': 65 if not mdir: 70 if mdir.tail is None or not mdir.tail.is_('hardtail'): 74 if mdir.tail is None: 90 if tag.is_('dir'): 104 if superblock: 108 "data (truncated, if it fits)" 109 if not any([args.no_truncate, args.tags, args.log, args.all]) else "")) [all …]
|
D | explode_asserts.py | 52 if (!(_lh {op} _rh)) {{ 74 if (!(_lh {op} _rh)) {{ 90 if (s[i] >= ' ' && s[i] <= '~') {{ 96 if (size > {maxwidth}) {{ 107 if (!(memcmp(_lh, _rh, size) {op} 0)) {{ 128 if (!(strcmp(_lh, _rh) {op} 0)) {{ 173 if size: 212 if m: 213 if m.start() > 0: 224 if self.off < len(self.tokens): [all …]
|
D | prefix.py | 29 if not to_prefix: 32 if not files: 39 if namecount: 56 '%s -> %s' % (oldname, newname) if namecount else oldname, 59 if __name__ == "__main__":
|
/littlefs-2.7.6/bd/ |
D | lfs_testbd.c | 37 if (bd->cfg->erase_cycles) { in lfs_testbd_createcfg() 38 if (bd->cfg->wear_buffer) { in lfs_testbd_createcfg() 42 if (!bd->wear) { in lfs_testbd_createcfg() 52 if (bd->persist) { in lfs_testbd_createcfg() 90 if (bd->cfg->erase_cycles && !bd->cfg->wear_buffer) { in lfs_testbd_destroy() 94 if (bd->persist) { in lfs_testbd_destroy() 109 if (bd->persist) { in lfs_testbd_rawread() 119 if (bd->persist) { in lfs_testbd_rawprog() 129 if (bd->persist) { in lfs_testbd_rawerase() 138 if (bd->persist) { in lfs_testbd_rawsync() [all …]
|
D | lfs_filebd.c | 31 if (bd->fd < 0) { in lfs_filebd_createcfg() 62 if (err < 0) { in lfs_filebd_destroy() 78 // check if read is valid in lfs_filebd_read() 84 if (bd->cfg->erase_value != -1) { in lfs_filebd_read() 91 if (res1 < 0) { in lfs_filebd_read() 98 if (res2 < 0) { in lfs_filebd_read() 114 // check if write is valid in lfs_filebd_prog() 120 if (bd->cfg->erase_value != -1) { in lfs_filebd_prog() 123 if (res1 < 0) { in lfs_filebd_prog() 132 if (res2 < 0) { in lfs_filebd_prog() [all …]
|
D | lfs_rambd.c | 25 if (bd->cfg->buffer) { in lfs_rambd_createcfg() 29 if (!bd->buffer) { in lfs_rambd_createcfg() 36 if (bd->cfg->erase_value != -1) { in lfs_rambd_createcfg() 64 if (!bd->cfg->buffer) { in lfs_rambd_destroy() 78 // check if read is valid in lfs_rambd_read() 97 // check if write is valid in lfs_rambd_prog() 103 if (bd->cfg->erase_value != -1) { in lfs_rambd_prog() 121 // check if erase is valid in lfs_rambd_erase() 125 if (bd->cfg->erase_value != -1) { in lfs_rambd_erase()
|
D | lfs_testbd.h | 97 // Note that filebd is used if a path is provided, if path is NULL
|
/littlefs-2.7.6/tests/ |
D | test_relocations.toml | 39 if (j == ITERATIONS-1) { 151 if = '!(DEPTH == 3 && LFS_CACHE_SIZE != 64)' 159 if (err) { 173 // if it does not exist, we create it, else we destroy 175 if (res == LFS_ERR_NOENT) { 176 // create each directory in turn, ignore if dir already exists 196 // try to delete path in reverse order, ignore if dir is not empty 213 if = '!(DEPTH == 3 && LFS_CACHE_SIZE != 64)' 221 if (err) { 235 // if it does not exist, we create it, else we destroy [all …]
|
D | test_orphans.toml | 3 if = 'LFS_PROG_SIZE <= 0x3fe' # only works with one crc per commit 62 if = '!(DEPTH == 3 && LFS_CACHE_SIZE != 64)' 70 if (err) { 84 // if it does not exist, we create it, else we destroy 86 if (res == LFS_ERR_NOENT) { 87 // create each directory in turn, ignore if dir already exists 107 // try to delete path in reverse order, ignore if dir is not empty
|
D | test_exhaustion.toml | 35 if (res == LFS_ERR_NOSPC) { 45 if (err == LFS_ERR_NOSPC) { 117 if (res == LFS_ERR_NOSPC) { 127 if (err == LFS_ERR_NOSPC) { 208 if (res == LFS_ERR_NOSPC) { 218 if (err == LFS_ERR_NOSPC) { 297 if (res == LFS_ERR_NOSPC) { 307 if (err == LFS_ERR_NOSPC) { 359 if = 'LFS_BLOCK_CYCLES < CYCLES/10' 382 if (res == LFS_ERR_NOSPC) { [all …]
|
D | test_alloc.toml | 3 if = 'LFS_BLOCK_CYCLES == -1' 208 if (res < 0) { 255 if (res < 0) { 290 if (err < 0) { 302 // see if dir fits with max file size 313 // see if dir fits with > max file size 326 [[case]] # what if we have a bad block during an allocation scan? 341 if (res == LFS_ERR_NOSPC) { 372 if (res == LFS_ERR_CORRUPT) { 387 if (res == LFS_ERR_NOSPC) { [all …]
|
D | test_superblocks.toml | 17 if (err) { 67 if (!err) { 96 if (err) { 105 if (!err) {
|
D | test_move.toml | 151 if = 'LFS_PROG_SIZE <= 0x3fe' # only works with one crc per commit 243 if = 'LFS_PROG_SIZE <= 0x3fe' # only works with one crc per commit 342 if (err) { 360 if (lfs_stat(&lfs, "a/hello", &info) == 0) { 366 if (lfs_stat(&lfs, "b/hello", &info) == 0) { 372 if (lfs_stat(&lfs, "c/hello", &info) == 0) { 378 if (lfs_stat(&lfs, "d/hello", &info) == 0) { 388 if (lfs_stat(&lfs, "a/hello", &info) == 0 && info.size > 0) { 390 } else if (lfs_stat(&lfs, "b/hello", &info) == 0) { 392 } else if (lfs_stat(&lfs, "c/hello", &info) == 0) { [all …]
|
D | test_files.toml | 124 if (SIZE1 > SIZE2) { 294 if (err) { 301 if (err == 0) { 348 if (err) { 355 if (err == 0) { 463 if (err) { 474 if ((lfs_size_t)lfs_file_size(&lfs, &file) != size) {
|
D | test_seek.toml | 279 if (i < SIZE-2) { 314 if (err) { 320 if (!err) { 321 if (lfs_file_size(&lfs, &file) != 0) { 334 if (lfs_file_size(&lfs, &file) == 0) { 357 if (memcmp(buffer, "doggodogdog", size) != 0) {
|