llnl / llnl/UnifyFS

chmod should be a read-modify-write of global meta data

Open
#402 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

The chmod wrapper updates the global file meta to record new permissions of the file. In case some other process has changed the global meta data, this probably should be a read-modify-write of the global meta data. The current process may have stale info, e.g.

```
// if the file has "rw-" bits set
if (rank == 0) {
MPI_Barrier(COMM_WORLD)
chmod(path, "-r")
} else if (rank == 1) {
chmod(path, "+x")
MPI_Barrier(COMM_WORLD)
}
// here it should now be "-wx"
// rank 1 adds "x", then rank 0 drops "r"
```
Without the read-modify-write, we'd get "-w-" because rank 0 wouldn't see the change by rank 1.

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 by locating the C chmod wrapper and the code that updates global file metadata, then trace how metadata is read and written around concurrent chmod calls. Reproduce the two-rank example if the project provides an MPI test setup; done means each chmod preserves changes made by another process, producing the combined permissions rather than overwriting them.

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
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.