Skip to content

Commit

Permalink
fix image fs filesystem issues
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Hannon <kehannon@redhat.com>
  • Loading branch information
kannon92 committed Sep 7, 2023
1 parent fc49338 commit 9f11b11
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions server/image_fs_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,15 @@ func getStorageFsInfo(store storage.Store) (*types.ImageFsInfoResponse, error) {
UsedBytes: &types.UInt64Value{Value: containerBytesUsed},
InodesUsed: &types.UInt64Value{Value: containerINodesUsed},
}
if imagePath == "" {
resp := &types.ImageFsInfoResponse{
ImageFilesystems: []*types.FilesystemUsage{&graphroot},
ContainerFilesystems: []*types.FilesystemUsage{&graphroot},
}
return resp, nil
}
resp := &types.ImageFsInfoResponse{
ImageFilesystems: []*types.FilesystemUsage{&graphroot},
ContainerFilesystems: []*types.FilesystemUsage{&graphroot},
}

if imagePath != "" {
Expand All @@ -45,7 +52,7 @@ func getStorageFsInfo(store storage.Store) (*types.ImageFsInfoResponse, error) {
UsedBytes: &types.UInt64Value{Value: imageBytesUsed},
InodesUsed: &types.UInt64Value{Value: imageINodesUsed},
}
resp.ContainerFilesystems = []*types.FilesystemUsage{imagestoreInfo}
resp.ImageFilesystems = []*types.FilesystemUsage{imagestoreInfo}
}
return resp, nil
}
Expand Down

0 comments on commit 9f11b11

Please sign in to comment.