Files
Simon Glass 5161a55207 ext4l: Add support for read-only devices
Some block devices, such as LUKS-encrypted volumes mounted via
blkmap_crypt, only support read access. When ext4l attempts to write
the superblock during mount, the write fails and causes mount to fail.

Add a way to detect this read-only device detection:

- Test writes during mount by writing back the superblock data; if the
  write fails, mark the device as read-only
- Update bdev_read_only() to return the actual read_only status
- Update sb_rdonly() to check the SB_RDONLY flag

This allows ext4l to successfully mount read-only devices like LUKS
volumes for read access.

We could perhaps have a read-only flag in the block device, but that is
left for another day.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
2026-01-01 17:13:59 -07:00
..
2024-11-25 13:12:19 -06:00
2025-12-20 14:09:14 -07:00
2025-12-22 05:07:01 -07:00
2023-05-15 14:08:45 -04:00
2025-12-22 05:07:01 -07:00
2024-07-29 15:01:04 -06:00
2025-12-30 15:48:36 -07:00
2026-01-01 17:13:59 -07:00
2025-12-20 14:09:14 -07:00
2025-12-21 11:36:34 +00:00
2025-12-20 14:09:14 -07:00
2025-12-20 14:09:14 -07:00
2025-12-20 14:09:14 -07:00
2025-12-20 14:09:14 -07:00
2025-12-20 14:09:14 -07:00
2025-12-21 11:36:34 +00:00
2025-05-01 05:56:47 -06:00
2025-05-16 06:14:22 +02:00
2025-12-21 11:36:34 +00:00
2019-05-05 08:48:50 -04:00