diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2023-01-01 22:43:58 -0700 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2023-01-01 22:43:58 -0700 |
commit | d675f41242c043ddc4c6c1a1fb8aabcfd324aae2 (patch) | |
tree | 4f2afbce761eb377ad0b0ab2e4fb2f478ff844f5 /lib/btrfsprogs/btrfsutil/open.go | |
parent | 9971e38110d5f90d15c7b78f396f2638b3952a96 (diff) | |
parent | 6e1a9fbb1e9a943e04902ed3a4958f6821e39456 (diff) |
Merge branch 'lukeshu/lint'
Diffstat (limited to 'lib/btrfsprogs/btrfsutil/open.go')
-rw-r--r-- | lib/btrfsprogs/btrfsutil/open.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/btrfsprogs/btrfsutil/open.go b/lib/btrfsprogs/btrfsutil/open.go index 9491a20..c5ee314 100644 --- a/lib/btrfsprogs/btrfsutil/open.go +++ b/lib/btrfsprogs/btrfsutil/open.go @@ -1,4 +1,4 @@ -// Copyright (C) 2022 Luke Shumaker <lukeshu@lukeshu.com> +// Copyright (C) 2022-2023 Luke Shumaker <lukeshu@lukeshu.com> // // SPDX-License-Identifier: GPL-2.0-or-later @@ -14,6 +14,7 @@ import ( "git.lukeshu.com/btrfs-progs-ng/lib/btrfs" "git.lukeshu.com/btrfs-progs-ng/lib/btrfs/btrfsvol" "git.lukeshu.com/btrfs-progs-ng/lib/diskio" + "git.lukeshu.com/btrfs-progs-ng/lib/textui" ) func Open(ctx context.Context, flag int, filenames ...string) (*btrfs.FS, error) { @@ -30,8 +31,9 @@ func Open(ctx context.Context, flag int, filenames ...string) (*btrfs.FS, error) } bufFile := diskio.NewBufferedFile[btrfsvol.PhysicalAddr]( typedFile, - 16384, // block size: 16KiB - 1024, // number of blocks to buffer; total of 16MiB + //nolint:gomnd // False positive: gomnd.ignored-functions=[textui.Tunable] doesn't support type params. + textui.Tunable[btrfsvol.PhysicalAddr](16*1024), // block size: 16KiB + textui.Tunable(1024), // number of blocks to buffer; total of 16MiB ) devFile := &btrfs.Device{ File: bufFile, |