From nobody Thu Apr 04 22:16:29 2024 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V9bZ01Ymqz5G8Gq for ; Thu, 4 Apr 2024 22:16:40 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: from sdaoden.eu (sdaoden.eu [217.144.132.164]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4V9bYz2Qgyz4RD6; Thu, 4 Apr 2024 22:16:39 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=sdaoden.eu header.s=citron header.b=MkYJLjoJ; dkim=none ("invalid DKIM record") header.d=sdaoden.eu header.s=orange header.b=bgswyEAz; dmarc=none; spf=none (mx1.freebsd.org: domain of steffen@sdaoden.eu has no SPF policy when checking 217.144.132.164) smtp.mailfrom=steffen@sdaoden.eu DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sdaoden.eu; s=citron; t=1712268991; x=1712935657; h=date:author:from:to:cc:subject: message-id:in-reply-to:references:openpgp:blahblahblah:mime-version: content-type:content-transfer-encoding:author:from:subject:date:to:cc: resent-date:resent-from:resent-to:resent-cc:in-reply-to:references: mime-version:content-type:content-transfer-encoding:message-id: mail-followup-to:openpgp:blahblahblah; bh=FAaTl4ALiZW84dbQBsXm2AAuMmpJZMBCUNS/0vk3ktA=; b=MkYJLjoJbYtfl+e+VPLV0wpGdT7OJHjp2VbhKH5zXz6Wqcms1jlZ3m11NWD8Cww9cqqbkp6x QZPoq5VJqb/Ujdgh/tZNNuqiySl2FqeL6Q8y558+HKH9ZqfADKrV+UyRfgYzKaYWcLNG+V2OiH qO+O4fkjFuXGGTopwAS5swzbc4H1qCZsS/RrmDqzqMer2UNUzL86EUvprgcHHfbJmJjBcpcqVk qpJZlGd2IaT8tk6rC8a39ublgv/u6QY1h73Gv3bLvy33ocG/I530ed2XvFYIy/DllO+n+MOaiR zCen8CPg868MyXfZk3/zAOvPMYjJygNiKippmTs0/fzIhJzQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=sdaoden.eu; s=orange; t=1712268991; x=1712935657; h=date:author:from:to:cc:subject: message-id:in-reply-to:references:openpgp:blahblahblah:mime-version: content-type:content-transfer-encoding:author:from:subject:date:to:cc: resent-date:resent-from:resent-to:resent-cc:in-reply-to:references: mime-version:content-type:content-transfer-encoding:message-id: mail-followup-to:openpgp:blahblahblah; bh=FAaTl4ALiZW84dbQBsXm2AAuMmpJZMBCUNS/0vk3ktA=; b=bgswyEAzVbAcwrsjoZc959CSeufPTyn8nEF9aA5ITdcDcau2+wFP4XzElC5bbP4pXowgKogv Y27KK7HoAUjmBg== Date: Fri, 05 Apr 2024 00:16:29 +0200 Author: Steffen Nurpmeso From: Steffen Nurpmeso To: Rick Macklem Cc: Alan Somers , FreeBSD Hackers Subject: Re: SEEK_HOLE at EOF Message-ID: <20240404221629.pFpzUB3t@steffen%sdaoden.eu> In-Reply-To: References: User-Agent: s-nail v14.9.24-612-g7e3bfac540 OpenPGP: id=EE19E1C1F2F7054F8D3954D8308964B51883A0DD; url=https://ftp.sdaoden.eu/steffen.asc; preference=signencrypt BlahBlahBlah: Any stupid boy can crush a beetle. But all the professors in the world can make no bugs. List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.20 / 15.00]; AUTH_NA_OR_FAIL(1.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.90)[-0.902]; R_DKIM_ALLOW(-0.20)[sdaoden.eu:s=citron]; MIME_GOOD(-0.10)[text/plain]; R_DKIM_PERMFAIL(0.00)[sdaoden.eu:s=orange]; ASN(0.00)[asn:15987, ipnet:217.144.128.0/20, country:DE]; R_SPF_NA(0.00)[no SPF record]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[sdaoden.eu]; ARC_NA(0.00)[]; TAGGED_RCPT(0.00)[]; RCVD_COUNT_ZERO(0.00)[0]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; DKIM_MIXED(0.00)[]; TO_DN_ALL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; DKIM_TRACE(0.00)[sdaoden.eu:+,sdaoden.eu:~] X-Rspamd-Queue-Id: 4V9bYz2Qgyz4RD6 Rick Macklem wrote in : |On Thu, Apr 4, 2024 at 1:59=E2=80=AFPM Alan Somers = wrote: |> |> On Thu, Apr 4, 2024 at 2:56=E2=80=AFPM Rick Macklem \ |> wrote: |>> |>> On Thu, Apr 4, 2024 at 11:15=E2=80=AFAM Alan Somers wrote: ... |>> Here's what it says about SEEK_HOLE and offset: |>> If whence is SEEK_HOLE, the file offset shall be set to the smallest |>> location of a byte within a hole and not less than offset, except that |>> if offset falls within the last hole, then the file offset may be set |>> to the file size instead. It shall be an error if offset is greater |>> or equal to the size of the file. |>> |>> I'd suggest we follow this, since it is the closest to a standard \ |>> that there is. |> |> That sounds like behavior 2: return ENXIO at EOF. For reference, do |> you have a link to that somewhere? |0000415: add SEEK_HOLE, SEEK_DATA to lseek - Austin Group Defect |Tracker (austingroupbugs.net) |If this doesn't give you a link (gmail never shows the raw url for me) |just google |"SEEK_HOLE austin group". just a few lines further below 46396 [ENXIO] The whence argument is SEEK_HO= LE or SEEK_DATA, and offset is greater 46397 than or equal to the file size= ; or the whence argument is SEEK_DATA and the 46398 offset falls beyond the last b= yte not within a hole. ... --End of --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt)