From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Steve French" Subject: punching holes in files Date: Thu, 1 Nov 2007 14:16:25 -0500 Message-ID: <524f69650711011216s17cbc26ra337d70a0bde8d03@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "Amit K. Arora" , linux-fsdevel To: samba-technical@lists.samba.org, linux-cifs-client@lists.samba.org Return-path: Received: from rv-out-0910.google.com ([209.85.198.188]:56403 "EHLO rv-out-0910.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752980AbXKATQZ (ORCPT ); Thu, 1 Nov 2007 15:16:25 -0400 Received: by rv-out-0910.google.com with SMTP id k20so578487rvb for ; Thu, 01 Nov 2007 12:16:25 -0700 (PDT) Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org madvise_remove (in Linux) is used to free the backing store associated with pages (punching a hole in a file). This is one of the vfs operations that we do not send over the wire to Samba (so this call would return -ENOSYS locally). Any thoughts on whether this could be done with an obscure SetFileInfo level or FCNTL or whether it is worth adding to the CIFS POSIX Extensions? A second interesting question is whether to implement fallocate over the wire. sys_fallocate takes a range (and also a flag which indicates whether to extend the size beyond end of file). SET_FILE_ALLOCATION_INFO takes a size field rather than a range. For the case of the range starting at zero, we could simply call Trans2 set pathinfo (or file info) with SET_FILE_ALLOCATION_INFO. Should we add a CIFS POSIX Extension operation for this too? By the way it looks like OCFS2 (not just ext4) implement these. -- Thanks, Steve