Skip to contentSkip to conversation

Do not require atomic writes to be aligned on length boundary.

PATCH New Vitaliy Filippov 1 participant 1 message Dec 20, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Do not require atomic writes to be aligned on length boundary.

It directly violates NVMe specification where alignment is only required when atomic write boundary is set.

---
 fs/read_write.c | 3 ---
 1 file changed, 3 deletions(-)
fs/read_write.c +0 -3
index 833bae068770..babd95e7096e 100644
@@ -1810,9 +1810,6 @@ int generic_atomic_write_valid(struct kiocb *iocb, struct iov_iter *iter)
 	if (!is_power_of_2(len))
 		return -EINVAL;
 
-	if (!IS_ALIGNED(iocb->ki_pos, len))
-		return -EINVAL;
-
 	if (!(iocb->ki_flags & IOCB_DIRECT))
 		return -EOPNOTSUPP;
 
Signature · 1 line
2.51.0