Removed fsinfo.disk_version

With rcompat/wcompat flags, on-disk minor version bumps will hopefully
not be needed for a long time (ever?). And if the on-disk version never
changes, why was a word to report it every lfsr_fs_stat call?

But this may be something to listen to user feedback on. Worst case we
can always readd fsinfo.disk_version if users find it useful.

Code changes:

           code          stack
  before: 33922           2592
  after:  33918 (-0.0%)   2592 (+0.0%)
This commit is contained in:
Christopher Haster
2024-06-12 12:25:01 -05:00
parent 687641533c
commit 2425b0f89b
4 changed files with 0 additions and 66 deletions
-36
View File
@@ -92,12 +92,6 @@ code = '''
// now mount with new version
lfs_t lfs;
lfsr_mount(&lfs, CFG) => 0;
// we should be able to read the version using lfsr_fs_stat
struct lfs_fsinfo fsinfo;
lfsr_fs_stat(&lfs, &fsinfo) => 0;
assert(fsinfo.disk_version == LFSP_DISK_VERSION);
lfsr_unmount(&lfs) => 0;
'''
@@ -131,11 +125,6 @@ code = '''
lfs_t lfs;
lfsr_mount(&lfs, CFG) => 0;
// we should be able to read the version using lfsr_fs_stat
struct lfs_fsinfo fsinfo;
lfsr_fs_stat(&lfs, &fsinfo) => 0;
assert(fsinfo.disk_version == LFSP_DISK_VERSION);
// can we list the directories?
lfsr_dir_t dir;
lfsr_dir_open(&lfs, &dir, "/") => 0;
@@ -208,11 +197,6 @@ code = '''
lfs_t lfs;
lfsr_mount(&lfs, CFG) => 0;
// we should be able to read the version using lfsr_fs_stat
struct lfs_fsinfo fsinfo;
lfsr_fs_stat(&lfs, &fsinfo) => 0;
assert(fsinfo.disk_version == LFSP_DISK_VERSION);
// can we list the files?
lfsr_dir_t dir;
lfsr_dir_open(&lfs, &dir, "/") => 0;
@@ -306,11 +290,6 @@ code = '''
lfs_t lfs;
lfsr_mount(&lfs, CFG) => 0;
// we should be able to read the version using lfsr_fs_stat
struct lfs_fsinfo fsinfo;
lfsr_fs_stat(&lfs, &fsinfo) => 0;
assert(fsinfo.disk_version == LFSP_DISK_VERSION);
// can we list the directories?
lfsr_dir_t dir;
lfsr_dir_open(&lfs, &dir, "/") => 0;
@@ -413,11 +392,6 @@ code = '''
lfs_t lfs;
lfsr_mount(&lfs, CFG) => 0;
// we should be able to read the version using lfsr_fs_stat
struct lfs_fsinfo fsinfo;
lfsr_fs_stat(&lfs, &fsinfo) => 0;
assert(fsinfo.disk_version == LFSP_DISK_VERSION);
// write another COUNT/2 dirs
for (lfs_size_t i = COUNT/2; i < COUNT; i++) {
char name[8];
@@ -503,11 +477,6 @@ code = '''
lfs_t lfs;
lfsr_mount(&lfs, CFG) => 0;
// we should be able to read the version using lfsr_fs_stat
struct lfs_fsinfo fsinfo;
lfsr_fs_stat(&lfs, &fsinfo) => 0;
assert(fsinfo.disk_version == LFSP_DISK_VERSION);
// write half COUNT files
prng = 42;
for (lfs_size_t i = 0; i < COUNT; i++) {
@@ -634,11 +603,6 @@ code = '''
lfs_t lfs;
lfsr_mount(&lfs, CFG) => 0;
// we should be able to read the version using lfsr_fs_stat
struct lfs_fsinfo fsinfo;
lfsr_fs_stat(&lfs, &fsinfo) => 0;
assert(fsinfo.disk_version == LFSP_DISK_VERSION);
// write half COUNT files
prng = 42;
for (lfs_size_t i = 0; i < COUNT; i++) {