From patchwork Thu Aug 18 17:37:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 9288547 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E5B9A607FF for ; Thu, 18 Aug 2016 17:37:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CF9C52922D for ; Thu, 18 Aug 2016 17:37:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C446B292D4; Thu, 18 Aug 2016 17:37:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from oss.sgi.com (oss.sgi.com [192.48.182.195]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 453082922D for ; Thu, 18 Aug 2016 17:37:16 +0000 (UTC) Received: from oss.sgi.com (localhost [IPv6:::1]) by oss.sgi.com (Postfix) with ESMTP id E97BD7CA1; Thu, 18 Aug 2016 12:37:14 -0500 (CDT) X-Original-To: xfs@oss.sgi.com Delivered-To: xfs@oss.sgi.com Received: from relay.sgi.com (relay3.corp.sgi.com [198.149.34.15]) by oss.sgi.com (Postfix) with ESMTP id E21C77CA0 for ; Thu, 18 Aug 2016 12:37:12 -0500 (CDT) Received: from cuda.sgi.com (cuda1.sgi.com [192.48.157.11]) by relay3.corp.sgi.com (Postfix) with ESMTP id 5EB47AC001 for ; Thu, 18 Aug 2016 10:37:12 -0700 (PDT) X-ASG-Debug-ID: 1471541828-0bf8155c743d680001-NocioJ Received: from newverein.lst.de (verein.lst.de [213.95.11.211]) by cuda.sgi.com with ESMTP id XP3ej65ZyNFTZxRn (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Thu, 18 Aug 2016 10:37:09 -0700 (PDT) X-Barracuda-Envelope-From: hch@lst.de X-Barracuda-Effective-Source-IP: verein.lst.de[213.95.11.211] X-Barracuda-Apparent-Source-IP: 213.95.11.211 Received: by newverein.lst.de (Postfix, from userid 2407) id CB40E68D8D; Thu, 18 Aug 2016 19:37:07 +0200 (CEST) Date: Thu, 18 Aug 2016 19:37:07 +0200 From: Christoph Hellwig To: Peter Zijlstra Subject: Re: [PATCH, RFC] xfs: remove i_iolock and use i_rwsem in the VFS inode instead Message-ID: <20160818173707.GA1240@lst.de> X-ASG-Orig-Subj: Re: [PATCH, RFC] xfs: remove i_iolock and use i_rwsem in the VFS inode instead References: <1470935423-12329-1-git-send-email-hch@lst.de> <20160811215444.GY30192@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20160811215444.GY30192@twins.programming.kicks-ass.net> User-Agent: Mutt/1.5.17 (2007-11-01) X-Barracuda-Connect: verein.lst.de[213.95.11.211] X-Barracuda-Start-Time: 1471541829 X-Barracuda-Encrypted: ECDHE-RSA-AES256-GCM-SHA384 X-Barracuda-URL: https://192.48.157.11:443/cgi-mod/mark.cgi X-Barracuda-Scan-Msg-Size: 1735 X-Virus-Scanned: by bsmtpd at sgi.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.60 X-Barracuda-Spam-Status: No, SCORE=0.60 using per-user scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.7 tests=BSF_SC0_MISMATCH_TO, COMMA_SUBJECT X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.32127 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.60 COMMA_SUBJECT Subject is like 'Re: FDSDS, this is a subject' 0.00 BSF_SC0_MISMATCH_TO Envelope rcpt doesn't match header Cc: Christoph Hellwig , xfs@oss.sgi.com X-BeenThere: xfs@oss.sgi.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: xfs-bounces@oss.sgi.com Sender: xfs-bounces@oss.sgi.com X-Virus-Scanned: ClamAV using ClamSMTP On Thu, Aug 11, 2016 at 11:54:44PM +0200, Peter Zijlstra wrote: > Sure, find below. Not been near a compiler. It has now. Below are the additions I need, and things seem to be passing fine with that. Note that to fit the existing XFS lock asserts I'm using _lockdep_is_held directly instead of lockdep_assert_held_exclusive. All the exports are there, but I'm just trying to make sure you're not going to shout at me for that later :) diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index 7f0098d..4cef9f8 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h @@ -345,7 +345,8 @@ static inline int lock_is_held(struct lockdep_map *lock) return _lock_is_held(lock, -1); } -#define lockdep_is_held(lock) lock_is_held(&(lock)->dep_map) +#define lockdep_is_held(lock) lock_is_held(&(lock)->dep_map) +#define _lockdep_is_held(lock, r) _lock_is_held(&(lock)->dep_map, (r)) extern void lock_set_class(struct lockdep_map *lock, const char *name, struct lock_class_key *key, unsigned int subclass, diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index abec578..f39573b 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -3778,7 +3778,7 @@ void lock_release(struct lockdep_map *lock, int nested, } EXPORT_SYMBOL_GPL(lock_release); -int lock_is_held(struct lockdep_map *lock, int read) +int _lock_is_held(struct lockdep_map *lock, int read) { unsigned long flags; int ret = 0; @@ -3796,7 +3796,7 @@ int lock_is_held(struct lockdep_map *lock, int read) return ret; } -EXPORT_SYMBOL_GPL(lock_is_held); +EXPORT_SYMBOL_GPL(_lock_is_held); struct pin_cookie lock_pin_lock(struct lockdep_map *lock) {