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.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 61900C63777 for ; Tue, 24 Nov 2020 19:47:14 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B8868208CA for ; Tue, 24 Nov 2020 19:47:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jOV4zvc5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B8868208CA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id E3F886B006E; Tue, 24 Nov 2020 14:47:12 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id DF08E6B0070; Tue, 24 Nov 2020 14:47:12 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D06A26B0071; Tue, 24 Nov 2020 14:47:12 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0128.hostedemail.com [216.40.44.128]) by kanga.kvack.org (Postfix) with ESMTP id B828A6B006E for ; Tue, 24 Nov 2020 14:47:12 -0500 (EST) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 81F763635 for ; Tue, 24 Nov 2020 19:47:12 +0000 (UTC) X-FDA: 77520345504.03.line83_2a1158127370 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin03.hostedemail.com (Postfix) with ESMTP id 648BE28A4E8 for ; Tue, 24 Nov 2020 19:47:12 +0000 (UTC) X-HE-Tag: line83_2a1158127370 X-Filterd-Recvd-Size: 4116 Received: from mail-qk1-f196.google.com (mail-qk1-f196.google.com [209.85.222.196]) by imf24.hostedemail.com (Postfix) with ESMTP for ; Tue, 24 Nov 2020 19:47:11 +0000 (UTC) Received: by mail-qk1-f196.google.com with SMTP id b144so7774780qkc.13 for ; Tue, 24 Nov 2020 11:47:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=V2TOjLdoUaYrySYqHg0oeA6ickZUCz64YonJi1MX7zw=; b=jOV4zvc5ykqwIR5EZxEdhoTt8gbdvwT6+6X/TSUVT/z8HYM0C2tjvbbgLMctpzeJXh RGgnK/f6uWChM4BxAbOX4p18Fwq1/chEXov7aPAYOwuKTjdA655sPluEae6103/B37UZ mtHW9DvASGebX6RreWH7qhpVzv5BxklJgKQSxfx5joha57iIHUUTiDQJHNfLS9atfGSt ExNgjoQWPu/xgn5sRgfmq3jVVaBwbHob8XGT+JoMXjhTpfpEBrU2/+S555WpdkNVIh4j Jpy0MqgRWGJT79DbBEN/JVT9ea84He6RSeOcPWGIlVmK+xMy8dzyAD0z3NQbnkk9QV/T mQ+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=V2TOjLdoUaYrySYqHg0oeA6ickZUCz64YonJi1MX7zw=; b=axoETzxTurpEwgYMIOStGakwtHPZ4LpUFhZu4DLti6u1Rrh2pesJTnB7e5SzXiOVG1 4hW2FcQwHDK+1+H7vmfx11piv3n8O9Cy9a0khs/pukuDrjBWuweVpRzS92XvenHm8nDt yT4gb3dnFbLaYehYhjGMw7JVW/6+ObeJMkMaEDT+NoaCgPBN1d28XQCgkScUPzg1Jm9t 0UzioRoJY9ZyAQgzAW4og//e45Dj8uUhnX64vVnv7Lew8L+3+8L0enV8a/xUmNLhx+9P nYW5N/bkqma3lHIeHmEC0/W+UdmclHd4DeEQidpvwgKtb4yhAxlGAxpof8L83mL8A45D AJww== X-Gm-Message-State: AOAM5305wBhTiXCy+Ks2pOLN/GPPwxV9+5Oh4MGsqczRHbZreYyrjTNT azsJeugDVce7bdCnDcuiAQo= X-Google-Smtp-Source: ABdhPJzCbEzsnsSHZbAP8aBMoagyKuXkYbNxYHgU470rrYkN9D5aTPe0QJyzDBb8iwv2DZpxdq68Ww== X-Received: by 2002:a37:6cd:: with SMTP id 196mr3775536qkg.96.1606247231211; Tue, 24 Nov 2020 11:47:11 -0800 (PST) Received: from localhost (dhcp-6c-ae-f6-dc-d8-61.cpe.echoes.net. [72.28.8.195]) by smtp.gmail.com with ESMTPSA id 137sm123792qkj.109.2020.11.24.11.47.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Nov 2020 11:47:10 -0800 (PST) Date: Tue, 24 Nov 2020 14:46:47 -0500 From: Tejun Heo To: Christoph Hellwig Cc: Jens Axboe , Josef Bacik , Konrad Rzeszutek Wilk , Coly Li , Mike Snitzer , Greg Kroah-Hartman , Jan Kara , Johannes Thumshirn , dm-devel@redhat.com, Richard Weinberger , Jan Kara , linux-block@vger.kernel.org, xen-devel@lists.xenproject.org, linux-bcache@vger.kernel.org, linux-mtd@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 24/45] blk-cgroup: stop abusing get_gendisk Message-ID: References: <20201124132751.3747337-1-hch@lst.de> <20201124132751.3747337-25-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201124132751.3747337-25-hch@lst.de> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Nov 24, 2020 at 02:27:30PM +0100, Christoph Hellwig wrote: > Properly open the device instead of relying on deep internals by > using get_gendisk. Note that this uses FMODE_NDELAY without either > FMODE_READ or FMODE_WRITE, which is a special open mode to allow > for opening without media access, thus avoiding unexpexted interactions > especially on removable media. I'm not sure FMODE_NDELAY does that. e.g. sd_open() does media change check and full revalidation including disk spin up regadless of NDELAY and it's odd and can lead to nasty surprises to require cgroup configuration updates to wait for SCSI EH. Thanks. -- tejun