Tue Jun 13 12:08:55 CEST 2023 - aschnell@suse.com
- update qgroup in config info in snapperd when running setup-quota
+- improved waiting for btrfs quota rescan (see bsc #1211459)
-------------------------------------------------------------------
Fri Apr 21 09:47:57 CEST 2023 - aschnell@suse.com
struct btrfs_ioctl_quota_rescan_args args;
memset(&args, 0, sizeof(args));
- for (int i = 0;; ++i)
+ while (true)
{
if (ioctl(fd, BTRFS_IOC_QUOTA_RESCAN, &args) == 0)
break;
if (errno == EINPROGRESS)
{
- if (i == 0)
- y2war("waiting for old quota rescan to finish");
+ y2war("waiting for old quota rescan to finish");
+
+ if (ioctl(fd, BTRFS_IOC_QUOTA_RESCAN_WAIT, &args) < 0)
+ throw runtime_error_with_errno("ioctl(BTRFS_IOC_QUOTA_WAIT_RESCAN) failed", errno);
- sleep(1);
continue;
}