Skip to content

v4.0: fix(fs): align write size to 4096 to support all NVMEs (backport of #11335)#11424

Merged
kskalski merged 1 commit into
v4.0from
mergify/bp/v4.0/pr-11335
Mar 20, 2026
Merged

v4.0: fix(fs): align write size to 4096 to support all NVMEs (backport of #11335)#11424
kskalski merged 1 commit into
v4.0from
mergify/bp/v4.0/pr-11335

Conversation

@mergify
Copy link
Copy Markdown

@mergify mergify Bot commented Mar 20, 2026

Problem

#9856 ended up with 512 alignment for direct I/O writes, but it fails for some NVMEs. As reported in FD tests:

Archive error: failed to unpack "accounts/316628658.54075": IO error: Invalid argument (os error 22)

The used hardware spec:

Node                  Generic               SN                   Model                                    Namespace  Usage                      Format           FW Rev
--------------------- --------------------- -------------------- ---------------------------------------- ---------- -------------------------- ---------------- --------
..
/dev/nvme1n1          /dev/ng1n1            KND7N5364I1308G1S    DELL NVME ISE PE8110 RI U.2 960GB        0x1        960.20  GB / 960.20  GB      4 KiB +  0 B   1.1.0

indicates the NVME sector size of 4KiB, which ends up as required alignment for O_DIRECT

independently there were failures noticed on some CI workers where disks are

$ lsblk -o NAME,SIZE,LOG-SEC,PHY-SEC,MOUNTPOINT
NAME          SIZE LOG-SEC PHY-SEC MOUNTPOINT
nvme2n1       3.5T    4096    4096
└─vg01-lv01   7.4T    4096    4096 /var/lib/buildkite-agent
nvme0n1     447.1G     512    4096
├─nvme0n1p1     1M     512    4096
└─nvme0n1p2 447.1G     512    4096 /
nvme3n1       3.5T    4096    4096
└─vg01-lv01   7.4T    4096    4096 /var/lib/buildkite-agent
nvme1n1     447.1G    4096    4096
└─vg01-lv01   7.4T    4096    4096 /var/lib/buildkite-agent

Again: LOG-SEC column showing 4096 makes it match the same cause and bumping alignment to 4096 is confirmed to fix the issue there.

Summary of Changes

Bump constant used for alignment of writes to 4096 and update comment.


This is an automatic backport of pull request #11335 done by [Mergify](https://mergify.com).

@mergify mergify Bot requested a review from a team as a code owner March 20, 2026 04:08
@kskalski kskalski requested a review from alessandrod March 20, 2026 04:10
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.0%. Comparing base (0775041) to head (6322b81).

Additional details and impacted files
@@           Coverage Diff           @@
##             v4.0   #11424   +/-   ##
=======================================
  Coverage    83.0%    83.0%           
=======================================
  Files         838      838           
  Lines      316433   316433           
=======================================
+ Hits       262803   262806    +3     
+ Misses      53630    53627    -3     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kskalski kskalski merged commit 4d73236 into v4.0 Mar 20, 2026
50 checks passed
@kskalski kskalski deleted the mergify/bp/v4.0/pr-11335 branch March 20, 2026 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants