From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-x334.google.com (mail-ot1-x334.google.com [IPv6:2607:f8b0:4864:20::334]) by sourceware.org (Postfix) with ESMTPS id E11183858D20 for ; Tue, 29 Aug 2023 13:20:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E11183858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ot1-x334.google.com with SMTP id 46e09a7af769-6bd066b0fd4so2935290a34.2 for ; Tue, 29 Aug 2023 06:20:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693315251; x=1693920051; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=Oazi+NVln8HBrJ42IES5X5jdIsvLU+UpU1NRNJXGvD8=; b=WMymwMfLGtwMMwvH8QvCvyiyQCd4sIGW9fty4pOyP/iwGWuj82QGWf72J5IJPX0BX0 5ltd8UNKYWzKxHNULVTbpuX4LCQoVdcdlE8g9Fv1zlrnFKSK3Q5nm/W0ELR5qKCm39pb Qn3rciN0Cms4fTbB7hL5+WtQjX10vbfdwTeFjoM8qKEsxoP96nExlZsAkFyqaoFJgn2x BUVt9gcWsqwMsbrVVqRwrrjlii/jVaOYUkvuWQ/I8my0La3y7ZYeO9NER+3myx49Yl7J sSTtW/0ggodd6DDTMR3TTZFuM6GjCURh6pz+0mYHfKZOyPoLohNZLtuUaGBNrOudpeLZ d3Fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693315251; x=1693920051; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Oazi+NVln8HBrJ42IES5X5jdIsvLU+UpU1NRNJXGvD8=; b=L1ufrxsKeiyaYUKyAuNlEGISiWApBT8WRvNcf3o5rB0N6+9ScpUJ5+RHo9bvspFbrU LQlW796WlEMYVyhtsISHq1WvRERH492yS2ifaksJkbvaYtMBdmTAfg4K3RZbzhJDblKd J477vxaQzzMbws4BbD5tVZDxKR2ri2BsHjygkV/du96NnVCZUA0lr8n0r4NoSLQe7n3A 3GWVdDpIKtYlMITlUPXOYIDpzllzkGuXtOk0427H5cZNooDZtqruXDe6NLe3e08pEPeY gbch6rcuSTzlKZJpO6wxz5tKrx/U3o9Ko7S/9ydEwEwdl+bK7rv7OSzbZuQporX30SoT Pg9A== X-Gm-Message-State: AOJu0YyzmDdLpfDelK8LccjTGCpgwRBIL/s0GXJ2+7q4Ipxe6wQ78sdF Snx57rFbfxXUuJus5rAcl2XYkA== X-Google-Smtp-Source: AGHT+IEXdt27CPTdZTR9fjA4shRiGPw4tkYTWZaQGd6j7Pa+qqlOVYvYpdqSdZIkeZIZLlb9ef8o/w== X-Received: by 2002:a05:6830:120e:b0:6bc:be56:6b9b with SMTP id r14-20020a056830120e00b006bcbe566b9bmr15570374otp.2.1693315251163; Tue, 29 Aug 2023 06:20:51 -0700 (PDT) Received: from ?IPV6:2804:1b3:a7c3:578c:7535:3d41:c7e8:c5ab? ([2804:1b3:a7c3:578c:7535:3d41:c7e8:c5ab]) by smtp.gmail.com with ESMTPSA id t17-20020a9d7491000000b006bee5535b44sm4407627otk.75.2023.08.29.06.20.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 29 Aug 2023 06:20:50 -0700 (PDT) Message-ID: Date: Tue, 29 Aug 2023 10:20:47 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Subject: Re: [PATCH] io: Fix record locking contants for powerpc64 with __USE_FILE_OFFSET64 Content-Language: en-US To: Florian Weimer , Aurelien Jarno Cc: libc-alpha@sourceware.org References: <20230828213721.2957677-1-aurelien@aurel32.net> <87pm36nut5.fsf@oldenburg.str.redhat.com> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: <87pm36nut5.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_NUMSUBJECT,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 29/08/23 04:59, Florian Weimer via Libc-alpha wrote: > * Aurelien Jarno: > >> diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h b/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h >> index f7615a447e..d8a291a331 100644 >> --- a/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h >> +++ b/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h >> @@ -33,7 +33,7 @@ >> # define __O_LARGEFILE 0200000 >> #endif >> >> -#if __WORDSIZE == 64 >> +#if __WORDSIZE == 64 && !defined __USE_FILE_OFFSET64 >> # define F_GETLK 5 >> # define F_SETLK 6 >> # define F_SETLKW 7 > > I find this puzzling. Why would __USE_FILE_OFFSET64 have an effect if > __WORDSIZE is 64? This is a historical artifact from powerpc64. Instead of following other 64-bit architectures and define F_GETLK the same whether _FILE_OFFSET_BITS is defined, the port used powerpc definitiosn that required different values to support LFS. This patch is not wrong, but at same time not really required. The powercp64 fcntl will handle F_GETLK/F_SETLK/F_SETLKW with the historical values with the FCNTL_ADJUST_CMD macro, so old binaries will continue to work as expected.