Long story long, the minimum block size needed to store all ctz pointers in a filesystem can be found with this formula:
where: B = block size in bytes w = pointer width in bits
| alias mark='printf "\e[3$((1+RANDOM%5))m%$(tput cols)s\e[0m" | tr " " "="' |
| #include "lfs.h" | |
| #include "emubd/lfs_emubd.h" | |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <stdlib.h> | |
| // test stuff | |
| static void test_log(const char *s, uintmax_t v) { | |
| printf("%s: %jd\n", s, v); |
| #include "lfs.h" | |
| #include "emubd/lfs_emubd.h" | |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <stdlib.h> | |
| // test stuff | |
| static void test_log(const char *s, uintmax_t v) { | |
| printf("%s: %jd\n", s, v); |
| /* mbed Microcontroller Library | |
| * Copyright (c) 2006-2013 ARM Limited | |
| * SPDX-License-Identifier: Apache-2.0 | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * |
| git checkout upstream/master | |
| git merge theotherjimmy/components | |
| git subtree add --prefix=components/storage/blockdevice/COMPONENT_SD sd-driver/master | |
| git subtree add --prefix=components/storage/blockdevice/COMPONENT_SPIF spif-driver/master | |
| git subtree add --prefix=components/storage/blockdevice/COMPONENT_DATAFLASH dataflash-driver/master | |
| git subtree add --prefix=components/storage/blockdevice/COMPONENT_FLASHIAP flashiap-driver/master | |
| git cherry-pick COMMIT_AFTER_SUBTREE_MERGES~..LAST_COMMIT |
| #!/usr/bin/env python2 | |
| import re | |
| from PIL import Image, ImageDraw | |
| COLORS = { | |
| 'lfs_bd_read': '#23ff19', | |
| 'lfs_bd_prog': '#17fff8', | |
| 'lfs_bd_erase': '#ff1800', | |
| 'lfs_cache_read': '#e8c658', |
| #!/bin/bash | |
| set -o pipefail | |
| while true | |
| do | |
| # Compile small sized for ARM | |
| make -Cbuildsize CC="arm-linux-gnueabi-gcc --static -mthumb" \ | |
| OBJ=lfs.o clean size \ | |
| CFLAGS+="-DLFS_NO_ASSERT -DLFS_NO_DEBUG -DLFS_NO_WARN -DLFS_NO_ERROR" |
| #!/bin/bash | |
| PANE=$TMUX_PANE | |
| while true | |
| do | |
| inotifywait -rqqe modify "$@" >/dev/null | |
| sleep 0.1 | |
| tmux send -t $PANE Escape Escape ":sil e!" Enter | |
| done & |
| #!/usr/bin/env python | |
| import sys | |
| import re | |
| import argparse | |
| import json | |
| import os.path | |
| import itertools | |
| # args |