repart: Don't fail when we're unable to read file attributes

We're getting EOVERFLOW when reading file attributes trying to get
mkosi running in a docker container (don't ask). I have a suspicion
this is coming from fuse-overlayfs. Anyway, since the file attributes
stuff is supposed to be purely optional, let's not fail when we can't
read file attributes for whatever reason.
This commit is contained in:
Daan De Meyer
2025-02-05 16:18:42 +01:00
parent 2ee81b556f
commit bc1291aa85
+3 -3
View File
@@ -4327,7 +4327,7 @@ static int prepare_temporary_file(Context *context, PartitionTarget *t, uint64_t
r = read_attr_fd(fdisk_get_devfd(context->fdisk_context), &attrs);
if (r < 0 && !ERRNO_IS_NEG_NOT_SUPPORTED(r))
return log_error_errno(r, "Failed to read file attributes of %s: %m", arg_node);
log_warning_errno(r, "Failed to read file attributes of %s, ignoring: %m", arg_node);
if (FLAGS_SET(attrs, FS_NOCOW_FL)) {
r = chattr_fd(fd, FS_NOCOW_FL, FS_NOCOW_FL, NULL);
@@ -6637,7 +6637,7 @@ static int context_split(Context *context) {
r = read_attr_fd(fd, &attrs);
if (r < 0 && !ERRNO_IS_NEG_NOT_SUPPORTED(r))
return log_error_errno(r, "Failed to read file attributes of %s: %m", arg_node);
log_warning_errno(r, "Failed to read file attributes of %s, ignoring: %m", arg_node);
}
fdt = xopenat_full(
@@ -7507,7 +7507,7 @@ static int context_minimize(Context *context) {
r = read_attr_fd(context->backing_fd, &attrs);
if (r < 0 && !ERRNO_IS_NEG_NOT_SUPPORTED(r))
return log_error_errno(r, "Failed to read file attributes of %s: %m", arg_node);
log_warning_errno(r, "Failed to read file attributes of %s, ignoring: %m", arg_node);
LIST_FOREACH(partitions, p, context->partitions) {
_cleanup_(rm_rf_physical_and_freep) char *root = NULL;