From patchwork Tue Aug 9 18:03:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felix Janda X-Patchwork-Id: 9271985 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A951B6082E for ; Tue, 9 Aug 2016 18:04:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A08E927E71 for ; Tue, 9 Aug 2016 18:04:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9554928384; Tue, 9 Aug 2016 18:04:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from oss.sgi.com (oss.sgi.com [192.48.182.195]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 62ECB27E71 for ; Tue, 9 Aug 2016 18:04:18 +0000 (UTC) Received: from oss.sgi.com (localhost [IPv6:::1]) by oss.sgi.com (Postfix) with ESMTP id 506DE7CA3; Tue, 9 Aug 2016 13:04:17 -0500 (CDT) X-Original-To: xfs@oss.sgi.com Delivered-To: xfs@oss.sgi.com Received: from relay.sgi.com (relay1.corp.sgi.com [137.38.102.111]) by oss.sgi.com (Postfix) with ESMTP id D49C57CA2 for ; Tue, 9 Aug 2016 13:04:15 -0500 (CDT) Received: from cuda.sgi.com (cuda1.sgi.com [192.48.157.11]) by relay1.corp.sgi.com (Postfix) with ESMTP id 95B958F8037 for ; Tue, 9 Aug 2016 11:04:12 -0700 (PDT) X-ASG-Debug-ID: 1470765848-0bf8157e6a60b4e0001-NocioJ Received: from mout02.posteo.de (mout02.posteo.de [185.67.36.66]) by cuda.sgi.com with ESMTP id DZ3dXJg3SUebqygI (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Tue, 09 Aug 2016 11:04:10 -0700 (PDT) X-Barracuda-Envelope-From: felix.janda@posteo.de X-Barracuda-Effective-Source-IP: mout02.posteo.de[185.67.36.66] X-Barracuda-Apparent-Source-IP: 185.67.36.66 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id A452620B3B for ; Tue, 9 Aug 2016 20:04:08 +0200 (CEST) Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 3s82Gc12ysz104j; Tue, 9 Aug 2016 20:04:08 +0200 (CEST) Date: Tue, 9 Aug 2016 20:03:20 +0200 From: Felix Janda To: Christoph Hellwig Subject: Re: [PATCHv2 xfsprogs 13/14] xfs.h: require transparent LFS Message-ID: <20160809180320.GB4476@nyan> X-ASG-Orig-Subj: Re: [PATCHv2 xfsprogs 13/14] xfs.h: require transparent LFS References: <3be2b10b0037406374a415fda2318cbf95a67546.1470555003.git.felix.janda@posteo.de> <20160809074138.GO25647@infradead.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20160809074138.GO25647@infradead.org> User-Agent: Mutt/1.6.1 (2016-04-27) X-Barracuda-Connect: mout02.posteo.de[185.67.36.66] X-Barracuda-Start-Time: 1470765849 X-Barracuda-Encrypted: ECDHE-RSA-AES256-GCM-SHA384 X-Barracuda-URL: https://192.48.157.11:443/cgi-mod/mark.cgi X-Barracuda-Scan-Msg-Size: 984 X-Virus-Scanned: by bsmtpd at sgi.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.7 tests=BSF_SC0_MISMATCH_TO X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.31875 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 BSF_SC0_MISMATCH_TO Envelope rcpt doesn't match header Cc: xfs@oss.sgi.com X-BeenThere: xfs@oss.sgi.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: xfs-bounces@oss.sgi.com Sender: xfs-bounces@oss.sgi.com X-Virus-Scanned: ClamAV using ClamSMTP Since our interfaces depend on the consistent use of a 64bit offset type, force downstreams to use transparent LFS (_FILE_OFFSET_BITS=64), so that it becomes impossible for them to use 32bit interfaces. Signed-off-by: Felix Janda Reviewed-by: Christoph Hellwig --- Christoph Hellwig wrote: > > +extern int xfs_assert_largefile[sizeof(off_t)-8]; > > Please add a comment on why we have this declaration, otherwise this > looks fine to me: > > Reviewed-by: Christoph Hellwig A simple comment is added. --- include/xfs.h | 5 ++ 1 file changed, 5 insertions(+) diff --git a/include/xfs.h b/include/xfs.h index 7bed957..37c95fe 100644 --- a/include/xfs.h +++ b/include/xfs.h @@ -47,6 +47,11 @@ # error unknown platform... have fun porting! #endif +/* + * make sure that any user of the xfs headers has a 64bit off_t type + */ +extern int xfs_assert_largefile[sizeof(off_t)-8]; + /* * sparse kernel source annotations */