From e90f6694afcd66938ca020a3ac0e8a0e8b8d3137 Mon Sep 17 00:00:00 2001 From: tomaszduda23 Date: Sun, 6 Oct 2024 13:01:11 +0200 Subject: [PATCH 1/2] Update fs.go Signed-off-by: tomaszduda23 --- fs/fs.go | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/fs.go b/fs/fs.go index 73f7100f93..e5aaa2cc0a 100644 --- a/fs/fs.go +++ b/fs/fs.go @@ -180,6 +180,7 @@ func processMounts(mounts []*mount.Info, excludedMountpointPrefixes []string) ma "tmpfs": true, "xfs": true, "zfs": true, + "f2fs": true, } for _, mnt := range mounts { From d836c6519da1b95b573a1895addb71e428c109b2 Mon Sep 17 00:00:00 2001 From: Tomasz Duda Date: Sat, 30 Nov 2024 13:41:16 +0100 Subject: [PATCH 2/2] add tests for f2fs Signed-off-by: Tomasz Duda --- fs/fs.go | 2 +- fs/fs_test.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/fs.go b/fs/fs.go index e5aaa2cc0a..783be6cc0b 100644 --- a/fs/fs.go +++ b/fs/fs.go @@ -180,7 +180,7 @@ func processMounts(mounts []*mount.Info, excludedMountpointPrefixes []string) ma "tmpfs": true, "xfs": true, "zfs": true, - "f2fs": true, + "f2fs": true, } for _, mnt := range mounts { diff --git a/fs/fs_test.go b/fs/fs_test.go index 24e878c0a9..2bf86f1c34 100644 --- a/fs/fs_test.go +++ b/fs/fs_test.go @@ -678,6 +678,7 @@ func TestProcessMounts(t *testing.T) { {Root: "/", Mountpoint: "/g", Source: "127.0.0.1:/nfs", FSType: "nfs4", Major: 253, Minor: 6}, {Root: "/", Mountpoint: "/test1", Source: "tmpfs", FSType: "tmpfs", Major: 253, Minor: 4}, {Root: "/", Mountpoint: "/test2", Source: "tmpfs", FSType: "tmpfs", Major: 253, Minor: 4}, + {Root: "/", Mountpoint: "/h", Source: "/dev/sdh", FSType: "f2fs", Major: 253, Minor: 7}, }, expected: map[string]partition{ "/dev/sda": {fsType: "ext3", mountpoint: "/a", major: 253, minor: 0}, @@ -689,6 +690,7 @@ func TestProcessMounts(t *testing.T) { "127.0.0.1:/nfs": {fsType: "nfs4", mountpoint: "/g", major: 253, minor: 6}, "/test1": {fsType: "tmpfs", mountpoint: "/test1", major: 253, minor: 4}, "/test2": {fsType: "tmpfs", mountpoint: "/test2", major: 253, minor: 4}, + "/dev/sdh": {fsType: "f2fs", mountpoint: "/h", major: 253, minor: 7}, }, }, }