From patchwork Fri Nov 8 21:32:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 179000 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp3315841ilf; Fri, 8 Nov 2019 13:37:57 -0800 (PST) X-Google-Smtp-Source: APXvYqzCiPrMh32Lsa4QU1t4AsqqaaF91vU7FwO00+dwQ0mWWK/G2xhPJLkca4yHxbXc/XnfL4s3 X-Received: by 2002:aa7:c444:: with SMTP id n4mr11418030edr.3.1573249077622; Fri, 08 Nov 2019 13:37:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573249077; cv=none; d=google.com; s=arc-20160816; b=NTauqBLeMsRMF2iBMcFTdPpA8NdhySDPhFK9k4SGYytGhN0oFYZvxD5QuUvqAgeU9z zOYpgwQS8TnC6ZzO1hedVUAVBjhGHaYbi8NqfPdg8A2NpXDjJLBLvYBk8KyKpNg2zUam VXOethbnf8jp8ZDvULALT9dHyd2HXJ1RXZtaxDKKCLrvRpGt4KPVGerFmin7WDQnLhtG nvF2t6i3OlEAieLvp4X20LUkkF2F5j0L0GuB8UyRoCw7W7NMaeMPSF/Z6PEuJbZLSdBf PDNsgH7ADqIivbxrzBr5DmVG1k/xaDsVzgeFphufCL3hQqhJ5DR7wK2oPEpaCRsL42Px hfnQ== 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=p8KizCugAoFXzWi5ZZ6S9acs8VBhPIV89qS4SIGldCroAFSa8lxwYS2SNj6ici0kWE 1AtUFQRpukAnQOLX9is6etzG3UIh+BS57CinNljzkZ11t6h6x9KI5pOjC8jY7qZ0mzv4 jEcJkl/8EmlAlwUCmb6MkdI/A089Rx7OuJaeRKKpcr0pc+cqd2KIcVtlsisLTrFTqJtq PgTtj6XJSOlZu6SuDw46C2i7Le/gQmY5VHXlCbBOe/Wy+XF/0oZPSS0pQmr2IMBx3rON WaSG4vUEYC9BenxO60H3NUM5A3Oc4mEcLkdCZxTu2GGKWXviR6ISiV4ad4zgUE1yFQzt YSYA== 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 e24si4636498ejx.220.2019.11.08.13.37.57; Fri, 08 Nov 2019 13:37:57 -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 S2388386AbfKHVhy (ORCPT + 26 others); Fri, 8 Nov 2019 16:37:54 -0500 Received: from mout.kundenserver.de ([212.227.126.131]:44267 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388098AbfKHVhx (ORCPT ); Fri, 8 Nov 2019 16:37:53 -0500 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPA (Nemesis) id 1Ml6Zo-1i3mCK0AMm-00lWcq; Fri, 08 Nov 2019 22:36:40 +0100 From: Arnd Bergmann To: y2038@lists.linaro.org, Jan Kara Cc: linux-kernel@vger.kernel.org, Arnd Bergmann Subject: [PATCH 11/16] quota: avoid time_t in v1_disk_dqblk definition Date: Fri, 8 Nov 2019 22:32:49 +0100 Message-Id: <20191108213257.3097633-12-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20191108213257.3097633-1-arnd@arndb.de> References: <20191108213257.3097633-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:r4+HDTKLF8JwWwZoVSG61m2TMwB5tZHUr07N5j4f9snFYXaTdcY 8FRUSe43cL00EtG2dk4U1k+hXkV64fPxg7EX4hmJZQNw/AyESlLPHpAg25GkrUqXhPGl9Lx 8YRcLHUZLOSwT20wpqodE+JInhJy7d2FFkcfHTVzHy8N5ypap4xeBuCESRRynBQgUvk5uvs nmwdUOajEqKDJ2kcXErsA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:smWTcQrNlag=:uceC1aGHaQdFcGEu4mCRW8 IycRt3ysNIHQT9iNFSsAykKZJ1rvSzRVIec34YMmY2Q9Pt7HHRjxq72igB5ec/1Sx4cAcSV+F d7GMy2eAogNO3pEbWvgpZN2+J9C6XW53mlBhFobTyozqIVZbBJe5qwl1Ox3CRCPGjQD7utCvd fgBZnXEXE4/0nHRebGtVKyx/zO5RGk3LPRyodlQ765n7wjCEz7UZe5AuRLLi1GdF6yI3JJIEd v6I2XYkK2SXQo1+vQ2AS68rUMDjJF+AFyx7SZn51NQIk+pwg7/0uf929uYZHmWSVs35/6wm+Z MkSjpbm/rFl6ZXwOIUOw/FXsZ+ARRtv/uV2bmBEFQvNXYYKPknMdDdtSj+KgusKRxVsTs9F/3 gS1nk408LbTXOTk4a06htk6k7py7No6/csoOfK+ze5KocKp1MqQKUM8DheQm5DFVNfip5dF5I wZPQFkBD+te3Vv4Zc4VBNgeht9YyKqwneuRtYcFASSoGXkOCA0qwc5iTnEt14yynLkQFAMQEW txC3StDzJZBhfkyANjR4Jcl+IOEkEbhmJg1vWyGh64PffHxZ4V6R8vHh9W75QuPj/qXCqBH4D 9iozyL+1PLUi4m/gcpH8mAVJI+U2TXPvCCIykQiebBvN8oGx9B0Fj8WKr2BCSJJtGiMOmQfhg T/rB/hvlwqZlFe0vMnpDbSdb3cE0vAGj24u4rL6At5JDEvwck+qTU2N0zQzV2J8aPt5nOKVH2 ODZGHba3cEBb3FVrF/WKHrkDRUgd5isoiM0jRKBebve6rXhKVQInUy6A5J3AagYkUCdauqeK7 FQhtJvvV8hgtVOXFiuIoDEvVXNliECSauDatoMv6mTutAAfIv+jK1voP2I0TDbOqLVr7B1ZFG oZ4A1HVS+oWARNansHPA== 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)))