Compare commits

...

4 Commits

Author SHA1 Message Date
Daan De Meyer 0d484bfdc8
Merge 2cef09e567 into 4f3df8c1bb 2024-11-24 12:05:35 +01:00
Vito Caputo 4f3df8c1bb NEWS: add blurb thanking Nick Owens
Nick's largely responsible for nerd-sniping me into fixing #34516
and did most of the testing.
2024-11-24 16:31:27 +09:00
白一百 8c18851e7e
hwdb: add entry for Chuwi Hi10 X1 (#35331)
https://www.chuwi.com/product/items/chuwi-hi10-x1.html
Rotated -90 degrees in the Z axis.
2024-11-24 16:30:33 +09:00
Daan De Meyer 2cef09e567 repart: Take configured minimum and maximum size into account for Minimize=
- Let's check if the minimum size we got is larger than the configured
maximum partition size and fail early if it is.
- Let's make sure for writable filesystems that we make the minimal
filesystem at least as large as the minimum partition size, to allow
creating minimal filesystems with a minimum size.
2024-11-23 11:36:54 +01:00
3 changed files with 18 additions and 2 deletions

3
NEWS
View File

@ -764,6 +764,9 @@ CHANGES WITH 257 in spe:
other cases EnterNamespace= might be an suitable approach to acquire other cases EnterNamespace= might be an suitable approach to acquire
symbolized backtraces.) symbolized backtraces.)
Special thanks to Nick Owens for bringing attention to and testing
fixes for issue #34516.
Contributions from: 12paper, A. Wilcox, Abderrahim Kitouni, Contributions from: 12paper, A. Wilcox, Abderrahim Kitouni,
Adrian Vovk, Alain Greppin, Allison Karlitskaya, Alyssa Ross, Adrian Vovk, Alain Greppin, Allison Karlitskaya, Alyssa Ross,
Anders Jonsson, Andika Triwidada, Andres Beltran, Anouk Ceyssens, Anders Jonsson, Andika Triwidada, Andres Beltran, Anouk Ceyssens,

View File

@ -295,6 +295,10 @@ sensor:modalias:acpi:MXC6655*:dmi:*:svnCHUWIInnovationAndTechnology*:pnHi10X:*
sensor:modalias:acpi:KIOX000A*:dmi:*:svnCHUWIInnovationAndTechnology*:pnHi10X:* sensor:modalias:acpi:KIOX000A*:dmi:*:svnCHUWIInnovationAndTechnology*:pnHi10X:*
ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1 ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1
# Chuwi Hi10 X1
sensor:modalias:acpi:NSA2513*:dmi:*:svnCHUWIInnovationAndTechnology*:pnHi10X1:*
ACCEL_MOUNT_MATRIX=0, 1, 0; -1, 0, 0; 0, 0, 1
# Chuwi Hi10 Go # Chuwi Hi10 Go
sensor:modalias:acpi:MXC6655*:dmi:*:svnCHUWIINNOVATIONLIMITED:pnHi10Go:* sensor:modalias:acpi:MXC6655*:dmi:*:svnCHUWIINNOVATIONLIMITED:pnHi10Go:*
ACCEL_MOUNT_MATRIX=-1, 0, 0; 0,-1, 0; 0, 0, 1 ACCEL_MOUNT_MATRIX=-1, 0, 0; 0,-1, 0; 0, 0, 1

View File

@ -7576,6 +7576,11 @@ static int context_minimize(Context *context) {
if (fstat(fd, &st) < 0) if (fstat(fd, &st) < 0)
return log_error_errno(errno, "Failed to stat temporary file: %m"); return log_error_errno(errno, "Failed to stat temporary file: %m");
if ((uint64_t) st.st_size > partition_max_size(context, p))
return log_error_errno(SYNTHETIC_ERRNO(E2BIG),
"Minimal partition size of %s filesystem of partition %s exceeds configured maximum size (%s > %s)",
p->format, strna(hint), FORMAT_BYTES(st.st_size), FORMAT_BYTES(partition_max_size(context, p)));
log_info("Minimal partition size of %s filesystem of partition %s is %s", log_info("Minimal partition size of %s filesystem of partition %s is %s",
p->format, strna(hint), FORMAT_BYTES(st.st_size)); p->format, strna(hint), FORMAT_BYTES(st.st_size));
@ -7612,8 +7617,12 @@ static int context_minimize(Context *context) {
* fool-proof. */ * fool-proof. */
uint64_t heuristic = streq(p->format, "xfs") ? fsz : fsz / 2; uint64_t heuristic = streq(p->format, "xfs") ? fsz : fsz / 2;
fsz = round_up_size(fsz + heuristic, context->grain_size); fsz = round_up_size(fsz + heuristic, context->grain_size);
if (minimal_size_by_fs_name(p->format) != UINT64_MAX) fsz = MAX(partition_min_size(context, p), fsz);
fsz = MAX(minimal_size_by_fs_name(p->format), fsz);
if (fsz > partition_max_size(context, p))
return log_error_errno(SYNTHETIC_ERRNO(E2BIG),
"Minimal partition size of %s filesystem of partition %s exceeds configured maximum size (%s > %s)",
p->format, strna(hint), FORMAT_BYTES(fsz), FORMAT_BYTES(partition_max_size(context, p)));
log_info("Minimal partition size of %s filesystem of partition %s is %s", log_info("Minimal partition size of %s filesystem of partition %s is %s",
p->format, strna(hint), FORMAT_BYTES(fsz)); p->format, strna(hint), FORMAT_BYTES(fsz));