# Generated by Makefile. Do not edit.

2025-01-30  Curtis Gedak <gedakc@gmail.com>

    ==========   gparted-1.7.0   ==========

2025-01-30  Curtis Gedak <gedakc@gmail.com>

    Update copyright years

2025-01-15  Мирослав Николић <miroslavnikolic@rocketmail.com>

    Update Serbian translation

2024-09-22  Mike Fleetwood <mike.fleetwood@googlemail.com>

    Remove unnecessary else clause braces from commit_to_os()
    
    The braces around the code in the else clause became unnecessary with
    commit [1] which removed all the other code in the else clause.
    
    [1] 8df975c7d1b5d69897f286bfc5574c51cf58c9d5
        Increase minimum required libparted to 2.2 (!22)

2024-10-07  Mike Fleetwood <mike.fleetwood@googlemail.com>

    Conditional ENABLE_ONLINE_RESIZE is now always available (!131)
    
    The ability for libparted to online resize partitions was first included
    in libparted 3.2.  Now that is also minimum requirement, unconditionally
    include the code.
    
    Closes !131 - Increase minimum required version of libparted to 3.2

2024-10-07  Mike Fleetwood <mike.fleetwood@googlemail.com>

    Remove obsolete ENABLE_EXPLICIT_FLUSH_WORKAROUND (!131)
    
    The workaround for libparted <= 3.1 to explicitly flush the Linux kernel
    caches to ensure coherency between the caches of the whole disk device
    and the partition devices is obsolete now the minimum requirement is
    libparted 3.2.  Therefore remove the workaround.
    
    Closes !131 - Increase minimum required version of libparted to 3.2

2024-10-08  Mike Fleetwood <mike.fleetwood@googlemail.com>

    Conditional HAVE_LIBPARTED_FS_RESIZE is now always available (!131)
    
    The wanted ped_file_system_resize() function is available in the
    parted-fs-resize library with parted 3.1 and later.  Now the minimum
    requirement is libparted 3.2, unconditionally use the function and
    require the library.
    
    Closes !131 - Increase minimum required version of libparted to 3.2

2024-10-07  Mike Fleetwood <mike.fleetwood@googlemail.com>

    Remove obsolete conditional ENABLE_LOOP_DELETE_OLD_PTNS_WORKAROUND (!131)
    
    Now the minimum requirement is for libparted 3.2, workaround for
    libparted 2.0 to 3.0 not informing the kernel to delete old partitions
    when creating a "loop" table is obsolete.  Therefore remove the
    workaround.
    
    Closes !131 - Increase minimum required version of libparted to 3.2

2024-10-07  Mike Fleetwood <mike.fleetwood@googlemail.com>

    Increase minimum required version of libparted to 3.2 (!131)
    
    GNU Parted 3.2 was released 2014-07-28 [1][2].  The oldest supported
    distributions have these versions of GNU Parted (and libparted):
        Distribution       EOL            parted --version
        Debian 11          2026-Aug       3.4
        RHEL 8             2029-Jul       3.2
        SLES 15            2031-Jul [3]   3.2
        Ubuntu 20.04 LTS   2025-Apr       3.3
    
    Even older no longer supported distributions:
        Distribution       EOL            parted --version
        Debian 10          2024-Jun       3.2
        RHEL / CentOS 7    2024-Jun       3.1
        SLES 12 SP5        2024-Oct       3.1
        Ubuntu 18.04 LTS   2023-Apr       3.2
    
    GParted currently has 4 different sets of conditional code depending on
    the version of libparted it is compiled against.  With increasing the
    minimum version of libparted to 3.2, the 2 sets of bug workarounds for
    older versions of libparted can be removed and the 2 sets of enabling
    optional features can always be enabled.
    
    Therefore increase the minimum required version of libparted to 3.2.
    
    [1] GNU Parted 3.2 release announcement
        https://lists.gnu.org/archive/html/info-gnu/2014-07/msg00014.html
    [2] NEWS file from GNU Parted 3.2
        http://git.savannah.gnu.org/cgit/parted.git/tree/NEWS?h=v3.2
            "Noteworthy changes in release 3.2 (2014-07-28) [stable]"
    [3] Product Support Lifecycle Lifecycle Dates by Product, SUSE Linux
        Enterprise Server 15
        https://www.suse.com/lifecycle/#suse-linux-enterprise-server-15
    
    Closes !131 - Increase minimum required version of libparted to 3.2

2024-12-04  Mike Fleetwood <mike.fleetwood@googlemail.com>

    Partial white space tidy-up of btrfs::get_filesystems_support()

2024-12-04  Mike Fleetwood <mike.fleetwood@googlemail.com>

    Remove fallback for bcachefs online read FS usage
    
    There is only a fallback for btrfs busy detection, as added by commit
    "Don't run btrfs when not found, during busy detection (#271)".
    
    None of the other mountable file systems which have a custom online read
    FS usage method (btrfs, ext2/3/4 and jfs) have a fallback of using
    GParted's built-in method which queries the Linux kernel.  Therefore
    remove this from bcachefs.  Left behind by commit:
        5e788f0d11fbda252ca8eccc0b13298d3d6929ba
        Add reading of bcachefs usage when mounted (!123)

2024-12-02  Mike Fleetwood <mike.fleetwood@googlemail.com>

    Constify Utils::get_failure_status() parameter
    
    The parameter is not modified by the function.

2024-11-30  Mike Fleetwood <mike.fleetwood@googlemail.com>

    Don't run btrfs when not found, while setting mount points (#271)
    
    Repeat the same test as the previous commit.  Have a btrfs file system
    mounted, while the btrfs executable is not in $PATH.  GParted reports
    this to the terminal:
        # gparted
        GParted 1.6.0-git
        configuration --enable-online-resize
        libparted 3.6
        Failed to execute child process "btrfs" (No such file or directory)
    
    The error is because while GParted is discovering the mount points for
    the partition containing the mounted btrfs file system it ends up trying
    to run the missing btrfs executable.  The back trace for this is:
        #0 Utils::execute_command("btrfs filesystem show '/dev/sdb1'", ...)
        #1 btrfs::get_cache_entry(path="/dev/sdb1")
        #2 btrfs::get_mount_device(path="/dev/sdb1")
        #3 GParted_Core::set_mountpoints_helper(partition, path="/dev/sdb1")
        #4 GParted_Core::set_mountpoints(partition)
        #5 GParted_Core::set_device_partitions(device, lp_device, lp_disk)
        #6 GParted_Core::set_device_from_disk(device, device_path="/dev/sdb")
    
    This call chain via GParted_Core::set_mountpoints_helper() is not
    controlled by any of the file system support capabilities.  So instead
    fix this by having the btrfs module remember whether the btrfs
    executable is found and only execute it in btrfs::get_cache_entry() when
    it is found.
    
    Continuing with the above test, open the Partition Information dialog.
    This generates another failed to execute child process btrfs error.  The
    backtrace for this is:
        #0 Utils::execute_command("btrfs filesystem show '/dev/sdb1'", ...)
        #1 btrfs::get_cache_entry(path="/dev/sdb1")
        #2 btrfs::get_get_members(path="/dev/sdb1")
        #3 Dialog_Partition_Info::Display_Info()
        #4 Dialog_Partition_Info::Dialog_Partition_Info()
        #5 Win_GParted::activate_info()
    
    The fix in this commit also covers this test case too.
    
    Closes #271 - GParted stuck forever at Searching /dev/sda partitions
                  when btrfs-progs not installed

2024-12-04  Mike Fleetwood <mike.fleetwood@googlemail.com>

    Don't run btrfs when not found, reading online usage (#271)
    
    Now mount the btrfs file system, still while the btrfs executable is not
    in $PATH.  GParted reports this to the terminal:
        # gparted
        GParted 1.6.0-git
        configuration --enable-online-resize
        libparted 3.6
        Failed to execute child process "btrfs" (No such file or directory)
        Failed to execute child process "btrfs" (No such file or directory)
    
    One of those errors is because in the online (mounted) case the btrfs
    specific method for reading file system usage is always called, even
    when the btrfs executable is not found.  (fs.online_read was always set
    to FS::EXTERNAL).
    
    Fix this by only enabling online (mounted) reading of file system usage
    when the btrfs executable is found.
    
    Closes #271 - GParted hangs while searching /dev/sda partitions when
                  btrfs-progs is not installed

2024-12-04  Mike Fleetwood <mike.fleetwood@googlemail.com>

    Don't run btrfs when not found, during busy detection (#271)
    
    Repeat test 1 from the first commit "Don't hang printing a UTF-8
    exception in a none UTF-8 locale (#271)".  Run GParted with a btrfs file
    system on disk but the btrfs executable not in $PATH.  GParted reports
    this to the terminal:
        # gparted
        GParted 1.6.0-git
        configuration --enable-online-resize
        libparted 3.6
        Failed to execute child process "btrfs" (No such file or directory)
    
    This happens because busy (mounted) status detection for btrfs was
    always set to use the btrfs specific method even when the required btrfs
    executable was not found.  (fs.busy was always set to FS::EXTERNAL).
    
    (Btrfs has a specific busy detection method to handle multi-device file
    systems which can be mounted via any one of the members in the
    multi-device file system, which isn't necessarily the block device
    currently being queried).
    
    Fix this by only using the btrfs specific busy detection method when the
    btrfs executable is found.  As the busy (mounted) state of a file system
    is important in determining which operations can and can't be performed
    use the imperfect fallback of GParted's built-in file system mounted
    detection method which queries /proc/mounts.  Note that this only
    detects when a single device btrfs file system is mounted or when a
    multi-device btrfs file system is mounted by the device currently being
    queried.  It does not detect when a multi-device btrfs file system is
    mounted using a different device to the one currently being queried for
    it's busy status.
    
    Closes #271 - GParted hangs while searching /dev/sda partitions when
                  btrfs-progs is not installed

2024-12-02  Mike Fleetwood <mike.fleetwood@googlemail.com>

    Convert all printed exceptions into the locale's character set (#271)
    
    In order to prevent GParted hanging when it prints any other caught Glib
    exceptions convert those messages into the locale's character set too.
    
    Also one of the exceptions was being printed to standard output.  Change
    that to standard error to match all the others.
    
    Closes #271 - GParted hangs while searching /dev/sda partitions when
                  btrfs-progs is not installed

2024-12-02  Mike Fleetwood <mike.fleetwood@googlemail.com>

    Don't hang printing a UTF-8 exception in a none UTF-8 locale (#271)
    
    A user reported that GParted gets stuck forever in the initial device
    scan [1].  The requirements to reproduce this issue are:
    1. A btrfs file system is found.
    2. The btrfs executable is not found.
    3. Use a locale that is not UTF-8 capable.
    
    Test 1: Run GParted with just requirements 1 and 2 met but not 3.
        # gparted
        GParted 1.6.0-git
        configuration --enable-online-resize
        libparted 3.6
        Failed to execute child process "btrfs" (No such file or directory)
    The GParted device scan completes normally and the main window displays
    the first disk drive.  Get the same results when running:
        # LANG=C.utf8 gparted
    (Note that the actual error message uses Unicode left and right double
    quote marks.  They've been replaced here with ANSI double quote mark in
    order to avoid making this commit message Unicode).
    
    Test 2: Now run GParted with all 3 requirements met.
        # LANG=C gparted
        GParted 1.6.0-git
        configuration --enable-online-resize
        libparted 3.6
    
        ** (gpartedbin:26222): CRITICAL **: 21:56:17.945:
        unhandled exception (type Glib::Error) in signal handler:
        domain: g_convert_error
        code  : 1
        what  : Invalid byte sequence in conversion input
    GParted gets stuck forever in the initial device scan with the status
    bar showing "Searching /dev/sda partitions".
    
    The Unicode exception message is printed using this code:
        [Utils.cc:719]    std::cerr << e.what() << std::endl;
    
    Glib::ustring::operator<<() attempts to translate the Unicode exception
    message into ANSI characters for the C locale.  However the message
    contains Unicode left and right double quote marks so this fails with
    the above unhandled exception and never returns.
    
    Fix by explicitly converting the exception message into the current
    locale's character set.  Any characters which aren't converted are
    simply skipped.
    
    (I think all the Glib::SpawnError exceptions originate from GLib's
    fork_exec() [2].  Before translation from English into other languages,
    the only none ANSI characters they contain are Unicode left and right
    double quote marks).
    
    [1] gparted gets stuck while scanning /dev/sda
        https://gitlab.archlinux.org/archlinux/packaging/packages/gparted/-/issues/1
    [2] glib/glib/gspawn-posix.c fork_exec()
        https://gitlab.gnome.org/GNOME/glib/-/blob/2.82.2/glib/gspawn-posix.c?ref_type=tags#L1656
    
    Closes #271 - GParted hangs while searching /dev/sda partitions when
                  btrfs-progs is not installed

2024-11-07  Yaron Shahrabani <sh.yaron@gmail.com>

    Update Hebrew translation

2024-11-07  Yaron Shahrabani <sh.yaron@gmail.com>

    Update Hebrew translation

2024-10-17  Hugo Carvalho <hugokarvalho@hotmail.com>

    Update Portuguese translation

2024-09-29  Sergej A. <asvmail.as@gmail.com>

    Update Russian translation

2024-09-24  Alan Mortensen <alanmortensen.am@gmail.com>

    Update Danish translation

2024-09-21  Rafael Fontenelle <rafaelff@gnome.org>

    Update Brazilian Portuguese translation

2024-09-17  Daniel Rusek <mail@asciiwolf.com>

    Update Czech translation

2024-09-15  Piotr Drąg <piotrdrag@gmail.com>

    Update Polish translation

2024-08-30  Mike Fleetwood <mike.fleetwood@googlemail.com>

    Comment the purpose of Device.readonly
    
    To avoid having to keep researching the history of what the setting
    means and why GParted sets it during device probe.  The code fragment in
    question:
        GParted_Core::set_device_from_disk()
        ...
            // Case 4/4: Partitioned drive
            ...
            if (device.highest_busy)
                device.readonly = ! commit_to_os(lp_disk, SETTLE_DEVICE_PROBE_MAX_WAIT_SECONDS);
    
    Originally added by commit:
        286579d5780099b8501fece8250473a1253ccf08
        Every devicescan now tests on beforehand if the kernel is able to reread

2024-09-05  Mike Fleetwood <mike.fleetwood@googlemail.com>

    Refactor get_device_and_disk() into if fail return early pattern
    
    Again to follow a code pattern slowly being applied.

2024-08-22  Mike Fleetwood <mike.fleetwood@googlemail.com>

    Remove unused 4th parameter from get_device_and_disk()
    
    The flush parameter is no longer used and always defaults to false,
    therefore remove it.  Instead flush is only set to true when calling
    get_device() directly since commit:
        683dc9d1abd6a388e6f1eda7c7ba8465eb970756
        Only read partition table after not finding a whole disk file system (#771244)

2024-09-08  Mike Fleetwood <mike.fleetwood@googlemail.com>

    Refactor get_device() into if fail return early pattern
    
    To follow a code pattern slowly being applied.

2024-08-19  Mike Fleetwood <mike.fleetwood@googlemail.com>

    Prevent GParted probe starting LVM Volume Groups (#259)
    
    A user reported that it was not possible to deactivate an active LVM
    Physical Volume.  They were using GParted app from GParted Live 1.6.0.
    This behaviour has been reproduced on GParted Live 1.6.0-3 (Debian SID
    as of 2024-04-08) and Fedora Rawhide as of 2024-08-15, both recent
    development branches of their respective distributions.  Was not able to
    replicate this on these latest releases: Debian 12, Fedora 40 and
    Ubuntu 24.04 LTS.
    
    GParted did deactivate the LVM Volume Group containing the Physical
    Volume but device refresh probing triggered a udev rule which
    re-activated the Volume Group.  Summary:
    
    1. GParted read the partition table by calling ped_disk_get().
    2. Libparted opened the whole disk and every partition read-write to
       flush the caches for coherency.  On closing the file handles ...
    3. The kernel generated partition remove and add uevents.
    4. Udev triggered the rule to start the LVM VG.
    
    Details obtained with the help of udevadm monitor, strace and
    journalctl:
        GParted  | set_devices_thread()
        GParted  |   set_device_from_disk()
        GParted  |     get_device()
        GParted  |     get_disk()
        libparted|       ped_disk_new()
        libparted|         openat(AT_FDCWD, "/dev/sdb", O_RDWR) = 7
        libparted|         ioctl(7, BLKFLSBUF)         = 0
        libparted|         openat(AT_FDCWD, "/dev/sdb1", O_RDWR) = 8
        libparted|         ioctl(8, BLKFLSBUF)         = 0
        libparted|         fsync(8)                    = 0
        libparted|         close(8)                    = 0
        KERNEL   | change   /devices/pci0000:00/.../block/sdb/sdb1 (block)
        UDEV     | change   /devices/pci0000:00/.../block/sdb/sdb1 (block)
        libparted|         fsync(7)                    = 0
        libparted|         close(7)                    = 0
        KERNEL   | remove   /devices/pci0000:00/.../block/sdb/sdb1 (block)
        KERNEL   | change   /devices/pci0000:00/.../block/sdb (block)
        KERNEL   | add      /devices/pci0000:00/.../block/sdb/sdb1 (block)
        UDEV     | remove   /devices/pci0000:00/.../block/sdb/sdb1 (block)
        UDEV     | change   /devices/pci0000:00/.../block/sdb (block)
        UDEV     | add      /devices/pci0000:00/.../block/sdb/sdb1 (block)
        SYSLOG   | lvm[62502]: PV /dev/sdb1 online, VG testvg is complete.
        KERNEL   | add      /devices/virtual/bdi/253:0 (block)
        KERNEL   | add      /devices/virtual/block/dm-0 (block)
        KERNEL   | change   /devices/virtual/block/dm-0 (block)
        UDEV     | add      /devices/virtual/bdi/253:0 (block)
        UDEV     | add      /devices/virtual/block/dm-0 (block)
        UDEV     | change   /devices/virtual/block/dm-0 (block)
        SYSLOG   | systemd[1]: Started lvm-activate-testvg.service - /usr/sbin/lvm vgchange -aay --autoactivation event testvg.
        SYSLOG   | lvm[62504]:   1 logical volume(s) in volume group "testvg" now active
        SYSLOG   | systemd[1]: lvm-activate-testvg.service: Deactivated successfully.
    
        # grep 'lvm vgchange -a' /usr/lib/udev/rules.d/*lvm*
        /usr/lib/udev/rules.d/69-dm-lvm.rules:... RUN+="... /usr/sbin/lvm vgchange -aay --autoactivation event $env{LVM_VG_NAME_COMPLETE}"
    
    Evaluation using systemd's Locking Block Device Access [1]. Took a BSD
    file lock on /dev/sdb while GParted was probing the drive.  Used Python
    from another terminal:
        # python
        >>> import fcntl
        >>> f = open('/dev/sdb', 'wb')
        >>> fcntl.flock(f, fcntl.LOCK_EX|fcntl.LOCK_NB)
    Ran GParted.  Released the lock by closing the open file when GParted
    display had updated.
        >>> f.close()
    
    The lock temporarily stopped the Volume Group being activated so GParted
    displayed it as inactive, but as soon as the lock was released the udev
    rule fired and the Volume Group was activated.  This is an even worse
    situation as GParted displayed the Volume Group as inactive but it was
    actually active.  Therefore GParted can't use this method.
    
    This type of issue has been encountered before with bcache devices [2]
    and Linux Software RAID arrays [3] being automatically started by device
    probing.  Fix using the same method of temporarily adding in a blank
    override rule which does nothing.
    
    [1] systemd - Locking Block Device Access
        https://systemd.io/BLOCK_DEVICE_LOCKING/
    [2] 8640f91a4f4350bf9508a810cbb2ae28a9acb9b2
        Prevent GParted probe starting stopped bcache (#183)
    [3] a255abf3432ad106fac9c766f0816ada20be8e42
        Prevent GParted starting stopped Linux Software RAID arrays (#709640)
    
    Closes #259 - Trying to deactivate LVM PV fails

2024-08-25  Mike Fleetwood <mike.fleetwood@googlemail.com>

    Only explicitly flush devices when using libparted < 3.2 (#259)
    
    During device probing GParted always explicitly calls ped_device_sync()
    to flush the caches for coherency between the whole disk device and the
    partition devices [1].  As the GParted_Core::flush_device() comment
    explains, since v3.1.61-gfb99ba5 [2], libparted flushes the devices
    every time a device is opened [3], so also explicitly doing this in
    GParted is unnecessary.  Therefore stop explicitly flushing the devices
    in GParted, except when using libparted 3.1 and older which doesn't do
    it itself.
    
    The ped_device_open() and ped_device_close() needed for the
    ped_device_sync() is also a trigger of device changes and udev rule
    execution performing LVM Volume Group activation, because libparted
    opens the device read-write [4].  This is another reason to remove it
    when possible.  However even when eliminated it does not solve the issue
    of LVM VG activation because other triggers remain.  Do want this change
    first though so that the sequence of libparted calls isn't changed
    immediately after documenting them and fixing the issue and so that
    there is no doubt that this change doesn't fix the issue.
    
    Removing this extra device flush saves a little bit of time, depending
    on the speed of the drive and number of partitions.  Sample savings on
    my desktop:
        Drive type and partitions       Saving (seconds)
        -----------------------------   ----------------
        fast SSD with 3 partitions      0.05
        slow SSD with 12 partitions     0.27
        HDD with 1 partition            0.05
        VHDD in VM with 1 partition     0.14
        VHDD in VM with 10 partitions   0.58
    
    Also the settle_device() call in flush_device() needs to be kept to wait
    for device changes and udev rule execution whether it is GParted
    explicitly flushing the device or just libparted automatically doing it
    for cache coherency in ped_device_get().  This is because:
    1.  Libparted <= 3.2 opens the whole disk device read-write for
        ped_device_get() [5].  (This was changed with parted
        v3.2.26-g44d5ae0 [6] to open the whole disk device read-only).
    2.  Libparted up to and including the latest 3.6 release still opens all
        partition devices read-write for ped_device_get() [7].
    3.  A whole disk device FAT32 file system looks enough like a partition
        table that both the Linux kernel and libparted think it is
        partitioned:
            # mkfs.fat -F32 /dev/sdb
            mkfs.fat 4.2 (2021-01-31)
            # grep sdb /proc/partitions
               8       16    8388608 sdb
               8       17    8388607 sdb1
            # parted /dev/sdb print
            Model: ATA VBOX HARDDISK (scsi)
            Disk /dev/sdb: 8590MB
            Sector size (logical/physical): 512B/512B
            Partition Table: loop
            Disk Flags:
    
            Number  Start  End        Size       File system  Flags
             1      0s     16777215s  16777216s  fat32
    
    So the ped_device_get() call on a whole disk device FAT32 file system
    still triggers device change and udev rule execution which needs to be
    waited for, as this is exactly the case fixed previously by commit:
        1382e0b828f630a705cecd97c346dfc6267909bf
        Wait for udev change on /dev/DISK when querying whole device FS (!46)
    
    [1] 3bea067596e3e2d6513cda2a66df1b3e4fa432fb
        Flush devices when scanning to prevent reading stale signatures (#723842)
    [2] Revert "linux-commit: do not unnecessarily open partition device nodes"
        http://git.savannah.gnu.org/cgit/parted.git/commit/?id=fb99ba5ebd0dc34204fc9f1014131d5d494805bc
    [3] parted libparted/arch/linux.c:_device_open()
        https://git.savannah.gnu.org/cgit/parted.git/tree/libparted/arch/linux.c?h=v3.6#n1752
            1709 static int
            1710 linux_open (PedDevice* dev)
            1711 {
            1712     return _device_open (dev, RW_MODE);
            1713 }
            1714
            1715 static int
            1716 _device_open (PedDevice* dev, int flags)
            ...
            1752     _flush_cache (dev);
    
    [4] parted libparted/device.c:ped_device_open() v3.6
        https://git.savannah.gnu.org/cgit/parted.git/tree/libparted/device.c?h=v3.6#n226
        parted libparted/arch/linux.c v3.6
        https://git.savannah.gnu.org/cgit/parted.git/tree/libparted/arch/linux.c?h=v3.6
            ped_device_open(...)
                ped_architecture->dev_ops->open(...) = linux_open(...)
                    _device_open(..., RW_MODE)
                        open(..., O_RDWR)
    
    [5] parted libparted/device.c:ped_device_get() v3.2
        https://git.savannah.gnu.org/cgit/parted.git/tree/libparted/device.c?h=v3.2#n149
        parted libparted/arch/linux.c v3.2
        https://git.savannah.gnu.org/cgit/parted.git/tree/libparted/arch/linux.c?h=v3.2
            ped_device_get(...)
                ped_architecture->dev_ops->_new(...) = linux_new()
                    init_ide(...)
                    init_scsi(...)
                    init_generic(...)
                        ped_device_open(...)
                            ped_architecture->dev_ops->open(...) = linux_open(...)
                                open(..., O_RDWR)
    [6] libparted: Use read only when probing devices on linux (#1245144)
        http://git.savannah.gnu.org/cgit/parted.git/commit/?id=44d5ae0115c4ecfe3158748309e9912c5aede92d
    [7] parted libparted/arch/linux.v v3.6
        http://git.savannah.gnu.org/cgit/parted.git/tree/libparted/arch/linux.c?h=v3.6#n1660
            1660 static void
            1661 _flush_cache (PedDevice* dev)
            ...
            1673     for (i = 1; i < lpn; i++) {
            ...
            1680         if (!_partition_is_mounted_by_path(name)) {
            1681             fd = open (name, WR_MODE, 0);
    
    Closes #259 - Trying to deactivate LVM PV fails

2024-09-13  Balázs Úr <balazs@urbalazs.hu>

    Update Hungarian translation

2024-09-13  Ekaterine Papava <papava.e@gtu.ge>

    Update Georgian translation

2024-09-12  Yuri Chornoivan <yurchor@ukr.net>

    Update Ukrainian translation

2024-09-12  Luming Zh <lumingzh@qq.com>

    Update Chinese (China) translation

2024-09-11  Martin <miles@filmsi.net>

    Update Slovenian translation

2024-09-11  Jürgen Benvenuti <jbenvenuti@gnome.org>

    Update German translation

2024-09-11  Anders Jonsson <anders.jonsson@norsjovallen.se>

    Update Swedish translation

2024-03-16  Mike Fleetwood <mike.fleetwood@googlemail.com>

    Drop the 2 decimal places when printing values in bytes
    
    When printing a number of bytes using Utils::format_size() it always
    formatted the value with 2 decimal digits and an IEC multiplier.  This
    can be seen in the details of any operation which includes clearing old
    file system signatures.  Fragment of operation details:
        Format /dev/sdb1 as cleared
        + calibrate /dev/sdb1
        + clear old file system signatures in /dev/sdb1
            write 512.00 KiB of zeros at byte offset 0
            write 4.00 KiB of zeros at byte offset 67108864
    >>      write 512.00 B of zeros at byte offset 132537184
            write 4.00 KiB of zeros at byte offset 1072693248
            write 512.00 KiB of zeros at byte offset 133593440
            flush operating system cache of /dev/sdb1
    
    It doesn't make sense to be reporting 100ths of a byte.  So when values
    are below 1 KiB report numbers of bytes without any decimal digits.

2024-03-25  Mike Fleetwood <mike.fleetwood@googlemail.com>

    Query usage of multi-device bcachefs file systems correctly
    
    Create an uneven used space multi-device bcachefs file system like this,
    where sdb1 is about 1/2 used and sdb2 is almost empty:
        # bcachefs format /dev/sdb1
        # mount /dev/sdb1 /mnt/1
        # dd if=/dev/zero bs=1M count=512 of=/mnt/1/zeros.bin
        # bcachefs device add /mnt/1 /dev/sdb2
    
    GParted reports both devices as having the same usage:
        Partition   File System   Mount Point   Size       Used         Unused       Flags
        /dev/sdb1   bcachefs      /mnt/1        1.00 GiB   526.00 MiB   498.00 MiB
        /dev/sdb2   bcachefs      /mnt/1        1.00 GiB   526.00 MiB   498.00 MiB
    
    When in fact the used space is significantly different for each device:
        # bcachefs fs usage /mnt/1 | egrep ' \(device |free:|capacity:'
        (no label) (device 0):          sdb1              rw
          free:                    522190848            3984
          capacity:               1073741824            8192
        (no label) (device 1):          sdb2              rw
          free:                   1061945344            8102
          capacity:               1073741824            8192
    
    This is because bcachefs::set_used_sectors() is always searching for the
    first "free:" and "capacity:" figures.  Fix by reading the figures for
    the correct device.

2024-04-06  Mike Fleetwood <mike.fleetwood@googlemail.com>

    Add bcachefs checking (!123)
    
    [Only the options being used by GParted are quoted here from the help
    output.  More options are available.]
        $ bcachefs fsck --help
        bcachefs fsck - filesystem check and repair
        Usage: bcachefs fsck [OPTION]... <device>
    
        Options:
          -y               Assume "yes" to all questions
          -f               Force checking even if filesystem is marked clean
          -v               Be verbose
    
    Closes !123 - Add support for bcachefs, single device file systems only

2024-03-17  Mike Fleetwood <mike.fleetwood@googlemail.com>

    Add bcachefs growing (!123)
    
    Shrinking a bcachefs file system is not supported.
        # truncate -s $((1*1024*1024*1024)) /tmp/disk.img
        # losetup --find --show /tmp/disk.img
        /dev/loop0
        # bcachefs format /dev/loop0
        ...
        # bcachefs device resize /dev/loop0 $((1*1024*1024*1024 - 512))
        Doing offline resize of /dev/loop0
        mounting version 1.4: member_seq
        initializing new filesystem
        going read-write
        initializing freespace
        Shrinking not supported yet
        # echo $?
        1
    
    Growing a bcachefs file system is supported when unmounted.
        # truncate -s $((2*1024*1024*1024)) /tmp/disk.img
        # losetup --set-capacity /dev/loop0
        # bcachefs device resize /dev/loop0
        Doing offline resize of /dev/loop0
        mounting version 1.6: btree_subvolume_children
        recovering from unclean shutdown
        journal read done, replaying entries 1-1
        alloc_read... done
        stripes_read... done
        snapshots_read... done
        going read-write
        journal_replay... done
        resume_logged_ops... done
        delete_dead_inodes... done
        resizing /dev/loop0 to 16384 buckets
        # echo $?
        0
        # bcachefs show-super /dev/loop0 | egrep 'Device:|Size:'
        Device:                                     0
          Size:                                     2.00 GiB
    
    Growing is also supported when mounted.
        # mount /dev/loop0 /mnt/0
        # truncate -s $((3*1024*1024*1024)) /tmp/disk.img
        # losetup --set-capacity /dev/loop0
        # bcachefs device resize /dev/loop0
        Doing online resize of /dev/loop0
        resizing /dev/loop0 to 24576 buckets
        # echo $?
        0
        # bcachefs show-super /dev/loop0 | egrep 'Device:|Size:'
        Device:                                     0
          Size:                                     3.00 GiB
    
    Closes !123 - Add support for bcachefs, single device file systems only

2024-03-23  Mike Fleetwood <mike.fleetwood@googlemail.com>

    Avoid erasing the same range multiple times (!123)
    
    When the size of the partition being cleared is an exact multiple of
    MiBs, likely given that GParted aligns partitions to whole MiBs by
    default, then the same range will be zeroed 4 times in a row.  Example
    operation details from clearing a partition look like this:
    
        Format /dev/sdb1 as cleared
        + calibrate /dev/sdb1
            path: /dev/sdb1 (partition)
            start: 2048
            end: 2099199
            size: 2097152 (1.00 GiB)
        + clear old file system signatures in /dev/sdb1
            write 512.00 KiB of zeros at byte offset 0
            write 4.00 KiB of zeros at byte offset 67108864
            write 512.00 B of zeros at byte offset 1072161280
    >>      write 4.00 KiB of zeros at byte offset 1072693248
    >>      write 4.00 KiB of zeros at byte offset 1072693248
    >>      write 4.00 KiB of zeros at byte offset 1072693248
    >>      write 4.00 KiB of zeros at byte offset 1072693248
            write 512.00 KiB of zeros at byte offset 1073217536
        + set partition type on /dev/sdb1
    
    This is because the bcachefs backup super block is located at -1 MiB
    from the end of the device, rounded down by the bcachefs bucket size.
    The bucket size can be any of 128 KiB, 256 KiB, 512 KiB or 1 MiB,
    depending on the size of the bcachefs file system.  So when the
    partition size is an exact multiple of MiBs all 4 possible rounding
    sizes result in the same offset.
    
    Avoid writing the same range of zeros multiple times by skipping a range
    if it is identical to the previous range.
    
    Closes !123 - Add support for bcachefs, single device file systems only

2024-03-16  Mike Fleetwood <mike.fleetwood@googlemail.com>

    Erase Bcachefs backup super block (!123)
    
    GParted doesn't clear all bcachefs file system signatures.
        # truncate -s $((1*1024*1024*1024)) /tmp/disk.img
        # losetup --find --show /tmp/disk.img
        /dev/loop0
        # bcachefs format /tmp/disk.img
        # wipefs /dev/loop0
        DEVICE OFFSET     TYPE     UUID                                 LABEL
        loop0  0x1018     bcachefs 15304edb-6dc4-476c-989e-74eaea6660e8
        loop0  0x3ff00018 bcachefs 15304edb-6dc4-476c-989e-74eaea6660e8
    
    Use GParted to format to cleared /dev/loop0.
        # wipefs /dev/loop0
        DEVICE OFFSET     TYPE     UUID                                 LABEL
        loop0  0x3ff00018 bcachefs 15304edb-6dc4-476c-989e-74eaea6660e8
    
    The backup super block is located at -1 MiB before the end of the
    device, rounded down to the file system's bucket size [1], where the
    bucket size is one of: 128 KiB, 256 KiB, 512 KiB, 1024 KiB [2].
        location = device size - 1 MiB
                 = hex(1*1024*1024*1024 - 1*1024*1024)
                 = 0x3ff00000
    Bcachefs magic is at byte offset 24 (0x18) into the super block [3].
    
    The backup super block was not erased because GParted only writes zeros
    from -512 KiB to the end of the device.  It is necessary to clear old
    signatures before formatting with a new file system to avoid confusion
    from detection of multiple incompatible signatures [4][5].  Fix this by
    writing zeros over all possible locations of the bcachefs backup super
    block.
    
    [1] bcachefs-tools v1.6.4: c_src/libbcachefs.c:bch2_format()
        https://evilpiepirate.org/git/bcachefs-tools.git/tree/c_src/libbcachefs.c?h=v1.6.4#n313
        [This code locates the backup super block at device size - 1 MiB
        rounded down to the bucket size.]
        321     struct bch_sb_layout *l = &sb.sb->layout;
        322     u64 backup_sb = size_sectors - (1 << l->sb_max_size_bits);
        323
        324     backup_sb = rounddown(backup_sb, i->bucket_size >> 9);
    [2] bcachefs-tools v1.6.4: c_src/libbcachefs.c:bch2_pick_bucket_size()
        https://evilpiepirate.org/git/bcachefs-tools.git/tree/c_src/libbcachefs.c?h=v1.6.4#n85
         85      /* Want a bucket size of at least 128k, if possible: */
         86      bucket_size = max(bucket_size, 128ULL << 10);
        ...
         94      /* max bucket size 1 mb */
         95      bucket_size = min(bucket_size * scale, 1ULL << 20);
    [3] bcachefs-tools v1.6.4: libcachefs/bcachefs_format.h:struct bch_sb
        https://evilpiepirate.org/git/bcachefs-tools.git/tree/libbcachefs/bcachefs_format.h?h=v1.6.4#n907
    [4] 743968ef68085f6043e8fd569384c0747c8fc9e2
        Add clearing of SWRaid metadata 0.90 and 1.0 super blocks (#756829)
    [5] 3c75f3f5b103bc158b0f70ea63459aa362b0bab8
        Use wipefs to clear old signatures before creating new file systems (#688882)
    
    Closes !123 - Add support for bcachefs, single device file systems only

2024-03-09  Mike Fleetwood <mike.fleetwood@googlemail.com>

    Add bcachefs label and UUID reading (!123)
    
    Add reading of the bcachefs file system label, not the per device label,
    and the external UUID.  These match what blkid reports.
    
    Example without a label:
        # bcachefs format /dev/sdb1
        # bcachefs show-super /dev/sdb1 | egrep -i 'Label:|UUID:|Device:'
        External UUID:                              3316bc9a-d129-42b6-a80e-9649874bca73
        Internal UUID:                              656eebe5-10a9-4f12-94c8-aab2fdc54732
        Label:
        Device:                                     0
          Label:                                    (none)
          UUID:                                     cd436a8d-82eb-4993-a317-b39ea0d6bd2e
        # blkid /dev/sdb1
        /dev/sdb1: UUID="3316bc9a-d129-42b6-a80e-9649874bca73" BLOCK_SIZE="512" UUID_SUB="cd436a8d-82eb-4993-a317-b39ea0d6bd2e" TYPE="bcachefs" PARTUUID="7962e584-34c9-4088-8a00-a651af517089"
    
    Example with a label:
        # bcachefs format --force -L 'test label' /dev/sdb1
        # bcachefs show-super /dev/sdb1 | egrep -i 'Label:|UUID:|Device:'
        External UUID:                              3d7bdabe-2616-4545-affc-1aba0f8fb4a7
        Internal UUID:                              9cc95d3e-7991-4f78-9dd0-850cb9749e34
        Label:                                      test label
        Device:                                     0
          Label:                                    (none)
          UUID:                                     784d1bd0-5769-4fbb-ad32-07894d381bba
        # blkid /dev/sdb1
        /dev/sdb1: UUID="3d7bdabe-2616-4545-affc-1aba0f8fb4a7" LABEL="test label" BLOCK_SIZE="512" UUID_SUB="784d1bd0-5769-4fbb-ad32-07894d381bba" TYPE="bcachefs" PARTUUID="7962e584-34c9-4088-8a00-a651af517089"
    
    Closes !123 - Add support for bcachefs, single device file systems only

2024-03-21  Mike Fleetwood <mike.fleetwood@googlemail.com>

    Increase minimum bcachefs size to 32 MiB (!123)
    
    For bcachefs file systems 19 MiB and smaller, the available space is
    reported as a very large value.  The calculation went negative in a
    64-bit signed value but then was interpreted as an unsiged value.
    Writing any significant amount of data to the file system hangs.
        # truncate -s $((19*1024*1024)) /tmp/test.img
        # losetup --find --show /tmp/test.img
        /dev/loop0
        # bcachefs format /dev/loop0
        # mkdir /mnt/0
        # mount /dev/loop0 /mnt/0
        # strace -e statfs df -k /mnt/0
        statfs("/mnt/0", {f_type=0xca451a4e, f_bsize=4096, f_blocks=2305843009213693856,
            f_bfree=2305843009213693600, f_bavail=35474507834056483, f_files=18446744073709529090,
            f_ffree=18446744073709529088, f_fsid={val=[0xddb6645d, 0x8560584]}, f_namelen=512,
            f_frsize=4096, f_flags=ST_VALID|ST_RELATIME}) = 0
        Filesystem               1K-blocks  Used          Available Use% Mounted on
        /dev/loop0     9223372036854775424  1024 141898031336225932   1% /mnt/0
    
    For a 20 MiB bcachefs the available space is 0 so the file system
    overhead is 100%.
        # umount /mnt/0
        # truncate -s $((20*1024*1024)) /tmp/disk.img
        # losetup --set-capacity /dev/loop0
        # bcachefs format --force /dev/loop0
        # mount /dev/loop0 /mnt/0
        # strace -e statfs df -k /mnt/0
        statfs("/mnt/0", {f_type=0xca451a4e, f_bsize=512, f_blocks=1280, f_bfree=0, f_bavail=0,
            f_files=2, f_ffree=0, f_fsid={val=[0x6b3e4926, 0x33f99a32]}, f_namelen=512, f_frsize=512,
            f_flags=ST_VALID|ST_RELATIME}) = 0
        Filesystem     1K-blocks  Used Available Use% Mounted on
        /dev/loop0           640   640         0 100% /mnt/0
    
    For a 32 MiB bcachefs the file system overhead is a more reasonable 9%
    so use this as the minimum bcachefs file system size.
        ...
        # truncate -s $((32*1024*1024)) /tmp/disk.img
        ...
        # strace -e statfs df -k /mnt/0
        statfs("/mnt/0", {f_type=0xca451a4e, f_bsize=512, f_blocks=24832, f_bfree=22784,
            f_bavail=22433, f_files=182274, f_ffree=182272, f_fsid={val=[0xfdddedd3, 0xe90be3cb]},
            f_namelen=512, f_frsize=512, f_flags=ST_VALID|ST_RELATIME}) = 0
        Filesystem     1K-blocks  Used Available Use% Mounted on
        /dev/loop0         12416  1024     11217   9% /mnt/0
    
    Closes !123 - Add support for bcachefs, single device file systems only

2024-03-20  Mike Fleetwood <mike.fleetwood@googlemail.com>

    Add reading of bcachefs usage when mounted (!123)
    
    Currently bcachefs-tools only provides a method to report the file
    system usage while it is mounted.  We won't make GParted mount a
    bcachefs to read it's usage as we want to keep GParted's scanning as a
    read-only activity.  Therefore GParted can't report the usage of an
    unmounted bcachefs.
    
        # bcachefs format /dev/sdb1
        # bcachefs fs usage /dev/sdb1
        error opening /dev/sdb1: not a bcachefs filesystem
        # echo $?
        1
        # bcachefs fs usage --help
        bcachefs fs usage - display detailed filesystem usage
        Usage: bcachefs fs usage [OPTION]... <mountpoint>
        ...
        # mount /dev/sdb1 /mnt/1
        # bcachefs fs usage /mnt/1
        Filesystem: a61a8302-9a79-4c24-a9e6-486e7fcc78f5
        Size:                      987842560
        Used:                       12713984
        Online reserved:                   0
    
        Data type       Required/total  Durability    Devices
        btree:          1/1             1             [sdb1]               1048576
    
        (no label) (device 0):          sdb1              rw
                                        data         buckets    fragmented
          free:                   1061027840            8095
          sb:                        3149824              25        126976
          journal:                   8388608              64
          btree:                     1048576               8
          user:                            0               0
          cached:                          0               0
          parity:                          0               0
          stripe:                          0               0
          need_gc_gens:                    0               0
          need_discard:                    0               0
          capacity:               1073741824            8192
        # echo $?
        0
    
    Closes !123 - Add support for bcachefs, single device file systems only

2024-02-28  Mike Fleetwood <mike.fleetwood@googlemail.com>

    Add bcachefs creation (!123)
    
    Set the minimum file system size to 16 MiB as creating a bcachefs that
    size succeeds:
        $ truncate -s $((16*1024*1024)) /tmp/disk.img
        $ bcachefs format /tmp/disk.img
        ...
        initializing new filesystem
        going read-write
        initializing freespace
        $ echo $?
        0
    
    Where as creating a smaller file system fails for most sizes below that:
        $ rm /tmp/disk.img
        $ truncate -s $((15*1024*1024)) /tmp/disk.img
        $ bcachefs format /tmp/disk.img
        ...
        mounting version 1.6: btree_subvolume_children
        initializing new filesystem
        going read-write
        bch2_trans_mark_dev_sb(): error ENOSPC_disk_reservation
        bch2_fs_initialize(): error marking superblocks ENOSPC_disk_reservation
        bch2_fs_initialize(): error ENOSPC_disk_reservation
        bch2_fs_start(): error starting filesystem ENOSPC_disk_reservation
        error opening /tmp/disk.img: ENOSPC_disk_reservation
        $ echo $?
        1
    
