From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= Subject: fallocate vs ENOSPC Date: Fri, 25 Nov 2011 10:26:09 +0000 Message-ID: <4ECF6D41.2040801@draigBrady.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE To: linux-fsdevel@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:40743 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753602Ab1KYK0M (ORCPT ); Fri, 25 Nov 2011 05:26:12 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pAPAQBAW005744 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 25 Nov 2011 05:26:11 -0500 Received: from [10.36.116.18] (ovpn-116-18.ams2.redhat.com [10.36.116.18]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id pAPAQ9ul012169 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 25 Nov 2011 05:26:11 -0500 Sender: linux-fsdevel-owner@vger.kernel.org List-ID: I was wondering about adding fallocate() to cp, where one of the benefits would be immediate indication of ENOSPC. I'm now wondering though might fallocate() fail to allocate an extent with ENOSPC, but there could be fragmented space available to wr= ite()? If the above was true, then perhaps we could assume that any file system returning ENOSPC from fallocate(), might provide accurate fstatvfs().f_b{free,avail} values for a subsequent check, though needing to do that seems hacky. cheers, P=C3=A1draig. -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html