mirror of
https://github.com/uroni/urbackup_backend.git
synced 2025-10-26 11:36:50 +00:00
Handle EINVAL error return of BTRFS_IOC_SYNC
(cherry picked from commit dced36d9aa)
This commit is contained in:
parent
1632558cde
commit
e306f93a4a
@ -1326,7 +1326,8 @@ bool os_sync(const std::string & path)
|
||||
{
|
||||
if(ioctl(fd, BTRFS_IOC_SYNC, NULL)==-1)
|
||||
{
|
||||
if(errno!=ENOTTY && errno!=ENOSYS)
|
||||
if(errno!=ENOTTY && errno!=ENOSYS
|
||||
&& errno!=EINVAL)
|
||||
{
|
||||
close(fd);
|
||||
return false;
|
||||
@ -1341,8 +1342,7 @@ bool os_sync(const std::string & path)
|
||||
#if defined(HAVE_SYNCFS)
|
||||
if(syncfs(fd)!=0)
|
||||
{
|
||||
if(errno==ENOSYS
|
||||
|| errno==EINVAL)
|
||||
if(errno==ENOSYS)
|
||||
{
|
||||
close(fd);
|
||||
sync();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user