linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: Mikulas Patocka <mpatocka@redhat.com>
Cc: dm-devel@redhat.com, Alasdair G Kergon <agk@redhat.com>,
	linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org
Subject: Re: [PATCH 3/4] Support discard for multiple devices
Date: Fri, 2 Jul 2010 13:50:37 -0400	[thread overview]
Message-ID: <20100702175037.GA26916@redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.64.1007021118340.7296@hs20-bc2-1.build.redhat.com>

On Fri, Jul 02 2010 at 11:19am -0400,
Mikulas Patocka <mpatocka@redhat.com> wrote:

> Support discard for multiple devices
> 
> The previous code supported discards only if there was one underlying device.
> (i.e. multiple linear targets pointing to the same device would support
> discards, multiple linear targets pointing to different devices wouldn't).
> 
> This restriction is not necessary, so this patch removes it.
> 
> As we checked, barrier+discard requests are handled by the barrier thread,
> so it's safe to use these requests on devices with multiple underlying devices.
> 
> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
> 
> ---
>  drivers/md/dm-table.c |    6 ------
>  1 file changed, 6 deletions(-)
> 
> Index: linux-2.6.35-rc3-fast/drivers/md/dm-table.c
> ===================================================================
> --- linux-2.6.35-rc3-fast.orig/drivers/md/dm-table.c	2010-07-02 16:05:22.000000000 +0200
> +++ linux-2.6.35-rc3-fast/drivers/md/dm-table.c	2010-07-02 16:07:45.000000000 +0200
> @@ -911,12 +911,6 @@ int dm_table_complete(struct dm_table *t
>  	int r = 0;
>  	unsigned int leaf_nodes;
>  
> -	/*
> -	 * We only support discards if there is exactly one underlying device.
> -	 */
> -	if (!list_is_singular(&t->devices))
> -		t->discards_supported = 0;
> -
>  	/* how many indexes will the btree have ? */
>  	leaf_nodes = dm_div_up(t->num_targets, KEYS_PER_NODE);
>  	t->depth = 1 + int_log(leaf_nodes, CHILDREN_PER_NODE);
> 

Removing this constraint means that a discard request that spans targets
will return -EOPNOTSUPP.

I'd prefer that we first make basic discard splitting work (like I
already have a DM patch to do that I'll rebase shortly).

But given the new-found desire for DM to return -EOPNOTSUPP as a means
to convey that a subset of the device does not support discards:

This change will start to force this issue with DM consumers higher up
the IO stack (e.g. ext4 and other filesystems).  So I'm cc'ing FS
development lists, if they don't care now they will at some point.

Acked-by: Mike Snitzer <snitzer@redhat.com>

       reply	other threads:[~2010-07-02 17:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.64.1007021107420.7296@hs20-bc2-1.build.redhat.com>
     [not found] ` <Pine.LNX.4.64.1007021112340.7296@hs20-bc2-1.build.redhat.com>
     [not found]   ` <Pine.LNX.4.64.1007021117580.7296@hs20-bc2-1.build.redhat.com>
     [not found]     ` <Pine.LNX.4.64.1007021118340.7296@hs20-bc2-1.build.redhat.com>
2010-07-02 17:50       ` Mike Snitzer [this message]
     [not found]       ` <Pine.LNX.4.64.1007021119070.7296@hs20-bc2-1.build.redhat.com>
     [not found]         ` <20100702181430.GD26916@redhat.com>
2010-07-02 19:49           ` [PATCH 4/4] Support discard if at least one underlying device supports it Mikulas Patocka
2010-07-02 20:00             ` Mikulas Patocka
2010-07-02 20:08               ` GFP_KERNEL in ext4 (was: [PATCH 4/4] Support discard if at least one underlying device supports it) Mikulas Patocka
2010-07-06 16:11                 ` [PATCH] disallow FS recursion from sb_issue_discard allocation Mike Snitzer
2010-07-27 13:44                   ` Ted Ts'o
2010-07-27 15:33                     ` Mike Snitzer
2010-07-28 18:12                       ` Jens Axboe
2010-07-28 23:15                         ` Ted Ts'o
2010-07-02 20:47               ` [PATCH 4/4] Support discard if at least one underlying device supports it Mike Snitzer
2010-07-02 20:54                 ` Alasdair G Kergon
2010-07-05  7:03                 ` Dmitry Monakhov
2010-07-05 11:32                 ` Mikulas Patocka
2010-07-02 20:29             ` Mike Snitzer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100702175037.GA26916@redhat.com \
    --to=snitzer@redhat.com \
    --cc=agk@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=mpatocka@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).