From patchwork Fri Dec 13 20:52:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 181587 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp1143991ile; Fri, 13 Dec 2019 12:53:52 -0800 (PST) X-Google-Smtp-Source: APXvYqwtUjcay5iJbD0QXoHJQ9A8rOfb4pPUHRsh1o1ugUnVJ/e4PZ/hBAY8cxa1NhivKX2USbNl X-Received: by 2002:aca:2419:: with SMTP id n25mr7983817oic.13.1576270431906; Fri, 13 Dec 2019 12:53:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576270431; cv=none; d=google.com; s=arc-20160816; b=RVv2PWCSrduPZK7t/ayzfocsqTZ8uPcQXo9i6/VV41bYloyUmF4IksvF5gpGyUCTaE ZK846UgYVriwLS3RV3bpP92QdXCrWPgrd+lzx23cZRi+csXVk6MXUQjFiixz1AKftA/1 UjHKpxsC0eMB9xMeEvexitaFf8e1tMYBVym+24x4oYhHD5z+QjFmf9nWQc/bNlIRitFb I6Lm6T1D9MwOG6nQ7Ph4iEDdKPj4aptuLglRFHqZfgPLLONUG7aG9n8S04gMjOO/bvyG QlCziZsM8j0wZ7BIVg+LB09QJXWTB4BpSIWwY8pc4OFmdLO/ppCXRZxmpPoYp+ktyX4T 65xQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=kQiL/FY7jvLf7F7pMftdMkJVYyPxSrzwTcCiIL+ErRE=; b=O46q9WaYRWlO/XCNCZqH4ed8y3p6ylT89CVasCBQfn4GwERV12tbjjjOd6fZFIm+Ca HjLlV4FCRn1dHg5r9WCX/F15FwReO1DRnFIQ/Fk07gOhKHGUkcYKV0c5anezBRYqUfEZ AF0FBoSI4XKWU281Pkk42eQJnwpq3nyHOW1pc35O5aHQNH3URn6Y695Gh8QauN/h5pZz dWTPExip6g9r55qOV2YAzcdQLFddJ+y5/5EFecD/+fyN9Aj4GcDODyi7Nxl4T0uNH02m RJDITkp5/Gt6GvNUT6n50N9sfivw9ohjFMDk7Q75ls0oBrdrEIYWDpkzJw+otaSr7LPf bzcA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q124si5349494oig.228.2019.12.13.12.53.51; Fri, 13 Dec 2019 12:53:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726861AbfLMUxu (ORCPT + 27 others); Fri, 13 Dec 2019 15:53:50 -0500 Received: from mout.kundenserver.de ([212.227.126.135]:43623 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726368AbfLMUxu (ORCPT ); Fri, 13 Dec 2019 15:53:50 -0500 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.129]) with ESMTPA (Nemesis) id 1MtPzy-1hrbs61fsU-00uu3R; Fri, 13 Dec 2019 21:53:44 +0100 From: Arnd Bergmann To: y2038@lists.linaro.org, linux-kernel@vger.kernel.org, Jan Kara Cc: Arnd Bergmann Subject: [PATCH v2 09/24] quota: avoid time_t in v1_disk_dqblk definition Date: Fri, 13 Dec 2019 21:52:14 +0100 Message-Id: <20191213205221.3787308-6-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20191213204936.3643476-1-arnd@arndb.de> References: <20191213204936.3643476-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:JA7cpk/zrzgly8p4eMkgobmlMJH0BMfBiwOJE0Fs7DHb5ktCnCi 4ESYtf31/8tN6P0cPzC0yFn0laxJc/QFQXw5yqhqeqf3hw+o2aPYCSrC4uyq80+26JiYCSk f9UCvx2M1LKkwJ0iBS7og9top0ULb6NFXd4WfS6ObMnEuC8Cqstc2AzAtAYJEyVJG72cw0a nk/+WMbJdV84YlXKRlXTQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:DY+jB6jkCoE=:LPR123PfwdTfbPBsMalpyh XsMoebsMEG+HS54UZhHzOguZ4kpUBUtJVW/uhMldV9SSQXHLyMyAwrFB23cEB62cU+g0PgZU1 yapEPpJfZbWtRzGP4uoB2dz6fdQf/hKB4Sp26WQ7pURg3j8VmUBMZfzbQ7FbImq2iwjMttdnx J0HUvbCf209VXVwRQdc1gtlTh7PA4GEfwPBXtKL84dvdxMHibA+hHIlTXk5NLKhI/ilPV6+rk KxPxW3UNxXKiimGzrnJluGgckq4j066VjdBFz4kxhA8AHcfi+ohvELwI/dH+tpHNID3/8TyGM vQQMlOOdzYsP0vXX2+P2CsysMO/wbFozYDN9M5MDmw6801gisn7euKl4g/tphNdTnHn4DO9El ac2+E/4WlNnt0N0t6kyF9Xh3T0aACkbzuMk3+mRReT/x2lAWs+3qeIuY1me0NH1V05wvX5377 ax2JoShYAdF2XbMMGdswrfoGcvXqSImhNds79AEjAALgvIGtRZwThwFdoCb1hNVvM1CKxmeO5 moZrMHZoYAEfcus7YSYUHSuVgy6V16trfaV7T7ZGKhRV04QFpa1Sin2SvnG95AMhnBioTV5kS CSnpuerWLyEo/T2nyhowzzvZ5D41g4PUSf1JlC1mCYtMp+bCJetXIRJKoiqELcA5K0wdZSD2H UIwb75m/MiplnjAn5/izcCtucP5xpSrOAvEq7bO9JKm6pHd3gwxmd22JNOVTS7dl1SeAE3E99 Uq/qmtkiz19j/nLnE3egxx9+W5ePQTWxJv5I/YGYIPBmT3tXt0/pCDO1qALjUwLh1S7mWODvL I/gRizkAwzzjscnH4KO48JzNtFfSHsN1HN/t10WpGV2MjHVzect+1gQ6I9e+KGhjTxO93FNkZ WqwSNDnrg0Ee0trcW40w== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The time_t type is part of the user interface and not always the same, with the move to 64-bit timestamps and the difference between architectures. Make the quota format definition independent of this type and use a basic type of the same length. Make it unsigned in the process to keep the v1 format working until year 2106 instead of 2038 on 32-bit architectures. Hopefully, everybody has already moved to a newer format long ago (v2 was introduced with linux-2.4), but it's hard to be sure. Signed-off-by: Arnd Bergmann --- fs/quota/quotaio_v1.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- 2.20.0 diff --git a/fs/quota/quotaio_v1.h b/fs/quota/quotaio_v1.h index bd11e2c08119..31dca9a89176 100644 --- a/fs/quota/quotaio_v1.h +++ b/fs/quota/quotaio_v1.h @@ -25,8 +25,10 @@ struct v1_disk_dqblk { __u32 dqb_ihardlimit; /* absolute limit on allocated inodes */ __u32 dqb_isoftlimit; /* preferred inode limit */ __u32 dqb_curinodes; /* current # allocated inodes */ - time_t dqb_btime; /* time limit for excessive disk use */ - time_t dqb_itime; /* time limit for excessive inode use */ + + /* below fields differ in length on 32-bit vs 64-bit architectures */ + unsigned long dqb_btime; /* time limit for excessive disk use */ + unsigned long dqb_itime; /* time limit for excessive inode use */ }; #define v1_dqoff(UID) ((loff_t)((UID) * sizeof (struct v1_disk_dqblk)))