-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/link: fallocate_test.go:46: unexpected disk usage: got 1 blocks, want 2048 #39905
Comments
Thanks for sending this bug report. It would be helpful to know how your ZFS storage pool is set up. Could you please share the output of "zfs get all" or "zfs get recordsize"? |
The number of blocks is reported by
So either Could you try the following C program? Thanks.
|
for @cherrymui It is ok when run on btrfs filesystem: st_size/512 = 1048576/512 = 2048, st_blocks = 2048 it returns 'fallocate failed: -1' on ZFS, if run by strace we got: munmap(0x7f4efacc0000, 179742) = 0 openat(AT_FDCWD, "./xxx.blk", O_RDWR|O_CREAT|O_TRUNC, 0666) = 3 fallocate(3, 0, 0, 1048576) = -1 EOPNOTSUPP (Operation not supported) fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0), ...}) = 0 brk(NULL) = 0x557cd95fc000 brk(0x557cd961d000) = 0x557cd961d000 write(1, "fallocate failed: -1\n", 21fallocate failed: -1 ) = 21 exit_group(1) = ? +++ exited with 1 +++ There is an issue address this: openzfs/zfs#326 $ zfs get all tank NAME PROPERTY VALUE SOURCE tank type filesystem - tank creation Fri Jul 26 21:52 2019 - tank used 1.40T - tank available 545G - tank referenced 96K - tank compressratio 1.23x - tank mounted no - tank quota none default tank reservation none default tank recordsize 128K default tank mountpoint legacy local tank sharenfs off default tank checksum on default tank compression lz4 local tank atime off local tank devices on default tank exec on default tank setuid on default tank readonly off default tank zoned off default tank snapdir hidden default tank aclinherit restricted default tank createtxg 1 - tank canmount on default tank xattr on default tank copies 1 default tank version 5 - tank utf8only off - tank normalization none - tank casesensitivity sensitive - tank vscan off default tank nbmand off default tank sharesmb off default tank refquota none default tank refreservation none default tank guid 12411557574271728392 - tank primarycache all default tank secondarycache all default tank usedbysnapshots 0B - tank usedbydataset 96K - tank usedbychildren 1.40T - tank usedbyrefreservation 0B - tank logbias latency default tank objsetid 54 - tank dedup on local tank mlslabel none default tank sync standard default tank dnodesize legacy default tank refcompressratio 1.00x - tank written 96K - tank logicalused 1.72T - tank logicalreferenced 42K - tank volmode default default tank filesystem_limit none default tank snapshot_limit none default tank filesystem_count none default tank snapshot_count none default tank snapdev hidden default tank acltype posixacl local tank context none default tank fscontext none default tank defcontext none default tank rootcontext none default tank relatime off default tank redundant_metadata all default tank overlay off default tank encryption off default tank keylocation none default tank keyformat none default tank pbkdf2iters 0 default tank special_small_blocks 0 default $ zfs get recordsize tank NAME PROPERTY VALUE SOURCE tank recordsize 128K default |
Thanks, @wheelcomplex . The test assumes |
Change https://golang.org/cl/240618 mentions this issue: |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
no reproduced in go-1.14.4
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
compile Go from source: cd src && ./all.bash
What did you expect to see?
ALL TESTS PASSED
What did you see instead?
What did you figured out:
fallocate_test.go is new from:
39ea0ea
@cherrymui @aclements
This issue may involve with ZFS on Linux (zfs, 0.8.3, Linux kernel 5.4.0-39-generic).
The test is passed if run in a directory on filesystem ext4 or btrfs (COW filesystem similar to ZFS) but it is failed on ZFS.
The text was updated successfully, but these errors were encountered: