From owner-freebsd-hackers@freebsd.org Tue May 24 06:57:27 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D692B48CA5 for ; Tue, 24 May 2016 06:57:27 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from vps.rulingia.com (vps.rulingia.com [103.243.244.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "rulingia.com", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CD5141F4D for ; Tue, 24 May 2016 06:57:26 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from server.rulingia.com (ppp59-167-167-3.static.internode.on.net [59.167.167.3]) by vps.rulingia.com (8.15.2/8.15.2) with ESMTPS id u4O6vCSK025229 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 24 May 2016 16:57:17 +1000 (AEST) (envelope-from peter@rulingia.com) X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.15.2/8.15.2) with ESMTPS id u4O6v6wj082431 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Tue, 24 May 2016 16:57:07 +1000 (AEST) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.15.2/8.15.2/Submit) id u4O6v6QZ082430 for freebsd-hackers@freebsd.org; Tue, 24 May 2016 16:57:06 +1000 (AEST) (envelope-from peter) Date: Tue, 24 May 2016 16:57:06 +1000 From: Peter Jeremy To: freebsd-hackers@freebsd.org Subject: Re: read(2) and thus bsdiff is limited to 2^31 bytes Message-ID: <20160524065706.GG6157@server.rulingia.com> References: <20160522225414.GB24398@britannica.bec.de> <154dab43060.11208cdfd132112.2616144627831899155@nextbsd.org> <20160522231203.GB25503@britannica.bec.de> <154db353935.dd5e87c1133922.4370692881788049491@nextbsd.org> <20160523122131.GC8747@britannica.bec.de> <20160523134106.GB17056@britannica.bec.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Qz2CZ664xQdCRdPu" Content-Disposition: inline In-Reply-To: <20160523134106.GB17056@britannica.bec.de> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp User-Agent: Mutt/1.6.1 (2016-04-27) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 May 2016 06:57:27 -0000 --Qz2CZ664xQdCRdPu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2016-May-23 15:41:06 +0200, Joerg Sonnenberger wrote: >On Mon, May 23, 2016 at 02:31:18PM +0200, Cedric Blancher wrote: >> Nothing in POSIX mandates that read()/write() are atomic. Old UNIX, >> SystemV, AIX, Solaris and HP-UX don't do that nor do they guarantee >> that. > >"I/O is intended to be atomic to ordinary files and pipes and FIFOs." To expand that a little, the rationale (which is "informative") in http://pubs.opengroup.org/onlinepubs/009695399/functions/read.html states: "I/O is intended to be atomic to ordinary files and pipes and FIFOs. Atomic means that all the bytes from a single operation that started out together end up together, without interleaving from other I/O operations." This is slightly different. OTOH, the description does indicate that short reads from files can only occur due to EOF or interrupt (or exceeding {SSIZE_MAX}). --=20 Peter Jeremy --Qz2CZ664xQdCRdPu Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJXQ/tCXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRFRUIyOTg2QzMwNjcxRTc0RTY1QzIyN0Ux NkE1OTdBMEU0QTIwQjM0AAoJEBall6Dkogs0H1oP/jpFY7CXehbh4tjKFQ12Xypb t0htMZ2YJ9eiXSi1lOs3bSyaUayHnk/ttcT+MttlEzwY7CCa5JoXlCYxHaiYQ89M bGcVw/hFxov81Dz/aMpTA2ec1dzDkL0BaZGLAnDsu5Yg+U0s5vw5NF8aFPa75Zbv yc0bHmRZTnSOLJ7JXshFFR6mm84/WxSfpfUjdWmGdATO46yGvs5N1niikcaubaw4 wmThpl3Kf83YnBCfT+jJljQy/XWofjAPXcf14v3KRbGBtGxf3RuU/7YFKttcPedE fz44iWqX/FLbupXL0qR0sT52krHjZU4nV2Q0EIEfPAKG34saMBq36ejdnGncG/Pd MoL8CqC7NlPRdL5AVoCBBF7i6VMs3hdpKRg3bpHFr+EBNC6hLj0oQV2CfCrj4dkU XEz4IgUQmYi3UYsvJvG+VPgD/pHHTi2udw4joladw2qTQtlbO1v+w5CKUokqCoMb 723mnatJPkLq6gRHZd5psMQozouv14T7zbOTJq7ROEM2nf5I6906Roc1Biy+gdmk ifXLa/EUffOGn98jRWWmQs8i43d5f7HmCdeQ76KI5z5vd3G9MAubU2lLBJ9i7gqW O0ruNr4u5i4NzpgQ+oA63/qKVku02QreIGfA0N1sqT93rRN9v5MJTXQ1/zE4KF+G p7xDM5FwJ6O0ZwyLmg9a =D5EW -----END PGP SIGNATURE----- --Qz2CZ664xQdCRdPu--