]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- improved waiting for btrfs quota rescan (see bsc #1211459) 819/head
authorArvin Schnell <aschnell@suse.de>
Tue, 13 Jun 2023 13:00:56 +0000 (15:00 +0200)
committerArvin Schnell <aschnell@suse.de>
Tue, 13 Jun 2023 13:00:56 +0000 (15:00 +0200)
LIBVERSION
package/snapper.changes
snapper/BtrfsUtils.cc

index 66ce77b7ead5c03f8d614495285190635c0889d9..9fe9ff9d996b339374d1d060c6195ce7dbd53be7 100644 (file)
@@ -1 +1 @@
-7.0.0
+7.0.1
index 5257eb52492b271b7420b66c4f400ace43da7fcc..6ba7979d361bd80c8e5eaf50b69d016bb9095682 100644 (file)
@@ -2,6 +2,7 @@
 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
index 9d539ad5f7eabf60f3533a54cc50cb19787b5956..dc055165d4e3f4dadf9210fed5db26e274881ea5 100644 (file)
@@ -451,17 +451,18 @@ namespace snapper
            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;
                }