Skip to content

Comments

Add flow control to f3brew#256

Merged
AltraMayor merged 9 commits intomasterfrom
brew_flow
Feb 20, 2026
Merged

Add flow control to f3brew#256
AltraMayor merged 9 commits intomasterfrom
brew_flow

Conversation

@AltraMayor
Copy link
Owner

This pull request

  1. adds progress reports while writing and reading blocks;
  2. optimizes writes and reads issued to the operating system, which improves performance;
  3. adds the rate-limiting parameters --max-write-rate and --max-read-rate.

In addition to the new features above, this pull request includes code improvements, such as deduplicating code, fixing header inclusions, and removing header dependencies.

This pull request supersedes pull request #236.

This patch deduplicates the functions diff_timeval_us(),
adjust_unit(), and print_header() as well as the macro UNUSED().
Although function msleep() is only used in libflow.c, it was in
library utils. This patch moves msleep() to libflow.c.
Change short options for debug-real-size from 'r' (real) to
'a' (actual) and debug-wrap from 'w' (wrap) to 'm' (modulo).
libflow had the block size hardcoded. The currents users of
libflow, namely f3write and f3read, now pass the block size of
the file system.

While this might improve the performance of libflow,
the motivation for this change is to prepare libflow to integrate
with f3brew.
libflow last dependency is the macro SECTOR_SIZE. Since all F3
tools includes library libutils, this commit moves SECTOR_SIZE to
libutils.

From now on, library utils should focus on centralizing
file-system-related functions since only f3write and f3read employ
this library.
This commit adds the parameters --max-read-rate, --max-write-rate,
and --show-progress that work analogously to the same parameters
in f3write and f3read.
@AltraMayor AltraMayor merged commit 7c2a50a into master Feb 20, 2026
12 of 18 checks passed
@AltraMayor AltraMayor deleted the brew_flow branch February 20, 2026 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant