Announcement

Collapse
No announcement yet.

EXT4 Finally Picking Up Support For The Common Get/Set Label Ioctls

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • EXT4 Finally Picking Up Support For The Common Get/Set Label Ioctls

    Phoronix: EXT4 Finally Picking Up Support For The Common Get/Set Label Ioctls

    It looks like EXT4 with Linux 5.17 will finally be supporting the FS_IOC_GETFSLABEL and FS_IOC_SETFSLABEL ioctls that several other prominent file-systems have been supporting the past few years...

    https://www.phoronix.com/scan.php?pa...-ioctl-fslabel

  • #2
    I suppose if someone put in the effort to make it work, there must be a non-zero number of reasons to want to do that.

    Comment


    • #3
      Yeah, I was wondering the same. What's the use case of these ioctls?

      Comment


      • #4
        Originally posted by shopt View Post
        Yeah, I was wondering the same. What's the use case of these ioctls?
        It allows changing filesystems labels. If say the distro installers sets the btrfs filesystem label to be something generic and you want to change it to something else more meaningful to you, it is convenient to be able to run "btrfs filesystem label" on the mounted volume without taking it offline first.

        Comment


        • #5
          This is the happiest day of my life.

          I have an old drive with an ext4 fs that I named with a typo years ago and it annoys me to no end every time I see it.

          I used to be an atheist but now I believe in a greater power.

          Comment


          • #6
            Originally posted by emblemparade View Post
            I have an old drive with an ext4 fs that I named with a typo years ago and it annoys me to no end every time I see it.
            You could change it with
            Code:
            sudo tune2fs -L new_label /dev/sdx1
            (obviously replacing new_label and /dev/sdx1 with whatever's appropriate for your drive).

            This new feature is to allow the label to be changed in a generic way (and with the FS mounted) so you don't need to use a specific program for each different filesystem - it could be done using a generic command like "fslabel" or something - or from a GUI app - without that needing to be a wrapper around a bunch of different utilities.

            Comment


            • #7
              Is this "fslabel" thing for user's to name the partition and it shows up in software such as Nautilus and GTK open/save dialogs?
              Is this for name a partition to like "Backup", "Music", "Movies", "Porn", etc?

              Comment


              • #8
                I remember in Windows 7 I was always changing the C: drive and D: drivers or other drives names just by doubleclicking on the name and renaming it from Local Disk to System, Data, Movies, etc. ever since I discovered I could do that.
                I thought it's a really neat trick for usability and you can do it in Windows because it uses letters for partitions and labels are just an addition and all the software that required some paths still work as the letters remained the same.
                It would be cool if Linux had such a system where you could change labels without affecting the paths, but anyway it's good that you can at least add some labels from the beginning.

                Comment


                • #9
                  Originally posted by Danny3 View Post
                  It would be cool if Linux had such a system where you could change labels without affecting the paths, but anyway it's good that you can at least add some labels from the beginning.
                  You can. Anything in fstab will have a path not dependent on the label displayed in places like file manager "Devices" sidebars. It's only with the automounted removable media where the path is derived from the volume label and, in those cases, it's akin to how the Windows drive letter will vary depending on how many removable devices you have plugged in and what order you plug them in.

                  Comment


                  • #10
                    Originally posted by molletts View Post
                    You could change it with
                    Code:
                    sudo tune2fs -L new_label /dev/sdx1
                    (obviously replacing new_label and /dev/sdx1 with whatever's appropriate for your drive).
                    I know, but I want to do it live!!! Unmounting is for losers.

                    Comment

                    Working...
                    X