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 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 22843C433F5 for ; Fri, 15 Apr 2022 05:09:56 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-517-XOc0fvcnMWGsn5VuJBBPRQ-1; Fri, 15 Apr 2022 01:09:55 -0400 X-MC-Unique: XOc0fvcnMWGsn5VuJBBPRQ-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7BD67833960; Fri, 15 Apr 2022 05:09:53 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 691584021D9; Fri, 15 Apr 2022 05:09:53 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 0E677194034A; Fri, 15 Apr 2022 05:09:53 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id DE89119451EC for ; Fri, 15 Apr 2022 05:09:51 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id CF0AE145B96E; Fri, 15 Apr 2022 05:09:51 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast10.extmail.prod.ext.rdu2.redhat.com [10.11.55.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CAFB5145830E for ; Fri, 15 Apr 2022 05:09:51 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8DFCF1C04B5D for ; Fri, 15 Apr 2022 05:09:51 +0000 (UTC) Received: from esa6.hgst.iphmx.com (esa6.hgst.iphmx.com [216.71.154.45]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-656-KRkAXGHKORyplnaAZZVOTg-1; Fri, 15 Apr 2022 01:09:49 -0400 X-MC-Unique: KRkAXGHKORyplnaAZZVOTg-1 X-IronPort-AV: E=Sophos;i="5.90,261,1643644800"; d="scan'208";a="198866633" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 15 Apr 2022 13:09:49 +0800 IronPort-SDR: UQaXf0kOoJqQPXZjb2VSytXDmYU6E+x+cn685gqyzoOY1B3b7A+z/1iTpzJDOfsgm3tjurS9tO aIj6u8EAdOvMkpQWHxu1mNNvXiO6RF/U/UdTjh8ToN0Y8zfG+ajpeziBC0rFMvz88caR956tyh Bf7iPNiuJ57Jh2gkzGAt4goBF4oKrCoxyvj7qEz9mR655k5tyYZnx+0jUpSnYHJKVaKv8QQ1Je vJZ/jUi4RZlGla1mCjfg8mJF0CsRc3BP/RCSerfLE9dTy/xGsmimn2VOKabkBG+FVecqrtXDdx mljdsEd+dgfcRw/tgxSuKs1o Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 14 Apr 2022 21:41:00 -0700 IronPort-SDR: Jcd05X5mSzid5YuPMJvlmivNZzM8/ZwcW6DWnFe73Eb17t7syaiyunvNZCik3oY1Q+IUSPoQE2 sY/yguvvdKulIipTUt4bp+6Av8bjGt4+9I9tAz2COgRGnAL98wH2GgLy7cwdK6R6y/89nZujk4 aP88/DltiogT6MpK9v/34wHg6pYE1l2a8X+Iie3iqqPHOROeMiCFn1ydBHHxwZBrX1JtopkTGx iq26BSdmBmbz/vjpMGD7LNOXyEqmb4FcshJq8VDorgbAaN9oyaV51GznxE9jtB4uinelfiDZu4 rY0= WDCIronportException: Internal Received: from usg-ed-osssrv.wdc.com ([10.3.10.180]) by uls-op-cesaip02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 14 Apr 2022 22:09:49 -0700 Received: from usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1]) by usg-ed-osssrv.wdc.com (Postfix) with ESMTP id 4KfksS1wC3z1SVp4 for ; Thu, 14 Apr 2022 22:09:48 -0700 (PDT) X-Virus-Scanned: amavisd-new at usg-ed-osssrv.wdc.com Received: from usg-ed-osssrv.wdc.com ([127.0.0.1]) by usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id DiK7ytJhahzN for ; Thu, 14 Apr 2022 22:09:47 -0700 (PDT) Received: from [10.225.163.9] (unknown [10.225.163.9]) by usg-ed-osssrv.wdc.com (Postfix) with ESMTPSA id 4KfksM3c9Fz1Rvlx; Thu, 14 Apr 2022 22:09:43 -0700 (PDT) Message-ID: <62ebc311-e5ef-cea5-5236-0c83d1a3eb64@opensource.wdc.com> Date: Fri, 15 Apr 2022 14:09:42 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 To: Christoph Hellwig , Jens Axboe References: <20220415045258.199825-1-hch@lst.de> <20220415045258.199825-11-hch@lst.de> From: Damien Le Moal Organization: Western Digital Research In-Reply-To: <20220415045258.199825-11-hch@lst.de> X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 Subject: Re: [dm-devel] [PATCH 10/27] mm: use bdev_is_zoned in claim_swapfile X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jfs-discussion@lists.sourceforge.net, linux-nvme@lists.infradead.org, virtualization@lists.linux-foundation.org, linux-mm@kvack.org, dm-devel@redhat.com, target-devel@vger.kernel.org, linux-mtd@lists.infradead.org, drbd-dev@lists.linbit.com, linux-s390@vger.kernel.org, linux-nilfs@vger.kernel.org, linux-scsi@vger.kernel.org, cluster-devel@redhat.com, xen-devel@lists.xenproject.org, linux-ext4@vger.kernel.org, linux-um@lists.infradead.org, nbd@other.debian.org, linux-block@vger.kernel.org, linux-bcache@vger.kernel.org, ceph-devel@vger.kernel.org, linux-raid@vger.kernel.org, linux-mmc@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-xfs@vger.kernel.org, ocfs2-devel@oss.oracle.com, linux-fsdevel@vger.kernel.org, ntfs3@lists.linux.dev, linux-btrfs@vger.kernel.org Errors-To: dm-devel-bounces@redhat.com Sender: "dm-devel" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dm-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On 4/15/22 13:52, Christoph Hellwig wrote: > Use the bdev based helper instead of poking into the queue. > > Signed-off-by: Christoph Hellwig > --- > mm/swapfile.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/swapfile.c b/mm/swapfile.c > index 63c61f8b26118..4c7537162af5e 100644 > --- a/mm/swapfile.c > +++ b/mm/swapfile.c > @@ -2761,7 +2761,7 @@ static int claim_swapfile(struct swap_info_struct *p, struct inode *inode) > * write only restriction. Hence zoned block devices are not > * suitable for swapping. Disallow them here. > */ > - if (blk_queue_is_zoned(p->bdev->bd_disk->queue)) > + if (bdev_is_zoned(p->bdev)) > return -EINVAL; > p->flags |= SWP_BLKDEV; > } else if (S_ISREG(inode->i_mode)) { Looks good. Reviewed-by: Damien Le Moal -- Damien Le Moal Western Digital Research -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel