linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] device-mapper v4 ioctl interface implementation
@ 2003-07-01 14:58 Joe Thornber
  2003-07-01 15:01 ` [RFC 1/3] dm: fix memory leak Joe Thornber
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Joe Thornber @ 2003-07-01 14:58 UTC (permalink / raw)
  To: Linux Mailing List, dm-devel; +Cc: thornber

Following on from the header file for the v4 ioctl interface that I
posted a couple of weeks ago, here is the first cut at the
implementation (3 patches posted as a follow up to this mail).  I hope
the v1 interface can be retired before 2.6.  Tools are not yet
available to drive this, but should be later this week.

Thoughts ?

- Joe

^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: [dm-devel] Re: [RFC 3/3] dm: v4 ioctl interface
@ 2003-07-02 15:23 Steve Dobbelstein
  2003-07-02 15:40 ` Joe Thornber
  0 siblings, 1 reply; 16+ messages in thread
From: Steve Dobbelstein @ 2003-07-02 15:23 UTC (permalink / raw)
  To: dm-devel, Joe Thornber; +Cc: Linux Mailing List


On Wednesday 02 July 2003 06:00, Joe Thornber wrote:
> dm_swap_table() will now fail for a table with no targets.
> --- diff/drivers/md/dm.c           2003-07-01 15:36:42.000000000 +0100
> +++ source/drivers/md/dm.c         2003-07-02 11:53:22.000000000 +0100
> @@ -664,10 +664,10 @@
>            md->map = t;
>
>            size = dm_table_get_size(t);
> -          set_capacity(md->disk, size);
> -          if (size == 0)
> -                      return 0;
> +          if (!size)
> +                      return -EINVAL;
>
> +          set_capacity(md->disk, size);
>            dm_table_event_callback(md->map, event_callback, md);
>
>            dm_table_get(t);
> @@ -759,8 +759,10 @@
>
>            __unbind(md);
>            r = __bind(md, table);
> -          if (r)
> +          if (r) {
> +                      up_write(&md->lock);
>                        return r;
> +          }
>
>            up_write(&md->lock);
>            return 0;

Why the "if (r)"?  Isn't this just the same as:

            __unbind(md);
            r = __bind(md, table);
            up_write(&md->lock);
            return r;

--
Steve Dobbelstein
steved@us.ibm.com
http://evms.sourceforge.net/




^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2003-07-06  0:25 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-01 14:58 [RFC] device-mapper v4 ioctl interface implementation Joe Thornber
2003-07-01 15:01 ` [RFC 1/3] dm: fix memory leak Joe Thornber
2003-07-01 15:01 ` [RFC 2/3] dm: avoid event race Joe Thornber
2003-07-01 15:02 ` [RFC 3/3] dm: v4 ioctl interface Joe Thornber
2003-07-01 20:05   ` Kevin Corry
2003-07-02  8:59     ` Joe Thornber
2003-07-02 10:59       ` [dm-devel] " Joe Thornber
2003-07-02 10:59       ` Joe Thornber
2003-07-02 10:59       ` Joe Thornber
2003-07-02 11:00       ` Joe Thornber
2003-07-02 11:00       ` Joe Thornber
2003-07-02 14:17         ` Kevin Corry
2003-07-02 14:15       ` Kevin Corry
2003-07-06  0:39 ` [dm-devel] [RFC] device-mapper v4 ioctl interface implementation Alasdair G Kergon
2003-07-02 15:23 [dm-devel] Re: [RFC 3/3] dm: v4 ioctl interface Steve Dobbelstein
2003-07-02 15:40 ` Joe Thornber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).