From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EC58AC43461 for ; Wed, 9 Sep 2020 01:49:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A9BCD21D40 for ; Wed, 9 Sep 2020 01:49:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="QY2aZKZX" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728347AbgIIBtj (ORCPT ); Tue, 8 Sep 2020 21:49:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726002AbgIIBth (ORCPT ); Tue, 8 Sep 2020 21:49:37 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C593C061573; Tue, 8 Sep 2020 18:49:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=mXUgxcP9Ws9NeMj/Q9aKesnrRpqGRQa7a1QsUO3vl1Y=; b=QY2aZKZX6xr9Gq5gIFFDB+fOLr SOAHvTxZORPvV0km99Pd5V7OwOKVARZuc7X+vN+tttdYcytcsuySAmTzS8mGbRH02s5n+9q1nROdK S0Z4aWugH2uFL1YwnO/oJENx2i8FUsYI2s0tKSiPZx4azzSu+mL2vx7q27fTN2sqvSD1GPdaZuUsj FLByEDxh4568qRNTn/EKH5HOjgHLFXhA/tBSWU/pGGeO4bqkhibRDqJOEsS/SBJmHcMnvroOd7XD0 QQt5l29OwvCGKp8AJo/QrnnlDInEnKrfCgPhVYKbyqi55F0aE+G5S/b1B3Xp7NrZpXmMR5Ys7KHWP vZITeRGg==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kFpEr-00082Z-OS; Wed, 09 Sep 2020 01:49:33 +0000 Date: Wed, 9 Sep 2020 02:49:33 +0100 From: Matthew Wilcox To: "Darrick J. Wong" Cc: Jan Kara , linux-fsdevel , xfs , hch@lst.de Subject: Re: [PATCH v3] quota: widen timestamps for the fs_disk_quota structure Message-ID: <20200909014933.GC6583@casper.infradead.org> References: <20200909013251.GG7955@magnolia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200909013251.GG7955@magnolia> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Tue, Sep 08, 2020 at 06:32:51PM -0700, Darrick J. Wong wrote: > +static inline void copy_to_xfs_dqblk_ts(const struct fs_disk_quota *d, > + __s32 *timer_lo, __s8 *timer_hi, s64 timer) > +{ > + *timer_lo = timer; > + if (d->d_fieldmask & FS_DQ_BIGTIME) > + *timer_hi = timer >> 32; > + else > + *timer_hi = 0; > +} I'm still confused by this. What breaks if you just do: *timer_lo = timer; *timer_hi = timer >> 32; > memset(dst, 0, sizeof(*dst)); > + if (want_bigtime(src->d_ino_timer) || want_bigtime(src->d_spc_timer) || > + want_bigtime(src->d_rt_spc_timer)) > + dst->d_fieldmask |= FS_DQ_BIGTIME; You still need this (I guess? In case somebody's written to the d_padding2 field?)