mirror of
https://github.com/systemd/systemd
synced 2025-11-07 19:04:46 +01:00
Compare commits
10 Commits
dc084399fa
...
72528419e1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
72528419e1 | ||
|
|
fe888c79f5 | ||
|
|
1287740560 | ||
|
|
f847b7eca3 | ||
|
|
df062bef29 | ||
|
|
c9872da4d1 | ||
|
|
18e6e8635f | ||
|
|
f85df81817 | ||
|
|
d076f9fd56 | ||
|
|
137c6c6b36 |
@ -82,7 +82,7 @@ sensor:modalias:acpi:SMO8500:*:dmi:*Acer*:pnOneS1002*
|
|||||||
|
|
||||||
sensor:modalias:acpi:KIOX0009*:dmi:*:svnAcer:pnOneS1003:*
|
sensor:modalias:acpi:KIOX0009*:dmi:*:svnAcer:pnOneS1003:*
|
||||||
ACCEL_MOUNT_MATRIX=1, 0, 0; 0, -1, 0; 0, 0, 1
|
ACCEL_MOUNT_MATRIX=1, 0, 0; 0, -1, 0; 0, 0, 1
|
||||||
|
|
||||||
sensor:modalias:acpi:BOSC0200*:dmi:*:svnAcer*:pnSwitchSW312-31:*
|
sensor:modalias:acpi:BOSC0200*:dmi:*:svnAcer*:pnSwitchSW312-31:*
|
||||||
ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1
|
ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1
|
||||||
|
|
||||||
@ -105,20 +105,14 @@ sensor:modalias:acpi:INVN6500*:dmi:*svnASUSTeK*:pnT300CHI*
|
|||||||
ACCEL_MOUNT_MATRIX=0, -1, 0; 1, 0, 0; 0, 0, 1
|
ACCEL_MOUNT_MATRIX=0, -1, 0; 1, 0, 0; 0, 0, 1
|
||||||
|
|
||||||
sensor:modalias:acpi:INVN6500*:dmi:*svnASUSTeK*:*pnT100TA*
|
sensor:modalias:acpi:INVN6500*:dmi:*svnASUSTeK*:*pnT100TA*
|
||||||
ACCEL_MOUNT_MATRIX=1, 0, 0; 0, -1, 0; 0, 0, 1
|
|
||||||
|
|
||||||
sensor:modalias:acpi:INVN6500*:dmi:*svnASUSTeK*:pnT200TA*
|
sensor:modalias:acpi:INVN6500*:dmi:*svnASUSTeK*:pnT200TA*
|
||||||
ACCEL_MOUNT_MATRIX=1, 0, 0; 0, -1, 0; 0, 0, 1
|
ACCEL_MOUNT_MATRIX=1, 0, 0; 0, -1, 0; 0, 0, 1
|
||||||
|
|
||||||
sensor:modalias:acpi:INVN6500*:dmi:*svnASUSTeK*:*pnTP201SA*
|
sensor:modalias:acpi:INVN6500*:dmi:*svnASUSTeK*:*pnTP201SA*
|
||||||
ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1
|
|
||||||
|
|
||||||
sensor:modalias:acpi:INVN6500*:dmi:*svnASUSTeK*:pn*E205SA*
|
sensor:modalias:acpi:INVN6500*:dmi:*svnASUSTeK*:pn*E205SA*
|
||||||
ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1
|
ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1
|
||||||
|
|
||||||
sensor:modalias:acpi:INVN6500*:dmi:*svn*ASUSTeK*:*pn*TP300LA*
|
sensor:modalias:acpi:INVN6500*:dmi:*svn*ASUSTeK*:*pn*TP300LA*
|
||||||
ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, 0; 0, 0, 1
|
|
||||||
|
|
||||||
sensor:modalias:acpi:INVN6500*:dmi:*svn*ASUSTeK*:*pn*TP300LD*
|
sensor:modalias:acpi:INVN6500*:dmi:*svn*ASUSTeK*:*pn*TP300LD*
|
||||||
ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, 0; 0, 0, 1
|
ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, 0; 0, 0, 1
|
||||||
|
|
||||||
@ -131,6 +125,7 @@ sensor:modalias:acpi:KXJ2109*:dmi:*:svnASUSTeK*:pnME176C*
|
|||||||
sensor:modalias:acpi:SMO8500*:dmi:*svn*ASUSTeK*:*pn*TP300LJ*
|
sensor:modalias:acpi:SMO8500*:dmi:*svn*ASUSTeK*:*pn*TP300LJ*
|
||||||
ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1
|
ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1
|
||||||
|
|
||||||
|
sensor:modalias:acpi:SMO8500*:dmi:*svn*ASUSTeK*:*pn*TP500LAB*
|
||||||
sensor:modalias:acpi:SMO8500*:dmi:*svn*ASUSTeK*:*pn*TP500LB*
|
sensor:modalias:acpi:SMO8500*:dmi:*svn*ASUSTeK*:*pn*TP500LB*
|
||||||
ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, 0; 0, 0, 1
|
ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, 0; 0, 0, 1
|
||||||
|
|
||||||
@ -171,7 +166,7 @@ sensor:modalias:acpi:BOSC0200*:dmi:bvnAmericanMegatrendsInc.:bvr5.11:*:svnDefaul
|
|||||||
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 (CWI1515)
|
# Chuwi Hi10 (CWI1515)
|
||||||
sensor:modalias:acpi:BOSC0200*:dmi:bvnAmericanMegatrendsInc.:bvrP02A_C106.60E:*:svnDefaultstring:pnDefaultstring:*
|
sensor:modalias:acpi:BOSC0200*:dmi:bvnAmericanMegatrendsInc.:bvrP02A_C106.60E:*:svnDefaultstring:pnDefaultstring:*
|
||||||
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 Pro
|
# Chuwi Hi10 Pro
|
||||||
|
|||||||
@ -247,6 +247,15 @@ int curl_glue_make(CURL **ret, const char *url, void *userdata) {
|
|||||||
if (curl_easy_setopt(c, CURLOPT_FOLLOWLOCATION, 1L) != CURLE_OK)
|
if (curl_easy_setopt(c, CURLOPT_FOLLOWLOCATION, 1L) != CURLE_OK)
|
||||||
return -EIO;
|
return -EIO;
|
||||||
|
|
||||||
|
if (curl_easy_setopt(c, CURLOPT_NOSIGNAL, 1L) != CURLE_OK)
|
||||||
|
return -EIO;
|
||||||
|
|
||||||
|
if (curl_easy_setopt(c, CURLOPT_LOW_SPEED_TIME, 60L) != CURLE_OK)
|
||||||
|
return -EIO;
|
||||||
|
|
||||||
|
if (curl_easy_setopt(c, CURLOPT_LOW_SPEED_LIMIT, 30L) != CURLE_OK)
|
||||||
|
return -EIO;
|
||||||
|
|
||||||
*ret = TAKE_PTR(c);
|
*ret = TAKE_PTR(c);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
#include "alloc-util.h"
|
#include "alloc-util.h"
|
||||||
#include "btrfs-util.h"
|
#include "btrfs-util.h"
|
||||||
#include "chattr-util.h"
|
|
||||||
#include "copy.h"
|
#include "copy.h"
|
||||||
#include "fd-util.h"
|
#include "fd-util.h"
|
||||||
#include "fs-util.h"
|
#include "fs-util.h"
|
||||||
@ -174,9 +173,7 @@ static int raw_import_maybe_convert_qcow2(RawImport *i) {
|
|||||||
if (converted_fd < 0)
|
if (converted_fd < 0)
|
||||||
return log_error_errno(errno, "Failed to create %s: %m", t);
|
return log_error_errno(errno, "Failed to create %s: %m", t);
|
||||||
|
|
||||||
r = chattr_fd(converted_fd, FS_NOCOW_FL, FS_NOCOW_FL, NULL);
|
(void) import_set_nocow_and_log(converted_fd, t);
|
||||||
if (r < 0)
|
|
||||||
log_warning_errno(r, "Failed to set file attributes on %s: %m", t);
|
|
||||||
|
|
||||||
log_info("Unpacking QCOW2 file.");
|
log_info("Unpacking QCOW2 file.");
|
||||||
|
|
||||||
@ -259,10 +256,7 @@ static int raw_import_open_disk(RawImport *i) {
|
|||||||
if (i->output_fd < 0)
|
if (i->output_fd < 0)
|
||||||
return log_error_errno(errno, "Failed to open destination %s: %m", i->temp_path);
|
return log_error_errno(errno, "Failed to open destination %s: %m", i->temp_path);
|
||||||
|
|
||||||
r = chattr_fd(i->output_fd, FS_NOCOW_FL, FS_NOCOW_FL, NULL);
|
(void) import_set_nocow_and_log(i->output_fd, i->temp_path);
|
||||||
if (r < 0)
|
|
||||||
log_warning_errno(r, "Failed to set file attributes on %s: %m", i->temp_path);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,6 @@
|
|||||||
|
|
||||||
#include "alloc-util.h"
|
#include "alloc-util.h"
|
||||||
#include "btrfs-util.h"
|
#include "btrfs-util.h"
|
||||||
#include "chattr-util.h"
|
|
||||||
#include "copy.h"
|
#include "copy.h"
|
||||||
#include "curl-util.h"
|
#include "curl-util.h"
|
||||||
#include "fd-util.h"
|
#include "fd-util.h"
|
||||||
@ -242,9 +241,7 @@ static int raw_pull_maybe_convert_qcow2(RawPull *i) {
|
|||||||
if (converted_fd < 0)
|
if (converted_fd < 0)
|
||||||
return log_error_errno(errno, "Failed to create %s: %m", t);
|
return log_error_errno(errno, "Failed to create %s: %m", t);
|
||||||
|
|
||||||
r = chattr_fd(converted_fd, FS_NOCOW_FL, FS_NOCOW_FL, NULL);
|
(void) import_set_nocow_and_log(converted_fd, t);
|
||||||
if (r < 0)
|
|
||||||
log_warning_errno(r, "Failed to set file attributes on %s: %m", t);
|
|
||||||
|
|
||||||
log_info("Unpacking QCOW2 file.");
|
log_info("Unpacking QCOW2 file.");
|
||||||
|
|
||||||
@ -354,13 +351,9 @@ static int raw_pull_make_local_copy(RawPull *i) {
|
|||||||
if (dfd < 0)
|
if (dfd < 0)
|
||||||
return log_error_errno(errno, "Failed to create writable copy of image: %m");
|
return log_error_errno(errno, "Failed to create writable copy of image: %m");
|
||||||
|
|
||||||
/* Turn off COW writing. This should greatly improve
|
/* Turn off COW writing. This should greatly improve performance on COW file systems like btrfs,
|
||||||
* performance on COW file systems like btrfs, since it
|
* since it reduces fragmentation caused by not allowing in-place writes. */
|
||||||
* reduces fragmentation caused by not allowing in-place
|
(void) import_set_nocow_and_log(dfd, tp);
|
||||||
* writes. */
|
|
||||||
r = chattr_fd(dfd, FS_NOCOW_FL, FS_NOCOW_FL, NULL);
|
|
||||||
if (r < 0)
|
|
||||||
log_warning_errno(r, "Failed to set file attributes on %s: %m", tp);
|
|
||||||
|
|
||||||
r = copy_bytes(i->raw_job->disk_fd, dfd, (uint64_t) -1, COPY_REFLINK);
|
r = copy_bytes(i->raw_job->disk_fd, dfd, (uint64_t) -1, COPY_REFLINK);
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
@ -600,10 +593,7 @@ static int raw_pull_job_on_open_disk_raw(PullJob *j) {
|
|||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
r = chattr_fd(j->disk_fd, FS_NOCOW_FL, FS_NOCOW_FL, NULL);
|
(void) import_set_nocow_and_log(j->disk_fd, i->temp_path);
|
||||||
if (r < 0)
|
|
||||||
log_warning_errno(r, "Failed to set file attributes on %s, ignoring: %m", i->temp_path);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -493,15 +493,21 @@ int generator_hook_up_growfs(
|
|||||||
"BindsTo=%%i.mount\n"
|
"BindsTo=%%i.mount\n"
|
||||||
"Conflicts=shutdown.target\n"
|
"Conflicts=shutdown.target\n"
|
||||||
"After=%%i.mount\n"
|
"After=%%i.mount\n"
|
||||||
"Before=shutdown.target %s\n"
|
"Before=shutdown.target %s\n",
|
||||||
|
program_invocation_short_name,
|
||||||
|
target);
|
||||||
|
|
||||||
|
if (empty_or_root(where)) /* Make sure the root fs is actually writable before we resize it */
|
||||||
|
fprintf(f,
|
||||||
|
"After=systemd-remount-fs.service\n");
|
||||||
|
|
||||||
|
fprintf(f,
|
||||||
"\n"
|
"\n"
|
||||||
"[Service]\n"
|
"[Service]\n"
|
||||||
"Type=oneshot\n"
|
"Type=oneshot\n"
|
||||||
"RemainAfterExit=yes\n"
|
"RemainAfterExit=yes\n"
|
||||||
"ExecStart="SYSTEMD_GROWFS_PATH " %s\n"
|
"ExecStart="SYSTEMD_GROWFS_PATH " %s\n"
|
||||||
"TimeoutSec=0\n",
|
"TimeoutSec=0\n",
|
||||||
program_invocation_short_name,
|
|
||||||
target,
|
|
||||||
escaped);
|
escaped);
|
||||||
|
|
||||||
return generator_add_symlink(dir, where_unit, "wants", unit);
|
return generator_add_symlink(dir, where_unit, "wants", unit);
|
||||||
|
|||||||
@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
#include "alloc-util.h"
|
#include "alloc-util.h"
|
||||||
#include "btrfs-util.h"
|
#include "btrfs-util.h"
|
||||||
|
#include "chattr-util.h"
|
||||||
|
#include "errno-util.h"
|
||||||
#include "import-util.h"
|
#include "import-util.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "macro.h"
|
#include "macro.h"
|
||||||
@ -163,3 +165,15 @@ int import_assign_pool_quota_and_warn(const char *path) {
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int import_set_nocow_and_log(int fd, const char *path) {
|
||||||
|
int r;
|
||||||
|
|
||||||
|
r = chattr_fd(fd, FS_NOCOW_FL, FS_NOCOW_FL, NULL);
|
||||||
|
if (r < 0)
|
||||||
|
return log_full_errno(
|
||||||
|
ERRNO_IS_NOT_SUPPORTED(r) ? LOG_DEBUG : LOG_WARNING,
|
||||||
|
r, "Failed to set file attributes on %s: %m", path);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|||||||
@ -23,3 +23,5 @@ int tar_strip_suffixes(const char *name, char **ret);
|
|||||||
int raw_strip_suffixes(const char *name, char **ret);
|
int raw_strip_suffixes(const char *name, char **ret);
|
||||||
|
|
||||||
int import_assign_pool_quota_and_warn(const char *path);
|
int import_assign_pool_quota_and_warn(const char *path);
|
||||||
|
|
||||||
|
int import_set_nocow_and_log(int fd, const char *path);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user