** Tags added: cscc
--
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1791323
Title:
XFS fallocate implementation incorrectly reports ENOSPC
Status in linux package in Ubuntu:
Confirmed
Bug description:
When given an offset of 0 and a length, fallocate (man 2 fallocate)
reports ENOSPC if the size of the file + the length to be allocated is
greater than the available space.
Example below using the fallocate command (man 1 fallocate) for
simplicity; the issue is with the logic backing the system call.
chathaway@bender:~/temp$ fallocate -l 1GB example.img
chathaway@bender:~/temp$ mkfs.xfs example.img
meta-data=example.img isize=512 agcount=4, agsize=61035 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=1, sparse=0, rmapbt=0,
reflink=0
data = bsize=4096 blocks=244140, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=1
log =internal log bsize=4096 blocks=855, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
chathaway@bender:~/temp$ sudo modprobe loop
chathaway@bender:~/temp$ mkdir mnt
chathaway@bender:~/temp$ sudo mount -o loop ./example.img ./mnt/
chathaway@bender:~/temp$ cd mnt
chathaway@bender:~/temp/mnt$ sudo fallocate -l 768MB -o 0 hello.txt
chathaway@bender:~/temp/mnt$ sudo fallocate -l 768MB -o 0 hello.txt
fallocate: fallocate failed: No space left on device
chathaway@bender:~/temp/mnt$ df -h .
Filesystem Size Used Avail Use% Mounted on
/dev/loop0 951M 766M 185M 81% /home/chathaway/temp/mnt
Expected behaviour: because we allocate 768MB starting at offset 0,
and have 951MB on the disk, we would expect that the allocation should
be fine. Other filesystem behave this way (for example, ext4).
Thanks!
---
ProblemType: Bug
ApportVersion: 2.20.9-0ubuntu7.2
Architecture: amd64
AudioDevicesInUse:
USER PID ACCESS COMMAND
/dev/snd/controlC0: chathaway 2608 F.... pulseaudio
/dev/snd/controlC1: chathaway 2608 F.... pulseaudio
CurrentDesktop: pop:GNOME
DistroRelease: Pop!_OS 18.04
MachineType: ASUSTeK COMPUTER INC. UX303LN
Package: linux (not installed)
ProcFB: 0 inteldrmfb
ProcKernelCmdLine:
initrd=\EFI\Pop_OS-c80adbe3-92ed-45ea-a314-7e7c694d0161\initrd.img
root=UUID=c80adbe3-92ed-45ea-a314-7e7c694d0161 ro quiet loglevel=0
systemd.show_status=false splash
ProcVersionSignature: Ubuntu 4.15.0-33.36-generic 4.15.18
RelatedPackageVersions:
linux-restricted-modules-4.15.0-33-generic N/A
linux-backports-modules-4.15.0-33-generic N/A
linux-firmware 1.173.1
Tags: bionic
Uname: Linux 4.15.0-33-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm docker sudo wireshark
_MarkForUpload: True
dmi.bios.date: 09/01/2014
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: UX303LN.204
dmi.board.asset.tag: ATN12345678901234567
dmi.board.name: UX303LN
dmi.board.vendor: ASUSTeK COMPUTER INC.
dmi.board.version: 1.0
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: ASUSTeK COMPUTER INC.
dmi.chassis.version: 1.0
dmi.modalias:
dmi:bvnAmericanMegatrendsInc.:bvrUX303LN.204:bd09/01/2014:svnASUSTeKCOMPUTERINC.:pnUX303LN:pvr1.0:rvnASUSTeKCOMPUTERINC.:rnUX303LN:rvr1.0:cvnASUSTeKCOMPUTERINC.:ct10:cvr1.0:
dmi.product.family: UX
dmi.product.name: UX303LN
dmi.product.version: 1.0
dmi.sys.vendor: ASUSTeK COMPUTER INC.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1791323/+subscriptions
--
Mailing list: https://launchpad.net/~kernel-packages
Post to : [email protected]
Unsubscribe : https://launchpad.net/~kernel-packages
More help : https://help.launchpad.net/ListHelp