Skip to content

Commit

Permalink
Relabeling the btrfs subvolumes is failing with ENOTSUP
Browse files Browse the repository at this point in the history
Just log these errors, but don't fail.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
  • Loading branch information
rhatdan committed Apr 1, 2022
1 parent 9327f72 commit 5c4dc4c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/btrfs/btrfs.go
Expand Up @@ -543,7 +543,12 @@ func (d *Driver) Create(id, parent string, opts *graphdriver.CreateOpts) error {
mountLabel = opts.MountLabel
}

return label.Relabel(path.Join(subvolumes, id), mountLabel, false)
err = label.Relabel(path.Join(subvolumes, id), mountLabel, false)
if err != nil && err != unix.ENOTSUP {
logrus.Debugf("Attempted to relabel %s failed: %v", path.Join(subvolumes, id), err)
return err
}
return nil
}

// Parse btrfs storage options
Expand Down

0 comments on commit 5c4dc4c

Please sign in to comment.