add xfs support to devicemapper snapshotter
ext4 file system was supported before. This adds support for xfs as well. Containerd config file can have fs_type as an additional option with possible values as "xfs" and "ext4" for now. In future other fstype support can be added. A snapshot created from a committed snapshot inherits the file system type of the parent. Any new snapshots that has no parent is created with the file system type indicated in config. If there is no config for file system type is found, then ext4 is assumed. This allows users to use xfs as an optional file system type. Signed-off-by: Alakesh Haloi <alakeshh@amazon.com>
This commit is contained in:
@@ -141,8 +141,14 @@ func testUsage(t *testing.T, snapshotter snapshots.Snapshotter) {
|
||||
"%d > %d", layer2Usage.Size, sizeBytes)
|
||||
}
|
||||
|
||||
func TestMkfs(t *testing.T) {
|
||||
func TestMkfsExt4(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
err := mkfs(ctx, "")
|
||||
err := mkfs(ctx, "ext4", "")
|
||||
assert.ErrorContains(t, err, `mkfs.ext4 couldn't initialize ""`)
|
||||
}
|
||||
|
||||
func TestMkfsXfs(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
err := mkfs(ctx, "xfs", "")
|
||||
assert.ErrorContains(t, err, `mkfs.xfs couldn't initialize ""`)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user