From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 4 Oct 2017 09:06:00 +0200 From: Christoph Hellwig To: Bart Van Assche Cc: Jens Axboe , linux-block@vger.kernel.org, Christoph Hellwig , "Martin K . Petersen" , =Oleksandr Natalenko , "Luis R . Rodriguez" , Ming Lei , Hannes Reinecke , Johannes Thumshirn Subject: Re: [PATCH v5 7/8] scsi: Set QUEUE_FLAG_PREEMPT_ONLY while quiesced Message-ID: <20171004070600.GE20879@lst.de> References: <20171002225218.18548-1-bart.vanassche@wdc.com> <20171002225218.18548-8-bart.vanassche@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <20171002225218.18548-8-bart.vanassche@wdc.com> List-ID: > + /* > + * Ensure that the effect of blk_set_preempt_only() is globally > + * visible before unfreezing the queue. > + */ > + if (err == 0) > + synchronize_rcu(); I don't understand why we'd need this. The flag is set both under a spinlock and a mutex that are unlocked right after. That should gurantee all the visibility we'll need.