From patchwork Mon Nov 8 20:32:05 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 309312 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oA8Kh1Hi025921 for ; Mon, 8 Nov 2010 20:43:02 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755439Ab0KHUl6 (ORCPT ); Mon, 8 Nov 2010 15:41:58 -0500 Received: from mx1.redhat.com ([209.132.183.28]:31309 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754700Ab0KHUki (ORCPT ); Mon, 8 Nov 2010 15:40:38 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oA8KeXgE026025 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 8 Nov 2010 15:40:33 -0500 Received: from localhost.localdomain (test1244.test.redhat.com [10.10.10.244]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id oA8KeOee017684; Mon, 8 Nov 2010 15:40:27 -0500 From: Josef Bacik To: linux-kernel@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, xfs@oss.sgi.com, joel.becker@oracle.com, cmm@us.ibm.com, cluster-devel@redhat.com Subject: [PATCH 4/6] Ext4: fail if we try to use hole punch Date: Mon, 8 Nov 2010 15:32:05 -0500 Message-Id: <1289248327-16308-4-git-send-email-josef@redhat.com> In-Reply-To: <1289248327-16308-1-git-send-email-josef@redhat.com> References: <1289248327-16308-1-git-send-email-josef@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Mon, 08 Nov 2010 20:43:02 +0000 (UTC) diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 0554c48..9bff6bd 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -3622,6 +3622,10 @@ long ext4_fallocate(struct inode *inode, int mode, loff_t offset, loff_t len) struct ext4_map_blocks map; unsigned int credits, blkbits = inode->i_blkbits; + /* We only support the FALLOC_FL_KEEP_SIZE mode */ + if (mode && (mode & FALLOC_FL_KEEP_SIZE)) + return -EOPNOTSUPP; + /* * currently supporting (pre)allocate mode for extent-based * files _only_