uutils / uutils/coreutils

df: Displays rootfs on different place and missing bind mounted entry with -a

Open
#9,883 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

U - df
Dominant language
Rust
Stars
24.1k
Forks
2k
Avg merge
1d 5h
Merged PRs (30d)
365

Description

$ unshare -rm bash
# mount -t tmpfs -o size=1M rootfs /mnt
# mount --bind /mnt /mnt
# mount -t tmpfs dummydev /mnt
# mount --move /mnt /

# uu-df
......
Filesystem     1K-blocks    Used Available Use% Mounted on
......
rootfs              1024       0      1024   0% /mnt
dummydev       118283244 7190584 109404248   7% /
# uu-df -a
Filesystem     1K-blocks    Used Available Use% Mounted on
......
rootfs              1024       0      1024   0% /mnt
dummydev       118283244 7190648 109404184   7% /

# gnu-df
Filesystem     1K-blocks    Used Available Use% Mounted on
dummydev       118283244 7190504 109404328   7% /
......
rootfs              1024       0      1024   0% /mnt
# gnu-df -a
Filesystem     1K-blocks    Used Available Use% Mounted on
/dev/sda2              -       -         -    - /
......
rootfs              1024       0      1024   0% /mnt
rootfs              1024       0      1024   0% /mnt
dummydev       118283244 7190616 109404216   7% /

Contributor guide

Open the contributing guide

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.

Research direction

Reproduce the unshare and mount sequence from the issue, then trace the df implementation and its mount discovery logic. Compare uu-df and uu-df -a with GNU df; done means the rootfs mount location and bind-mounted entry match the demonstrated GNU behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.