Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3614978pxv; Mon, 12 Jul 2021 23:04:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+Fc+xXtXU06JNvy43EAcDU1b4Tyk9cZ+h3GRecei8SpSTIh69Wi09KsWt6KTP4B2+/vtX X-Received: by 2002:aa7:cc87:: with SMTP id p7mr3332107edt.82.1626156259168; Mon, 12 Jul 2021 23:04:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626156259; cv=none; d=google.com; s=arc-20160816; b=vsGx/3YlqNaxPGTY9ctNHV4r5zYfRG8z1FUXbIGH13U8lFU17VMJYGw9GPObFNmVO8 VmWWCNtNrJCq5YRyhlomDS2MS3cRHL1xD5eTQF8CvtXf8QeORUSWFgA4Yr/cqRpRWWkJ VIW1ZGRZ2TTdxK/fpHUBShSeD7t8fKZn4YL3wSdhD64skBHYi7HK9XUkhsCsQ61mnfz0 6OKzCvxBTXioDcgaUxQ2n1wz0xPefSpA2DVMIAIzaFJb1GMWh14SdELIyBDLojqAwvep xObewZJENmOmAJoJ8mcn5BtlWz33piNLfumdvWY8Y/RuKt9X3jKbUoSaxFiQgynZrv6K ptrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=1D07VBYHVlfVW177ehSNjfkxJ96KWMGyfdK1Ulmhwzo=; b=xLLRomaByEyfVyvdEzY0D/PfW5PTMYQbLljS88LDPPMyBkBFu2NXFPUkSodDL376dB TfNhRfIR5iAHNI8p/kxL+y5a2dtvzW9SEi9j5+PY916YN3CieQfd7POdbH74cwvP26wg Q8b9RTCF1WL/fOxPHgdVouU9GM+aM0g4hwWXSzvGgvzL8GxF1no8l4uwgvFFuYWaPYUY ++3KtS8ov+BORx/jrhFm4kFQdlSvz5Xf93bpfML0VdNRuTxALbU10EUo2FLZb7Llscwx j6j5aSRPgf9gFGigEg8tJ0C4EvEVoieyCT+aEkYP34zo8k1wBOwUNLC8U9D+C7l7eq3/ /NWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=M+fYzrlI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j22si7683829edr.518.2021.07.12.23.03.55; Mon, 12 Jul 2021 23:04:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=M+fYzrlI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232562AbhGMGCw (ORCPT + 99 others); Tue, 13 Jul 2021 02:02:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229945AbhGMGCw (ORCPT ); Tue, 13 Jul 2021 02:02:52 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB79DC0613DD; Mon, 12 Jul 2021 23:00:02 -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=1D07VBYHVlfVW177ehSNjfkxJ96KWMGyfdK1Ulmhwzo=; b=M+fYzrlIfp6yhbAuJdNoK/NvWF fURYIdss5pnxUmi4WlMY0NBeq5C/CnLHT265KG/4C+pzkOkQcAYrxl2PWTiRM5c+yQdSdLN/ry8pP MXPQtAOj3Zp4fL7guTW7GJC0yN/ib4tyA9jZgvFimcRMWyNqMdTZKxWCy1tbtTqiQ6cT+vPKC/8wN pZMkc5BKdM6LdOT8E+JQpAxlP8pzOVXVhcX1sBPKpyhrzo2MBWv3ABGnXWt/EkOUnksLHlnB/oFum Zlg/JFKDztbD83RowHH/ucjHxKalCFvT8xHqRt7FFEfE+zv3POEngluWV0esGd/KuBfecS9iE8KMq v20KkQIw==; Received: from hch by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3BSC-000myC-Ou; Tue, 13 Jul 2021 05:59:44 +0000 Date: Tue, 13 Jul 2021 06:59:36 +0100 From: Christoph Hellwig To: "Elliott, Robert (Servers)" Cc: 'Matteo Croce' , "linux-block@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , Jens Axboe , "linux-kernel@vger.kernel.org" , Lennart Poettering , Luca Boccassi , Alexander Viro , Damien Le Moal , Tejun Heo , Javier Gonz?lez , Niklas Cassel , Johannes Thumshirn , Hannes Reinecke , Matthew Wilcox , Christoph Hellwig , JeffleXu Subject: Re: [PATCH v4 3/5] block: add ioctl to read the disk sequence number Message-ID: References: <20210711175415.80173-1-mcroce@linux.microsoft.com> <20210711175415.80173-4-mcroce@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 12, 2021 at 07:22:43PM +0000, Elliott, Robert (Servers) wrote: > static int put_u64(u64 __user *argp, u64 val) > { > return put_user(val, argp); > } > > > diff --git a/block/ioctl.c b/block/ioctl.c > > index 24beec9ca9c9..0c3a4a53fa11 100644 > > --- a/block/ioctl.c > > +++ b/block/ioctl.c > > @@ -469,6 +469,8 @@ static int blkdev_common_ioctl(struct block_device > > *bdev, fmode_t mode, > > BLKDEV_DISCARD_SECURE); > ... > > > + case BLKGETDISKSEQ: > > + return put_u64(argp, bdev->bd_disk->diskseq); > > How does that work on a system in which int is 32 bits? Why would it not work? put_user is a magic macro that works on all scalar value.