Skip to content
  • Eric Sandeen's avatar
    xfs: implement online get/set fs label · f7664b31
    Eric Sandeen authored
    
    
    The GET ioctl is trivial, just return the current label.
    
    The SET ioctl is more involved:
    It transactionally modifies the superblock to write a new filesystem
    label to the primary super.
    
    A new variant of xfs_sync_sb then writes the superblock buffer
    immediately to disk so that the change is visible from userspace.
    
    It then invalidates any page cache that userspace might have previously
    read on the block device so that i.e. blkid can see the change
    immediately, and updates all secondary superblocks as userspace relable
    does.
    
    Signed-off-by: default avatarEric Sandeen <sandeen@redhat.com>
    [darrick: use dchinner's new xfs_update_secondary_sbs function]
    Reviewed-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
    Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
    f7664b31