From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id E6AA63858413 for ; Mon, 20 Mar 2023 15:18:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E6AA63858413 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1679325512; 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=HFVTNBNpjXT4tWQ/nWFbTybeS3lX8YcAreczbbMYcEs=; b=KLxRxngRA840kRgL9VBl0PNHVvdAXv0PrEBY++8rVkRHouKdW7jcuXwhPSs5c6Js8ZDZfL 0ZfmatPJqaaYqSSNiXbANCXghUmSd1A5B9HMYNjLFuKIM+fsLjpLPeQpSSTTRNUoVjtzZH p5aSHirQdqYlKy88blFQe6MZjKv0zg8= Received: from mail-lf1-f70.google.com (mail-lf1-f70.google.com [209.85.167.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-210-k96N4PYZMNa-Nmoz3T0U-g-1; Mon, 20 Mar 2023 11:18:29 -0400 X-MC-Unique: k96N4PYZMNa-Nmoz3T0U-g-1 Received: by mail-lf1-f70.google.com with SMTP id e9-20020a196909000000b004cca10c5ae6so4563481lfc.9 for ; Mon, 20 Mar 2023 08:18:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679325508; h=cc: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=HFVTNBNpjXT4tWQ/nWFbTybeS3lX8YcAreczbbMYcEs=; b=AvuciZMZ5PJao1rmUE9NLp6pzMghvvTrGycrFaiahHwdI1UuidE9k+PCpjnV8Jgi4t 9uxGwdCmWKYcEcPrysBNh47mO016egP1eDmiFkKTgGY9HN3RAXhpiw2x/1lMnv9FZxVV NK+JbONoHl9gMTK4yMiV/YGDh9Rq/h7yMgboYzeXPppoYPxPcfeAIOzLrs/RL5qcdE8g yL0Ja2BzJz+PlprQQXhElPw3AZ9W2Kc/2q84JCA1H8aZs+skkjuudMDm3dAERPnxfn4Q iGXYCWkJkX1B1Hhk68z5fhWW1/lO8IT6Gzuxc4TkZI04T3gshM3FNA2b8WJjiN9yGWel K5Vg== X-Gm-Message-State: AO0yUKU5Pp51Y/D9oU8EAWkboOLiM2+teUErT89Dl3TWzFH9YBtQS1EM r8bEgcR4G3fVuazQjDMlIRCLg/CcydHXM4KmFqfw5cuJQLAbzC3ky4BsOuP7bFmZeEzwIN4bgfH IyKoXICrce/hFWm3BIrGTpCAiH7IP0fko+w== X-Received: by 2002:ac2:55ac:0:b0:4d5:ca32:6ed8 with SMTP id y12-20020ac255ac000000b004d5ca326ed8mr73699lfg.6.1679325507882; Mon, 20 Mar 2023 08:18:27 -0700 (PDT) X-Google-Smtp-Source: AK7set8MkJ45IOC3qF7mAKYjhmjLrWC4XzjzM2d2EEMpaiU9Vle+qNkyIz5Rt0SlHTB7BgRGzrI2znq9jnyUxgUESkU= X-Received: by 2002:ac2:55ac:0:b0:4d5:ca32:6ed8 with SMTP id y12-20020ac255ac000000b004d5ca326ed8mr73692lfg.6.1679325507535; Mon, 20 Mar 2023 08:18:27 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jonathan Wakely Date: Mon, 20 Mar 2023 15:18:16 +0000 Message-ID: Subject: Re: [PATCH v2 1/2] libstdc++: use copy_file_range, improve sendfile in filesystem::copy_file To: =?UTF-8?Q?Jannik_Gl=C3=BCckert?= Cc: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/alternative; boundary="00000000000056d7fe05f7567035" X-Spam-Status: No, score=-6.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,KAM_SHORT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --00000000000056d7fe05f7567035 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 20 Mar 2023 at 15:16, Jonathan Wakely wrote: > > > On Wed, 15 Mar 2023 at 19:30, Jannik Gl=C3=BCckert via Libstdc++ < > libstdc++@gcc.gnu.org> wrote: > >> This iteration improves error handling for copy_file_range, >> particularly around undocumented error codes in earlier kernel >> versions. >> Additionally this fixes the userspace copy fallback to handle >> zero-length files such as in >> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D108178. >> >> Lastly, the case "src gets resized during the copy loop" is now >> considered and will return true once the loop hits EOF (this is the >> only situation, aside from a zero-length src, where sendfile and >> copy_file_range return 0). >> > > I've applied this patch (with some whitespace fixes) and started testing > it. I'm seeing some regressions: > > FAIL: experimental/filesystem/operations/copy.cc execution test > FAIL: experimental/filesystem/operations/copy_file.cc execution test > > The failures in the log look like: > > terminate called after throwing an instance of > 'std::experimental::filesystem::v1::__cxx11::filesystem_error' > what(): filesystem error: cannot copy: Input/output error > [filesystem-test.copy.2900321341.ySWT77] > [filesystem-test.copy.2900321342.vjeAar] > FAIL: experimental/filesystem/operations/copy.cc execution test > Not just the Filesystem TS versions of those tests, but the std::filesystem ones too: FAIL: 27_io/filesystem/operations/copy.cc execution test FAIL: 27_io/filesystem/operations/copy_file.cc execution test --00000000000056d7fe05f7567035--