From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by sourceware.org (Postfix) with ESMTPS id D6D9F384640D for ; Thu, 11 Mar 2021 15:08:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D6D9F384640D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: sourceware.org; spf=none smtp.mailfrom=hch@lst.de Received: by verein.lst.de (Postfix, from userid 2407) id D0AD368B05; Thu, 11 Mar 2021 16:08:17 +0100 (CET) Date: Thu, 11 Mar 2021 16:08:17 +0100 From: Christoph Hellwig To: Adhemerval Zanella Cc: libc-alpha@sourceware.org, Florian Weimer Subject: Re: [RFC] io: Return UNSUPPORTED if filesystem do not support 64 bit timestamps Message-ID: <20210311150817.GA22422@lst.de> References: <20210311123557.3486677-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210311123557.3486677-1-adhemerval.zanella@linaro.org> User-Agent: Mutt/1.5.17 (2007-11-01) X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, SPF_HELO_NONE, SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Mar 2021 15:08:22 -0000 On Thu, Mar 11, 2021 at 09:35:57AM -0300, Adhemerval Zanella via Libc-alpha wrote: > +bool > +support_path_support_time64 (const char *path) > +{ > +#ifdef __linux__ > + struct statfs64 fs; > + if (statfs64 (path, &fs) < 0) > + FAIL_EXIT1 ("statfs64 (\"%s\"): %m", path); > + /* Kernel silent truncate metadata timestamps on some version. */ > + return ! (fs.f_type == XFS_SUPER_MAGIC); Please check for the actual truncation, as XFS does not always do this based on the exact on-disk format revision.