dd iflag=nocache should silently ignore fadvise's error in some cases
Open
Nobody has claimed this yet.
U - dd
- Dominant language
- Rust
- Stars
- 24.1k
- Forks
- 2k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 365
Description
> strace -qqq -e trace='/fadvise' gnu9.11/dd if=/etc/pacman.conf iflag=nocache>/dev/null
fadvise64(0, 0, 0, POSIX_FADV_DONTNEED) = 0
1+1 records in
1+1 records out
535 bytes copied, 0.000246046 s, 2.2 MB/s
> strace -o /dev/null -e inject=fadvise64:error=ENOSYS gnu9.11/dd if=/etc/pacman.conf iflag=nocache >/dev/null
1+1 records in
1+1 records out
535 bytes copied, 0.000378318 s, 1.4 MB/s
> strace -o /dev/null -e inject=fadvise64:error=ENOSYS dd if=/etc/pacman.conf iflag=nocache >/dev/null
dd: failed to discard cache for: /etc/pacman.conf: Function not implemented
dd: failed to discard cache for: /etc/pacman.conf: Function not implemented
dd: failed to discard cache for: /etc/pacman.conf: Function not implemented
1+1 records in
1+1 records out
535 bytes copied, 0.00134043 s, 535 kB/s
# exit 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with dd iflag=nocache and the injected fadvise64 ENOSYS error, comparing the output with gnu9.11. Trace the dd handling for cache-discard errors and identify the cases covered by the report. Done means the applicable error is silently ignored while dd still completes as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100