Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp276236rdb; Thu, 30 Nov 2023 04:45:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IHMhPx0v19MtnUIbG7l/fQoa9AqHyM5y0ZT9d/3QQ4nuVmyB+CVVkdoSJTzLaDkUvhvvFZC X-Received: by 2002:a05:6808:23c9:b0:3b5:ae0d:b208 with SMTP id bq9-20020a05680823c900b003b5ae0db208mr30656321oib.6.1701348330422; Thu, 30 Nov 2023 04:45:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701348330; cv=none; d=google.com; s=arc-20160816; b=LKpQylPdrTMKigft4XXdJ/DMRT4wiP6qoSjLvSUXwTvzITRrtjMBVFnJd5g3vlUzVP /p1SGsOp0HY0kACzC+8IBUzOSKraGksVXQpThH2vFPhqHInOLAbt5MmhiWFLIPMWqw/P SAE8xpZIJo0mUSsPIjjyOcRSX7prJ0fjZH0H2kudo2CnuFquu+cZ1zMQK/b91peDGps8 rkIZHAgCKNp9y0k8NcOgRCzmZHcKcaxIU+57E7h6fR3bPnVLtlexxszH1moH6R2WiHts GZiEKo8nd2fZqwdplknMDMBo8/KbsQsYjxqZMeqnXtLAuNXbPrMKpR2dhM5jiTVMySF3 MvzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=FfOHqHrZHg6fuXwcB8+TtsQGiSGk/Jw3citxF2dQTww=; fh=23ASxIfWHwvNONqtG4tUoVnKT/8zEqUJNlhkjoO8ksI=; b=fLrOMH8AUzrUX5CSzXFSpAHiHVnyhEQ7vnCaj8Z6Jtb7+k57lOGGvsbOPwTDmLQJET UDWNGxyWknXVODRd1F+Jj9cBgrSPyZrRkNulGaRoNM1g+dBNFRuEdeWt2zu9o5UBLYvP n5+eFTEk9n413u/AbAxy1JxWFjErtd+ZMz+kozydNc7Rk4/dfUBYabWV4Ht2JqjvuoKw hw85eQVZW7ytMKscHy2k8rajsjEEybOHRnFU3XPv5ncwq3W91Tn2/mjymvz4J/rY4Jws J8WuDHNwS+SlIbCduBEpPOemV1FQeW5v8TR/MY+aI+uDE82nS8tFzVXRMDPoTlxpZH8M wXhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NB+UsUdg; spf=pass (google.com: domain of linux-nfs+bounces-200-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-200-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id cf5-20020a056a02084500b005bce8cfb592si1182018pgb.245.2023.11.30.04.45.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 04:45:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs+bounces-200-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NB+UsUdg; spf=pass (google.com: domain of linux-nfs+bounces-200-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-200-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 667F4B20CD9 for ; Thu, 30 Nov 2023 12:45:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CD85F4779B; Thu, 30 Nov 2023 12:45:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="NB+UsUdg" X-Original-To: linux-nfs@vger.kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16E53D50 for ; Thu, 30 Nov 2023 04:45:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701348322; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FfOHqHrZHg6fuXwcB8+TtsQGiSGk/Jw3citxF2dQTww=; b=NB+UsUdgdCpPRNsXTOOOaoU3GX6ObWToGhQafh3I79HEpSoDJkoNGWP0/wgmMWsybDcsYZ KMHx2rftF6zqCwCBjjWI1MxMfk2HLIND81qynA9X8naGErFGSn4BBym7nLCPzy85y/J2g2 hrlKtCPvDjIcIwXjUwWO9U71xHCZhNY= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-266-D1pLCYxFO6yV6x_dC3JFUg-1; Thu, 30 Nov 2023 07:45:21 -0500 X-MC-Unique: D1pLCYxFO6yV6x_dC3JFUg-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id F013C3C02769; Thu, 30 Nov 2023 12:45:20 +0000 (UTC) Received: from [192.168.37.1] (unknown [10.22.48.3]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 781D310E46; Thu, 30 Nov 2023 12:45:20 +0000 (UTC) From: Benjamin Coddington To: Cedric Blancher Cc: Linux NFS Mailing List Subject: Re: NFSv4.2: How to deallocate a range of bytes in a file, aka "punch a hole"? Date: Thu, 30 Nov 2023 07:45:19 -0500 Message-ID: <2F13FCCD-8450-43DA-8C2D-0554BAA32037@redhat.com> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 On 30 Nov 2023, at 5:18, Cedric Blancher wrote: > Good morning! > > Linux has fallocate(fd, FALLOC_FL_PUNCH_HOLE|FALLOC_FL_KEEP_SIZE, ...) > to punch a hole into a file, i.e. deallocate the blocks given and make > the file a "sparse file". > > But how is this implemented on NFSv4.2 COMPOUND level? How does a > NFSv4 compound look like to punch a hole say from position 30000 to > position 35721? Are you interested in the current linux client's implementation? You could look at a wire capture of the operation to find out. Its going to be something like PUTFH, DEALLOCATE, GETATTR.. Ben