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=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=ham 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 7CAD7C433F5 for ; Fri, 7 Sep 2018 12:13:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2FF702075E for ; Fri, 7 Sep 2018 12:13:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2FF702075E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=CARNet.hr Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729068AbeIGQyf (ORCPT ); Fri, 7 Sep 2018 12:54:35 -0400 Received: from mail.CARNet.hr ([161.53.123.6]:49572 "EHLO mail.carnet.hr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727748AbeIGQyf (ORCPT ); Fri, 7 Sep 2018 12:54:35 -0400 Received: from [2001:b68:ff:12::131] (port=50590 helo=gavran.carpriv.carnet.hr) by mail.carnet.hr with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fyFe0-0002c9-ND; Fri, 07 Sep 2018 14:13:49 +0200 Received: by gavran.carpriv.carnet.hr (Postfix, from userid 1000) id 7DC24202E0; Fri, 7 Sep 2018 14:13:48 +0200 (CEST) Date: Fri, 7 Sep 2018 14:13:48 +0200 From: Valentin Vidic To: drbd-user@lists.linbit.com Cc: Roger Pau =?iso-8859-1?Q?Monn=E9?= , Jens Axboe , Konrad Rzeszutek Wilk , linux-kernel@vger.kernel.org, stable@vger.kernel.org, linux-block@vger.kernel.org, xen-devel@lists.xenproject.org Message-ID: <20180907121348.GM26705@gavran.carpriv.carnet.hr> References: <20180829065214.23546-1-Valentin.Vidic@CARNet.hr> <20180905103649.edugijsjx4v2fbxd@mac.bytemobile.com> <20180905162756.GA26705@gavran.carpriv.carnet.hr> <20180907120337.GB11834@soda.linbit> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180907120337.GB11834@soda.linbit> User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2001:b68:ff:12::131 Subject: Re: [DRBD-user] [PATCH] xen-blkback: Switch to closed state after releasing the backing device X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 07, 2018 at 02:03:37PM +0200, Lars Ellenberg wrote: > Very frequently it is *NOT* the "original user", that "still" holds it > open, but udev, or something triggered-by-udev. > > So double-checking the udev rules, > or the "lvm global_filter" settings may help. > You could instrument DRBD to log current->{pid,comm} on open and close, > so you can better detect who the "someone" is in the message above. Don't think there is anything else holding the device open, because it is possible to change state to Secondary a few seconds later. But I will try to print those values in case anything interesting comes up. > Adding a small retry loop in the script may help as well. Yes, that is an option, but it would still leave those nasty "State change failed" messages in the log. I guess there is no way to check the value of DRBD device->open_cnt from userspace? -- Valentin