From patchwork Fri Nov 13 08:06:42 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Anderson X-Patchwork-Id: 59743 X-Patchwork-Delegate: agk@redhat.com Received: from hormel.redhat.com (hormel1.redhat.com [209.132.177.33]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nAD86mRj019757 for ; Fri, 13 Nov 2009 08:06:48 GMT Received: from listman.util.phx.redhat.com (listman.util.phx.redhat.com [10.8.4.110]) by hormel.redhat.com (Postfix) with ESMTP id 18B37619967; Fri, 13 Nov 2009 03:06:48 -0500 (EST) Received: from int-mx01.intmail.prod.int.phx2.redhat.com (nat-pool.util.phx.redhat.com [10.8.5.200]) by listman.util.phx.redhat.com (8.13.1/8.13.1) with ESMTP id nAD86jD1005470 for ; Fri, 13 Nov 2009 03:06:45 -0500 Received: from mx1.redhat.com (ext-mx05.extmail.prod.ext.phx2.redhat.com [10.5.110.9]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nAD86jv0024226 for ; Fri, 13 Nov 2009 03:06:45 -0500 Received: from e31.co.us.ibm.com (e31.co.us.ibm.com [32.97.110.149]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nAD86i4N012884 for ; Fri, 13 Nov 2009 03:06:44 -0500 Received: from d03relay02.boulder.ibm.com (d03relay02.boulder.ibm.com [9.17.195.227]) by e31.co.us.ibm.com (8.14.3/8.13.1) with ESMTP id nAD7xhfL025486 for ; Fri, 13 Nov 2009 00:59:43 -0700 Received: from d03av03.boulder.ibm.com (d03av03.boulder.ibm.com [9.17.195.169]) by d03relay02.boulder.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id nAD86hQm248636 for ; Fri, 13 Nov 2009 01:06:43 -0700 Received: from d03av03.boulder.ibm.com (loopback [127.0.0.1]) by d03av03.boulder.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id nAD86hC5014239 for ; Fri, 13 Nov 2009 01:06:43 -0700 Received: from hmsbounty.localdomain (sig-9-65-52-147.mts.ibm.com [9.65.52.147]) by d03av03.boulder.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id nAD86hPO014226 for ; Fri, 13 Nov 2009 01:06:43 -0700 Received: from localhost.localdomain (hmsbounty [127.0.0.1]) by hmsbounty.localdomain (Postfix) with ESMTP id E50AA182056 for ; Fri, 13 Nov 2009 00:06:42 -0800 (PST) To: dm-devel@redhat.com From: Mike Anderson Date: Fri, 13 Nov 2009 00:06:42 -0800 Message-ID: <20091113080642.17587.37581.stgit@localhost.localdomain> In-Reply-To: <20091113080637.17587.64935.stgit@localhost.localdomain> References: <20091113080637.17587.64935.stgit@localhost.localdomain> User-Agent: StGit/0.15 MIME-Version: 1.0 X-RedHat-Spam-Score: -4 (RCVD_IN_DNSWL_MED) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-Scanned-By: MIMEDefang 2.67 on 10.5.110.9 X-loop: dm-devel@redhat.com Subject: [dm-devel] [PATCH 1/2] dm: Add accessor dm_table_md_suspended X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.5 Precedence: junk Reply-To: device-mapper development List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c index 1a6cb3c..6616598 100644 --- a/drivers/md/dm-table.c +++ b/drivers/md/dm-table.c @@ -1245,6 +1245,11 @@ struct mapped_device *dm_table_get_md(struct dm_table *t) return t->md; } +int dm_table_md_suspended(struct dm_table *t) +{ + return dm_suspended(t->md); +} + EXPORT_SYMBOL(dm_vcalloc); EXPORT_SYMBOL(dm_get_device); EXPORT_SYMBOL(dm_put_device); @@ -1255,3 +1260,4 @@ EXPORT_SYMBOL(dm_table_get_md); EXPORT_SYMBOL(dm_table_put); EXPORT_SYMBOL(dm_table_get); EXPORT_SYMBOL(dm_table_unplug_all); +EXPORT_SYMBOL(dm_table_md_suspended); diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index df7607e..3440c54 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h @@ -287,6 +287,7 @@ sector_t dm_table_get_size(struct dm_table *t); unsigned int dm_table_get_num_targets(struct dm_table *t); fmode_t dm_table_get_mode(struct dm_table *t); struct mapped_device *dm_table_get_md(struct dm_table *t); +int dm_table_md_suspended(struct dm_table *t); /* * Trigger an event.