Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Fix/improve the btrfs_resize function

Open
#42 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
c

Research direction

Start from the bd_btrfs_resize() function, which the issue names as the place to add a device parameter. Read how it currently calls the btrfs resize command, and check how the btrfs filesystem resize DEV_ID:SIZE form works. Done means a caller can target one device, and a call without a device spreads the requested total size across the file system's devices. The issue has no comments or linked pull request, so ask the maintainers about the intended API before you write code.

Written by the indexing model from the issue text.

Description

enhancement

In order to resize a btrfs file system one needs to specify sizes of space that should be used on devices used by the btrfs file system. Simply calling btrfs filesystem resize SIZE MNT_POINT only resizes the first device not the whole file system. btrfs filesystem resize DEV_ID:SIZE MNT_POINT resizes a particular device.

Thus we need to add a parameter to bd_btrfs_resize() that will allow callers to specify a device and if none is specified, we need to calculate how much space we need to take from devices used by the file system to get the given total size (as one would expect from such function).

Dominant language
C
Stars
137
Forks
64
Avg merge
1d 5h
Merged PRs (30d)
3

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from storaged-project/libblockdev

All issues in storaged-project/libblockdev

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.