Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Step:15-SP4
snapper.28838
pr790.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File pr790.patch of Package snapper.28838
diff --git a/snapper/BtrfsUtils.cc b/snapper/BtrfsUtils.cc index 53bcb92a..47193ed1 100644 --- a/snapper/BtrfsUtils.cc +++ b/snapper/BtrfsUtils.cc @@ -284,21 +284,25 @@ struct btrfs_ioctl_quota_rescan_args args; memset(&args, 0, sizeof(args)); - if (ioctl(fd, BTRFS_IOC_QUOTA_RESCAN, &args) < 0) - throw runtime_error_with_errno("ioctl(BTRFS_IOC_QUOTA_RESCAN) failed", errno); - - while (true) + for (int i = 0;; ++i) { - sleep(1); - - memset(&args, 0, sizeof(args)); + if (ioctl(fd, BTRFS_IOC_QUOTA_RESCAN, &args) == 0) + break; - if (ioctl(fd, BTRFS_IOC_QUOTA_RESCAN_STATUS, &args) < 0) - throw runtime_error_with_errno("ioctl(BTRFS_IOC_QUOTA_RESCAN_STATUS) failed", errno); + if (errno == EINPROGRESS) + { + if (i == 0) + y2war("waiting for old quota rescan to finish"); + + sleep(1); + continue; + } - if (!args.flags) - break; + throw runtime_error_with_errno("ioctl(BTRFS_IOC_QUOTA_RESCAN) failed", errno); } + + if (ioctl(fd, BTRFS_IOC_QUOTA_RESCAN_WAIT, &args) < 0) + throw runtime_error_with_errno("ioctl(BTRFS_IOC_QUOTA_WAIT_RESCAN) failed", errno); }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor