From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephane CHAZELAS Subject: ENOSPC on almost empty FS Date: Tue, 1 Nov 2011 08:36:12 +0000 (UTC) Message-ID: To: linux-btrfs@vger.kernel.org Return-path: List-ID: Hiya, trying to restore a FS from a backup (tgz) on a freshly made btrfs this morning, I got ENOSPCs after about 100MB out of 4GB have been extracted. strace indicates that the ENOSPC are upon the open(O_WRONLY). Restoring with: mkfs.btrfs /dev/mapper/VG_USB-root mount -o compress-force,ssd $_ /mnt cd /mnt pv ~/backup.tgz | gunzip | sudo bsdtar -xpSf - --numeric-owner That's on a LVM LV with the PV on a USB key. If I supspend the job and resume it, then the ENOSPCs go away. The only way I could restore the backup was via rate limiting the untar: zcat ~/backup.tgz | pv -L 3000000 | sudo bsdtar -xpSf - --numeric-owner That 3MB/s wasn't even enough, as 3 files triggered a ENOSPC, but I did untar them separately afterwards. That's with debian's 3.0.0-1 amd64 kernel. Is that expected behavior due to the way allocation works in btrfs? -- Stephane