Commit 9638457
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>1 parent 46c22a8 commit 9638457
1 file changed
+0
-35
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3872 | 3872 | | |
3873 | 3873 | | |
3874 | 3874 | | |
3875 | | - | |
3876 | | - | |
3877 | | - | |
3878 | | - | |
3879 | | - | |
3880 | | - | |
3881 | | - | |
3882 | | - | |
3883 | | - | |
3884 | | - | |
3885 | | - | |
3886 | | - | |
3887 | | - | |
3888 | | - | |
3889 | | - | |
3890 | | - | |
3891 | | - | |
3892 | | - | |
3893 | | - | |
3894 | | - | |
3895 | | - | |
3896 | | - | |
3897 | | - | |
3898 | | - | |
3899 | | - | |
3900 | | - | |
3901 | | - | |
3902 | | - | |
3903 | | - | |
3904 | | - | |
3905 | | - | |
3906 | | - | |
3907 | | - | |
3908 | 3875 | | |
3909 | 3876 | | |
3910 | | - | |
3911 | 3877 | | |
3912 | 3878 | | |
3913 | 3879 | | |
3914 | 3880 | | |
3915 | | - | |
3916 | 3881 | | |
3917 | 3882 | | |
3918 | 3883 | | |
| |||
0 commit comments