From 75d17267d7e597f187b17e113e412e5dea6b91e6 Mon Sep 17 00:00:00 2001 From: royalcat Date: Fri, 29 Mar 2024 09:53:52 +0300 Subject: [PATCH] fix docker --- .github/workflows/docker.yaml | 4 ++-- src/host/datastorage/storage.go | 4 ++-- src/host/vfs/torrent.go | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 94c2cc8..19e98be 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -19,10 +19,10 @@ jobs: - linux/amd64 - linux/arm64 - linux/386 - - linux/arm/v5 + # - linux/arm/v5 - linux/arm/v7 - linux/arm64/v8 - - linux/riscv64 + # - linux/riscv64 runs-on: ubuntu-latest steps: - name: Checkout repository diff --git a/src/host/datastorage/storage.go b/src/host/datastorage/storage.go index 3587beb..1145f86 100644 --- a/src/host/datastorage/storage.go +++ b/src/host/datastorage/storage.go @@ -341,11 +341,11 @@ func (s *DataStorage) dedupeFiles(ctx context.Context, paths []string) (deduped return deduped, err } - if fsStat.Bsize > srcSize { // for btrfs it means file in residing in not deduplicatable metadata + if int64(fsStat.Bsize) > srcSize { // for btrfs it means file in residing in not deduplicatable metadata return deduped, nil } - blockSize := uint64((srcSize % fsStat.Bsize) * fsStat.Bsize) + blockSize := uint64((srcSize % int64(fsStat.Bsize)) * int64(fsStat.Bsize)) span.SetAttributes(attribute.Int64("blocksize", int64(blockSize))) diff --git a/src/host/vfs/torrent.go b/src/host/vfs/torrent.go index 6512a12..70e70f2 100644 --- a/src/host/vfs/torrent.go +++ b/src/host/vfs/torrent.go @@ -231,6 +231,7 @@ func (fs *TorrentFs) rawStat(ctx context.Context, filename string) (fs.FileInfo, if err != nil { return nil, err } + file, err := getFile(files, filename) if err != nil { return nil, err