From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jens Axboe Subject: Re: [PATCH 0/7] Discard requests, v2 Date: Tue, 12 Aug 2008 14:53:16 +0200 Message-ID: <20080812125315.GH20055@kernel.dk> References: <1218299181.26926.88.camel@pmac.infradead.org> <20080812091446.GF20055@kernel.dk> <1218535205.2977.131.camel@pmac.infradead.org> <20080812105428.GG20055@kernel.dk> <1218539797.2977.147.camel@pmac.infradead.org> <1218543544.2977.158.camel@pmac.infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Andrew Morton , Ric Wheeler , linux-fsdevel@vger.kernel.org, gilad@codefidence.com, matthew@wil.cx To: David Woodhouse Return-path: Received: from brick.kernel.dk ([87.55.233.238]:13579 "EHLO kernel.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752175AbYHLMxS (ORCPT ); Tue, 12 Aug 2008 08:53:18 -0400 Content-Disposition: inline In-Reply-To: <1218543544.2977.158.camel@pmac.infradead.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, Aug 12 2008, David Woodhouse wrote: > On Tue, 2008-08-12 at 12:16 +0100, David Woodhouse wrote: > > There's a check in __make_request() which will return -EOPNOTSUPP for > > bios with BIO_RW_BARRIER set, in some circumstances. Is that OK too? > > A: No, it breaks submission of DISCARD|BARRIER requests. And I have to > change blk_empty_barrier() to explicitly omit discards too, to avoid the > check at line 1419 (in __generic_make_request()) returning -EOPNOTSUPP > before we even get there. > > Using BIO_RW_BARRIER seems conceptually cleaner, but in practice it's > messier. I think this version will work, but I'm inclined to prefer the > previous one I posted, using the R/W bit. Or just match the check before -EOPNOTSUPP with bio_has_data(), since it only applies to a barrier that carries data. -- Jens Axboe