llnl / llnl/UnifyFS

is_dir_empty only scans local file list for child items

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

Nobody has claimed this yet.

Dominant language
C
Stars
122
Forks
34
PR merge metrics
No merged PRs in 30d

Description

While skimming code, I noticed that ``unifyfs_fid_is_dir_empty`` only scans the local file list.
https://github.com/LLNL/UnifyFS/blob/fed21e57b262132939413afbd96430a9c4b157db/client/src/unifyfs.c#L1319

This is called by ``rmdir``. If we actually want to ensure child items don't exist, this logic will eventually need to be moved into the server.

Contributor guide

No contributing guide indexed for this repository

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

Start in client/src/unifyfs.c at unifyfs_fid_is_dir_empty around line 1319, then trace how rmdir uses it and how directory state is represented on the server. Define the server-side check needed to account for child items beyond the local file list, and verify that rmdir rejects non-empty directories consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.