summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/task-analyzer.py
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2024-10-21 22:28:26 +0300
committerDavid Sterba <dsterba@suse.com>2024-11-11 16:34:22 +0300
commit6c83d153ed86eb17c46eafe4e78af4ce2071a052 (patch)
treeb889e9ce5932e148cb0cb00091a416828b883f91 /tools/perf/scripts/python/task-analyzer.py
parent5599f39356c6ec73d2015ae88286382d1034ef0d (diff)
downloadlinux-6c83d153ed86eb17c46eafe4e78af4ce2071a052.tar.xz
btrfs: add new ioctl to wait for cleaned subvolumes
Add a new unprivileged ioctl that will let the command 'btrfs subvolume sync' work without the (privileged) SEARCH_TREE ioctl. There are several modes of operation, where the most common ones are to wait on a specific subvolume or all currently queued for cleaning. This is utilized e.g. in backup applications that delete subvolumes and wait until they're cleaned to check for remaining space. The other modes are for flexibility, e.g. for monitoring or checkpoints in the queue of deleted subvolumes, again without the need to use SEARCH_TREE. Notes: - waiting is interruptible, the timeout is set to 1 second and is not configurable - repeated calls to the ioctl see a different state, so this is inherently racy when using e.g. the count or peek next/last Use cases: - a subvolume A was deleted, wait for cleaning (WAIT_FOR_ONE) - a bunch of subvolumes were deleted, wait for all (WAIT_FOR_QUEUED or PEEK_LAST + WAIT_FOR_ONE) - count how many are queued (not blocking), for monitoring purposes - report progress (PEEK_NEXT), may miss some if cleaning is quick - own waiting in user space (PEEK_LAST until it's 0) Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions