From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753986Ab1H2PLN (ORCPT ); Mon, 29 Aug 2011 11:11:13 -0400 Received: from mail.ss.pku.edu.cn ([211.101.48.138]:38647 "EHLO mail.ss.pku.edu.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753872Ab1H2PLJ (ORCPT ); Mon, 29 Aug 2011 11:11:09 -0400 MIME-Version: 1.0 In-Reply-To: References: Date: Mon, 29 Aug 2011 23:11:03 +0800 Message-ID: Subject: Re: blkdev_issue_discard() hangs forever if the underlying storage device is removed From: Lin Ming To: Lukas Czerner Cc: Bart Van Assche , Jens Axboe , Mike Snitzer , LKML Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 29, 2011 at 10:42 PM, Lukas Czerner wrote: > On Mon, 29 Aug 2011, Lin Ming wrote: > >> On Mon, Aug 29, 2011 at 7:56 PM, Lukas Czerner wrote: >> > >> > Regarding the atomic operations I do not think that implicit memory >> > barriers are needed here as atomic_dec_and_test() implies memory >> >> Which implicit memory barrier you are talking about? > > smp_mb() at both side of the operation as documented here in > Documentation/memory-barriers.txt Thanks for the info. But I don't follow you ... why that implicit memory barriers are NOT needed?