Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp642440rdh; Thu, 23 Nov 2023 14:14:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IGXOD9T+XIfzj3Jv0C3sdZ95ohcPQZc0TTW7rAqMnVdmzeC+0qhKpKdTSdb+I7zYgsjpoNJ X-Received: by 2002:a17:902:6941:b0:1c9:b207:d412 with SMTP id k1-20020a170902694100b001c9b207d412mr721826plt.37.1700777675771; Thu, 23 Nov 2023 14:14:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700777675; cv=none; d=google.com; s=arc-20160816; b=0DhcBOXvAoqxOzu11ZpQnmPz4d+e8wChjVJjMfKgUmRZyAezVbjov2+H3K6BaQQyVz RYGgio49gRbz2CtTBdXn+iKPL4PHeenKNutm4G/1ESx2w6HOZEC1dXKMfXr9uyN3/PNF BaVkPFbKcDOnMqVdcj4u0HaC9RPKaWqx8FysXoFIKzgj5C4T0J7ljhePBqJjafBzkAr5 6ctJ1CmhTBMvd5JuJS+OyaqqjutSw/k3ZNCsEOR0awAtC5MyobExBFaVux93SDgWDNYY bnEsRxQmQuSR6WUqzz0wYX4mIk6k9+TjRW1D8d383LxE8IZZo9lgMD1Zi9lbYW+QLdtx 1RaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=t5vSTfYWkE/phKODgcMUMbJYSZMT8h+eiNWLJmZM51g=; fh=A3pMOUK00huGibGCZBFsLekFLVbB5hHGKjUNNKwO+5E=; b=TOuHBqk/h7uc4jaUjxqu6z25PJeAnsD3DUNWzucgeTPpFuadC97uJDPa76+97bqjyU RBlFPbvZSvmUNckzwyPkvZ8UdvyKZAe2njels6/SGZB2KlFMP9NiwsmiNdqPf27bXf5P CtZBihzg4vpTA4BnM5BH7ypOqw51r59jl9kiKNDUBtF126T6sdmpV3L8IK2csbGD3Fo2 5KMNHCYmu+cCSjd5SkoP52Jh/ILgSUZ83hLw1VuQ0NpuJS1ppI1WQj17pAX3WcgQD/PM OYUTmNV+G6XU+AJx5lPsvBKtrtmJHhjpuW28V5EKvkbHRHE8xXi7QRg52i51fFHqMaNj yR1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=PWqYnAI2; spf=pass (google.com: domain of linux-nfs+bounces-40-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-nfs+bounces-40-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id k17-20020a170902c41100b001cb02e6f174si2002828plk.492.2023.11.23.14.14.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 14:14:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs+bounces-40-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=PWqYnAI2; spf=pass (google.com: domain of linux-nfs+bounces-40-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-nfs+bounces-40-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 A3DEDB20DF0 for ; Thu, 23 Nov 2023 22:14:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2BCA81401C; Thu, 23 Nov 2023 22:14:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="PWqYnAI2" X-Original-To: linux-nfs@vger.kernel.org Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3246310F8 for ; Thu, 23 Nov 2023 14:14:21 -0800 (PST) Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-547e7de7b6fso2544925a12.0 for ; Thu, 23 Nov 2023 14:14:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700777659; x=1701382459; darn=vger.kernel.org; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=t5vSTfYWkE/phKODgcMUMbJYSZMT8h+eiNWLJmZM51g=; b=PWqYnAI2AjA3dXy+//sh0YpMLMafr1mh40EZokyr586lUts5UpmTkP5InHGpT9nPiM HikzXXGYKimrrAts5GkuxbdmGWUQioigebPrpWYwRb5rgTL9mv6d70x6sUS9GV59F6Jt sT6WfWrwAv3HSo4bycPgRloaOLe9Y7OYKlGWyyn7xNYA8RYbAkY+MDDfhLgmSgtZORFg AEg4lZrEdI4RlSkLW4vuvvcJyKYGByUjYWODcFO57wZ7knD+3R5j+2W0NFZh1N1jenTc XZWmL9G0jd0e+IjcbvkMGnGtDDJRgmjNWT8BSK4V32SN0Up/yNNujLJUft8gbuwKdcH1 JDlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700777659; x=1701382459; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=t5vSTfYWkE/phKODgcMUMbJYSZMT8h+eiNWLJmZM51g=; b=Eq2o0w3hq7rNK67zH7SbUTPiJJQbVhcfwDtseygE4ZXHaeHmwoMZhqbokHeZOID1Pe Ncfhvvr7Ew/jgn2vvfsAXrmvBbdVVHWmjj2eWG8ZHJkRRaT/OFbIA0bNwwxtSZk77XxZ JqQRfnS3cIRh9aQKnOWMVewHX/CE9GwOkTDSeGBwQfz0k41yvCHM7vaEjWWsbl0U6fIE Wmo6VGOFr6RCrqAp/abC9v4zRgSQ5293y9aJl3ioPL6gc2VuqdN3ebs+M9BpCOvj0NB0 f1NgUzH8k2sqaonkYZ36X1kPeXtU/n73/FSvYDbCmGq6aSY/FvFKXPyHXJPjh3ChIg/6 dFkA== X-Gm-Message-State: AOJu0YwR+Ddncz7PDwpeHiT/Nk13QJAxJtsBTSQxgvo2qLqaDhVO5Jun KQWPqntqGkVWECaXDzuYse4RIUTmPgs2xh8VYcFU6nhhpiw= X-Received: by 2002:aa7:d795:0:b0:548:aca1:b15f with SMTP id s21-20020aa7d795000000b00548aca1b15fmr3581811edq.17.1700777659168; Thu, 23 Nov 2023 14:14:19 -0800 (PST) Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: In-Reply-To: From: Cedric Blancher Date: Thu, 23 Nov 2023 23:13:42 +0100 Message-ID: Subject: Re: How does READ_PLUS differ from READ? To: Linux NFS Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 23 Nov 2023 at 00:19, Rick Macklem wrote: > > On Wed, Nov 22, 2023 at 2:48=E2=80=AFPM Cedric Blancher > wrote: > > > > On Sun, 19 Nov 2023 at 19:02, Anna Schumaker = wrote: > > > > > > On Sun, Nov 19, 2023 at 12:59=E2=80=AFPM Cedric Blancher > > > wrote: > > > > > > > > On Sun, 19 Nov 2023 at 18:48, Anna Schumaker wrote: > > > > > > > > > > Hi, > > > > > > > > > > On Sun, Nov 19, 2023 at 12:38=E2=80=AFPM Cedric Blancher > > > > > wrote: > > > > > > > > > > > > Good evening! > > > > > > > > > > > > How does READ_PLUS differ from READ? Has anyone made a simpler > > > > > > presentation (PowerPoint slides) than the RFCs? > > > > > > > > > > No slides, but at a high level READ_PLUS can compress out long ra= nges > > > > > of zeroes in a read reply by returning a HOLE segment instead of = the > > > > > actual zeroes. It's perfectly valid for the server to skip the ze= ro > > > > > detection and return everything as a data segment, however. > > > > > > > > So how do you differ between > > > > 1. a hole, aka no filesystem blocks allocated > > > > 2. a long sequence of valid data with all zero bytes in them > > > > > > That's up to the server! It could use something like fiemap or lseek > > > with SEEK_HOLE or SEEK_DATA. It could also scan the data to see if > > > there are any zeroes that could be compressed out. > > > > How can the client figure out whether the data in a READ_PLUS reply > > are zeros of data, or zeros from a hole? > As I understand the RFC, it cannot. Or put another way "a hole is a > region that reads as all 0s, which may or may not have allocated blocks > on the server file system". > > Although SEEK_HOLE typically returns the offset of an unallocated > region, I don't think either the POSIX draft (was it ever ratified?) nor > RFC7862 actually define a "hole" as an unallocated region. Opengroup ratified that one. See https://austingroupbugs.net/view.php?id=3D= 415 > > On a similar vein, Deallocate can simply write 0s to the region. > (It does not actually have to "deallocate data blocks".) > > At least that is my understanding of POSIX and RFC7862, rick Can anyone please confirm that RFC7862 and READPLUS cannot distinguish between allocated and unallocated regions in a file? Ced --=20 Cedric Blancher [https://plus.google.com/u/0/+CedricBlancher/] Institute Pasteur