From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joe Thornber Subject: Re: [PATCH] dm-thin: don't send discards to shared blocks Date: Wed, 18 Jul 2012 13:15:22 +0100 Message-ID: <20120718121521.GA5986@ubuntu> References: Reply-To: device-mapper development Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: device-mapper development Cc: Mike Snitzer , "Alasdair G. Kergon" List-Id: dm-devel.ids Ack, but ... On Mon, Jul 16, 2012 at 06:39:33PM -0400, Mikulas Patocka wrote: > --- linux-3.5-rc6-fast.orig/drivers/md/dm-thin.c 2012-07-16 21:47:46.000000000 +0200 > +++ linux-3.5-rc6-fast/drivers/md/dm-thin.c 2012-07-17 00:35:25.000000000 +0200 > @@ -1259,7 +1259,10 @@ static void process_discard(struct thin_ > > cell_release_singleton(cell, bio); > cell_release_singleton(cell2, bio); > - remap_and_issue(tc, bio, lookup_result.block); > + if ((!lookup_result.shared) & pool->pf.discard_passdown) ... I'd rather a logical && there. - Joe