Commit ff99a2b
Brian Foster
ext4: fail unaligned direct IO write with EINVAL
JIRA: https://issues.redhat.com/browse/RHEL-121230
commit 9638457
Author: Jan Kara <jack@suse.cz>
Date: Mon Sep 1 13:27:40 2025 +0200
ext4: fail unaligned direct IO write with EINVAL
Commit bc264fe ("iomap: support incremental iomap_iter advances")
changed the error handling logic in iomap_iter(). Previously any error
from iomap_dio_bio_iter() got propagated to userspace, after this commit
if ->iomap_end returns error, it gets propagated to userspace instead of
an error from iomap_dio_bio_iter(). This results in unaligned writes to
ext4 to silently fallback to buffered IO instead of erroring out.
Now returning ENOTBLK for DIO writes from ext4_iomap_end() seems
unnecessary these days. It is enough to return ENOTBLK from
ext4_iomap_begin() when we don't support DIO write for that particular
file offset (due to hole).
Fixes: bc264fe ("iomap: support incremental iomap_iter advances")
Cc: stable@kernel.org
Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Message-ID: <20250901112739.32484-2-jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Brian Foster <bfoster@redhat.com>1 parent 6cc30e0 commit ff99a2b
1 file changed
+0
-35
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3468 | 3468 | | |
3469 | 3469 | | |
3470 | 3470 | | |
3471 | | - | |
3472 | | - | |
3473 | | - | |
3474 | | - | |
3475 | | - | |
3476 | | - | |
3477 | | - | |
3478 | | - | |
3479 | | - | |
3480 | | - | |
3481 | | - | |
3482 | | - | |
3483 | | - | |
3484 | | - | |
3485 | | - | |
3486 | | - | |
3487 | | - | |
3488 | | - | |
3489 | | - | |
3490 | | - | |
3491 | | - | |
3492 | | - | |
3493 | | - | |
3494 | | - | |
3495 | | - | |
3496 | | - | |
3497 | | - | |
3498 | | - | |
3499 | | - | |
3500 | | - | |
3501 | | - | |
3502 | | - | |
3503 | | - | |
3504 | 3471 | | |
3505 | 3472 | | |
3506 | | - | |
3507 | 3473 | | |
3508 | 3474 | | |
3509 | 3475 | | |
3510 | 3476 | | |
3511 | | - | |
3512 | 3477 | | |
3513 | 3478 | | |
3514 | 3479 | | |
| |||
0 commit comments