Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp5170624imm; Sun, 22 Jul 2018 15:09:50 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcz4gjBvfgkO2QQQp6pb4TGGeycWEZO5mqk414L+Lko4qLFtTTIw8e0YZxNKyulxu9wCJBS X-Received: by 2002:a63:5c52:: with SMTP id n18-v6mr9756481pgm.360.1532297390506; Sun, 22 Jul 2018 15:09:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532297390; cv=none; d=google.com; s=arc-20160816; b=sRmEj+UvC4W4+Z0KBUXFglaxCAyICGr70OYZ9JkSaGS3ABbNNB4WH3QlXZ+YtnVWWq 4Et4n2fP5I94sVXEd2bMVH16cxUiQQJrDPv7ePQ51HEm2in75Pe1vZEsRC7/U49ZTq4G QZsCF1/DwUa3D2lSJ4XTazkbdm9emZniKxPusdjl1CBh+qkwkNX/NZ2SKD0dz2+xcTeH 0QwLXUDJZ305oMs5BqNg2pCzT3FOyGRy8E9Lg94oiCM2vVgjouY0y+xK0KZLyvXFgiQn z7HqaODUyyNwu5D3itPz8kSpcgWK3trACqzFDimD+fk7GlyLJYkAgfAe8hMGnqP08Vje 4GPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=qVT9DsJUy3tWv6r2oWR9UxkTK51n9zJmFQaz3VqN2js=; b=NXnURB277xwD0Qk5/1kv5ZXqyBjF4TK93irWIlHntMYRRq1nQr5+27n9Y4srlBKpco kpLZyY+X2I/NFEAD60p2gf6uqWDwyMUsmtiD4BP7Y50JerlWABLX2xREjXtc31r8gnVG wWw/0bd0RCRtC9J1qn1+cE2CQD556BvBycqDGFFSUNWqXsj48FhYMfERKbUiw6qJqZfE FGTKwe4dL692MoQlUikv70iPAtKAz65mzCaQOCJjXmqN/VK4G4Sc5IMHIzwPhhAVKxgz F/ZvvrRUJcR0Ao29MJ2mGrRTokPjcJEWdfH+h9ZSVn326Em+aRSLx+A5sESq7c0yDBR8 70qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@thunk.org header.s=ef5046eb header.b=qwEiRcvt; 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 h65-v6si6899269pfg.197.2018.07.22.15.09.35; Sun, 22 Jul 2018 15:09:50 -0700 (PDT) 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; dkim=fail header.i=@thunk.org header.s=ef5046eb header.b=qwEiRcvt; 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 S1730860AbeGVXG6 (ORCPT + 99 others); Sun, 22 Jul 2018 19:06:58 -0400 Received: from imap.thunk.org ([74.207.234.97]:43620 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730611AbeGVXG6 (ORCPT ); Sun, 22 Jul 2018 19:06:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=thunk.org; s=ef5046eb; 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:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=qVT9DsJUy3tWv6r2oWR9UxkTK51n9zJmFQaz3VqN2js=; b=qwEiRcvttzAxm6ip0psZj18ksE 9mJW+FPHr1BZy2FknJNayu+bwBgUcRI6b4Da6qVk6AyPDBpMpwGyaxtnF2ME1lFG750qGLwvBCgUs Nem4yNrBmFgdHxPxtTcSshli+pHzEt2nCTrvOF5btruhbQwGQ2/QhKNcxh5XOoOtI5P0=; Received: from root (helo=callcc.thunk.org) by imap.thunk.org with local-esmtp (Exim 4.89) (envelope-from ) id 1fhMWy-0005Sb-Uc; Sun, 22 Jul 2018 22:08:45 +0000 Received: by callcc.thunk.org (Postfix, from userid 15806) id AF7AB7A6463; Sun, 22 Jul 2018 18:08:41 -0400 (EDT) Date: Sun, 22 Jul 2018 18:08:41 -0400 From: "Theodore Y. Ts'o" To: Junil Lee Cc: adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, junil0814.lee@MIT.EDU Subject: Re: [PATCH] ext4: remove abnormal set for I_DATA_SEM subclass Message-ID: <20180722220841.GA3358@thunk.org> Mail-Followup-To: "Theodore Y. Ts'o" , Junil Lee , adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, junil0814.lee@MIT.EDU References: <1531123108-45918-1-git-send-email-junil0814.lee@lge.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1531123108-45918-1-git-send-email-junil0814.lee@lge.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on imap.thunk.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 09, 2018 at 04:58:28PM +0900, Junil Lee wrote: > The -EBUSY return value of dquot_enable() function means that just > want to update flags. If some users make a duplicate request to update > flags, lockdep could catch the false positive casued by needing to > allocate a quota block from inside ext4_map_blocks(), while holding > i_data_sem for a data inode. This results in this complaint: > > CPU0 CPU1 > ---- ---- > lock(&s->s_dquot.dqio_mutex); > lock(&ei->i_data_sem); > lock(&s->s_dquot.dqio_mutex); > lock(&ei->i_data_sem); How does this happen in practice? The function ext4_quota_enable() is only called by ext4_enable_quotas(), and I don't see the code path where this would happen. And if it does it would be resulting an EXT4-fs warning message getting printing indicating that a failure to enable quotas with an error of EBUSY. So how does this happen that "users would make a duplicate request to update flags"? - Ted