# parted code (3.3-1) from focal

---------
libparted/arch/linux.c:
.....
=>                              if (fsync (fd) < 0 || close (fd) < 0)
                                        if (ped_exception_throw (
                                                PED_EXCEPTION_WARNING,
                                                PED_EXCEPTION_RETRY +
                                                        PED_EXCEPTION_IGNORE,
=>                                              _("Error fsyncing/closing %s: 
%s"),
                                                name, strerror (errno))
                                                        == PED_EXCEPTION_RETRY)
                                                goto retry;
                        }
                }
                free (name);


# FSYNC(2)
RETURN VALUE
       On success, these system calls return zero.  On error, -1 is returned, 
and errno is set appropriately.
---------

so definitely fsync() fails returning "-1" on the next unused loop
device as oppose to any other unused loop device.

The question is why unused loop device fails on fsync() ONLY when it is
the next unused loop device after a system boot (losetup -f) ?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1856871

Title:
  i/o error if next unused loop device is queried

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1856871/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to