1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-27 01:55:22 +03:00
The systemd System and Service Manager
Go to file
Luca Boccassi f5bb0a3163 loop-util: restart loop_configure and reopen FD when O_DIRECT fails
On kernel 5.10.178, when a squashfs file is stored on an EXT4 filesystem
backed by a dm-crypt volume, dissecting fails:

$ SYSTEMD_LOG_LEVEL=debug systemd-dissect /var/foo/bar.raw
Opened '/var/foo/bar.raw' in O_RDONLY access mode, with O_DIRECT enabled.
Couldn't find any partition table to derive sector size of.
loop2: Acquired exclusive lock.
Could not enable direct IO mode, proceeding in buffered IO mode.
Successfully acquired /dev/loop2, devno=7:2, nr=2, diskseq=87
Opened /dev/loop2 (fd=3, whole_block_devnum=7:2, diskseq=87).
      Name: bar.raw
      Size: 67.2M
 Sec. Size: 512
     Arch.: n/a

Successfully forked off '(sd-dissect)' as PID 4110.
Mounting /proc/self/fd/3 (squashfs) on /tmp/dissect-Zk3K5F (MS_RDONLY|MS_NODEV "")...
Failed to mount /proc/self/fd/3 (type squashfs) on /tmp/dissect-Zk3K5F (MS_RDONLY|MS_NODEV ""): Input/output error
Failed to mount dissected image: Input/output error
Failed to read /etc/hostname of image: No such file or directory
/etc/machine-id file of image is empty.
Failed to read has-init-system boolean: Input/output error
(sd-dissect) failed with exit status 1.
Failed to acquire image metadata: Input/output error

The kernel shows I/O errors:

kernel: blk_update_request: I/O error, dev loop2, sector 0 op 0x0:(READ) flags 0x800 phys_seg 1 prio class 0
kernel: SQUASHFS error: Failed to read block 0x0: -5
kernel: unable to read squashfs_super_block

This is independent of a particular filesystem and can be reproduced
reliably in my setup, starting from freshly formatted disks.

Instead of continuing when O_DIRECT fails, start over the setup
process without the flag, including opening a new FD, to make the
kernel happy.
2023-11-16 21:12:40 +00:00
.clusterfuzzlite ci: unpin CFLite 2022-04-26 09:13:57 +00:00
.github ci: work around mold/clang incompat 2023-11-13 16:24:17 +01:00
.semaphore test: use 'until' instead of 'while !' 2023-09-06 19:54:29 +01:00
catalog tree-wide: s/life-cycle/lifecycle/g 2023-11-06 20:16:34 +01:00
coccinelle coccinelle: don't run iovec-make on iovec_done{,_erase} 2023-10-25 11:16:37 +02:00
docs docs/RELEASE.md: retain systemd.io in IRC topic update 2023-11-14 20:18:50 +00:00
factory docs: excorcise NIS from nsswitch.conf 2023-09-20 15:17:52 +02:00
hwdb.d hwdb: Mark Dell platform accel sensor location to base 2023-11-16 09:36:38 +00:00
LICENSES LICENSES/README.md: fix syntax 2023-07-08 22:33:53 +00:00
man login: mark the TTY property as "emits change" 2023-11-16 11:26:26 +00:00
mkosi.conf.d Set default value for tools tree 2023-11-09 12:10:11 +01:00
mkosi.presets mkosi: Use RuntimeTrees= to mount sources 2023-10-20 12:43:57 +02:00
modprobe.d meson: install the right README file in modprobe.d 2021-07-07 14:52:05 +02:00
network Merge pull request #29928 from yuwata/meson-default-network 2023-11-14 17:33:03 +01:00
po Update po files 2023-11-14 21:26:27 +00:00
presets preset: enable systemd-networkd-wait-online.service by default 2023-06-07 21:51:37 +01:00
rules.d udev: add new builtin net_driver 2023-11-01 16:00:19 +00:00
shell-completion meson: Always build bootctl 2023-10-25 16:49:24 +02:00
src loop-util: restart loop_configure and reopen FD when O_DIRECT fails 2023-11-16 21:12:40 +00:00
sysctl.d sysctl.d: Fix pid_max comment 2023-10-31 13:07:49 +01:00
sysusers.d sysusers.d: create the user for systemd-journal-upload.service 2023-06-19 23:42:00 +02:00
test test: read from the right device 2023-11-16 10:16:11 +01:00
tmpfiles.d Revert "Revert "tmpfiles.d: adjust /dev/vfio/vfio access mode"" 2023-08-09 11:27:39 +09:00
tools hwdb: rename .html=>.csv 2023-11-15 15:21:26 +01:00
units units: pull in plymouth when booting into storagetm mode 2023-11-13 15:45:16 +01:00
xorg xorg/50-systemd-user: add a full license header 2021-10-01 14:45:00 +02:00
.clang-format clang-format: Adjust style of pointers 2022-05-30 04:00:54 +09:00
.ctags editors: Prevent ctags from following symlinks 2019-02-15 11:01:20 -08:00
.dir-locals.el scripts: use 4 space indentation 2019-04-12 08:30:31 +02:00
.editorconfig editorconfig: add NEWS whitespace configuration 2023-10-26 22:41:03 +01:00
.gitattributes Mark all base64 files as generated 2023-08-16 12:49:45 +02:00
.gitignore Add mkosi.conf to gitignore 2023-09-22 08:14:10 +02:00
.mailmap mailmap: "reduce contributor count by 13" 2023-08-16 12:49:42 +02:00
.packit.yml Revert "ci: temporarily disable Packit's i386" 2023-09-17 22:18:49 +02:00
.pylintrc Add .pylintrc to globally suppress warnings we don't really care about 2023-08-10 18:13:29 +02:00
.vimrc vimrc: explicitly set shiftwidth for the C file type 2023-09-18 13:11:45 +02:00
.ycm_extra_conf.py ycm: add doc string for all the functions in configuration file 2017-11-29 13:21:49 -07:00
configure configure: update meson invocation 2023-07-29 14:08:06 +02:00
LICENSE.GPL2
LICENSE.LGPL2.1 licence: remove references to old FSF address 2012-12-17 11:41:31 +01:00
Makefile tree-wide: add spdx header on all scripts and helpers 2021-01-28 09:55:35 +01:00
meson_options.txt meson: disable -Ddefault-network by default 2023-11-08 21:48:30 +09:00
meson.build Merge pull request #29995 from keszybz/voidify-timestamp-getters 2023-11-13 14:41:42 +01:00
mkosi.kernel.config mkosi: Don't disable CONFIG_USB 2023-09-06 12:58:30 +02:00
NEWS NEWS: finalize for v255-rc2 2023-11-15 16:31:53 +00:00
README docs: excorcise NIS from nsswitch.conf 2023-09-20 15:17:52 +02:00
README.md Update badge on README to refer new scorecard viewer (#28050) 2023-06-15 19:24:32 +01:00
TODO Merge pull request #30055 from YHNdnzj/logind-handle-action 2023-11-16 16:04:37 +00:00

Systemd

System and Service Manager

Semaphore CI 2.0 Build Status
Coverity Scan Status
OSS-Fuzz Status
CIFuzz
CII Best Practices
CentOS CI - CentOS 8
CentOS CI - Arch
CentOS CI - Arch (sanitizers)
Fossies codespell report
Weblate
Coverage Status
Packaging status
OpenSSF Scorecard

Details

Most documentation is available on systemd's web site.

Assorted, older, general information about systemd can be found in the systemd Wiki.

Information about build requirements is provided in the README file.

Consult our NEWS file for information about what's new in the most recent systemd versions.

Please see the Code Map for information about this repository's layout and content.

Please see the Hacking guide for information on how to hack on systemd and test your modifications.

Please see our Contribution Guidelines for more information about filing GitHub Issues and posting GitHub Pull Requests.

When preparing patches for systemd, please follow our Coding Style Guidelines.

If you are looking for support, please contact our mailing list or join our IRC channel.

Stable branches with backported patches are available in the stable repo.