[Kernel-packages] [Bug 1791323] Re: XFS fallocate implementation incorrectly reports ENOSPC
** 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.imgisize=512agcount=4, agsize=61035 blks = sectsz=512 attr=2, projid32bit=1 = crc=1finobt=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: USERPID 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 : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp
[Kernel-packages] [Bug 1791323] Re: XFS fallocate implementation incorrectly reports ENOSPC
Confirmed in the latest RC kernel: charles@ubuntuvm:~/temp$ fallocate -l 1GB image.img charles@ubuntuvm:~/temp$ sudo modprobe loop [sudo] password for charles: charles@ubuntuvm:~/temp$ mkfs.xfs image.img meta-data=image.img isize=512agcount=4, agsize=61035 blks = sectsz=512 attr=2, projid32bit=1 = crc=1finobt=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 charles@ubuntuvm:~/temp$ mkdir mnt charles@ubuntuvm:~/temp$ mount -o loop ./image.img mnt mount: only root can use "--options" option charles@ubuntuvm:~/temp$ sudo mount -o loop ./image.img mnt charles@ubuntuvm:~/temp$ cd mnt/ charles@ubuntuvm:~/temp/mnt$ sudo fallocate -o 0 -l 700mb image.img charles@ubuntuvm:~/temp/mnt$ sudo fallocate -o 0 -l 700mb image.img fallocate: fallocate failed: No space left on device charles@ubuntuvm:~/temp/mnt$ uname -a Linux ubuntuvm 4.19.0-041900rc3-generic #201809120832 SMP Wed Sep 12 12:35:08 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux charles@ubuntuvm:~/temp/mnt$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:Ubuntu 18.04.1 LTS Release:18.04 Codename: bionic ** Changed in: linux (Ubuntu) Status: Incomplete => Confirmed ** Tags added: kernel-bug-exists-upstream -- 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.imgisize=512agcount=4, agsize=61035 blks = sectsz=512 attr=2, projid32bit=1 = crc=1finobt=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: USERPID 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: ATN123456789
[Kernel-packages] [Bug 1791323] Re: XFS fallocate implementation incorrectly reports ENOSPC
Hi Joseph, Give me a moment to try testing the upstream kernel; I haven't done that before. This issue was first reported by a customer sometime back, we worked around it by changing the way we called fallocate. I believe I confirmed it back in 16.04, but I haven't tested beyond that. Charles -- 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: Incomplete 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.imgisize=512agcount=4, agsize=61035 blks = sectsz=512 attr=2, projid32bit=1 = crc=1finobt=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: USERPID 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 : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp
[Kernel-packages] [Bug 1791323] Re: XFS fallocate implementation incorrectly reports ENOSPC
Did this issue start happening after an update/upgrade? Was there a kernel version where you were not having this particular problem? This will help determine if the problem you are seeing is the result of a regression, and when this regression was introduced. If this is a regression, we can perform a kernel bisect to identify the commit that introduced the problem. ** Changed in: linux (Ubuntu) Status: Confirmed => Incomplete -- 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: Incomplete 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.imgisize=512agcount=4, agsize=61035 blks = sectsz=512 attr=2, projid32bit=1 = crc=1finobt=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: USERPID 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 : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp
[Kernel-packages] [Bug 1791323] Re: XFS fallocate implementation incorrectly reports ENOSPC
Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v4.19 kernel[0]. If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'. If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'. Once testing of the upstream kernel is complete, please mark this bug as "Confirmed". Thanks in advance. [0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.19-rc3 ** Changed in: linux (Ubuntu) Importance: Undecided => Medium -- 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: Incomplete 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.imgisize=512agcount=4, agsize=61035 blks = sectsz=512 attr=2, projid32bit=1 = crc=1finobt=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: USERPID 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 : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp
[Kernel-packages] [Bug 1791323] Re: XFS fallocate implementation incorrectly reports ENOSPC
apport information ** Tags added: apport-collected bionic ** Description changed: 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.imgisize=512agcount=4, agsize=61035 blks = sectsz=512 attr=2, projid32bit=1 = crc=1finobt=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: + USERPID 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. ** Attachment added: "AlsaInfo.txt" https://bugs.launchpad.net/bugs/1791323/+attachment/5186071/+files/AlsaInfo.txt -- 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.imgisize=512agcount=4, agsize=61035 blks = sectsz=512 attr=2, projid32bit=1 = crc=1finobt=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 =