From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from kanga.kvack.org ([205.233.56.17]:33484 "EHLO kanga.kvack.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752356AbcAGQYL (ORCPT ); Thu, 7 Jan 2016 11:24:11 -0500 Date: Thu, 7 Jan 2016 11:24:10 -0500 From: Benjamin LaHaise To: Jan Kara Cc: Al Viro , linux-aio@kvack.org, linux-fsdevel@vger.kernel.org, Dmitry Monakhov Subject: Re: [PATCH] aio: Fix freeze protection of aio writes Message-ID: <20160107162409.GN4439@kvack.org> References: <1452178984-17540-1-git-send-email-jack@suse.cz> <20160107150705.GJ4439@kvack.org> <20160107151552.GA9828@quack.suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160107151552.GA9828@quack.suse.cz> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, Jan 07, 2016 at 04:15:52PM +0100, Jan Kara wrote: > On Thu 07-01-16 10:07:05, Benjamin LaHaise wrote: ... > > Why isn't this code placed in file_start_write() and file_end_write()? > > That makes more sense to me than sprinkling it in the aio code. > > Well, that would completely defeat the purpose of lockdep annotations for > fs freeze protection - we want lockdep to treat file_start_write() - > file_end_write() pair as a lock-unlock pair. But in case of AIO the unlock > will happen from a different process than lock and lockdep cannot handle > such cases. That's why for AIO we have to add some lockdep magic to avoid > false warnings. Okay, makes sense. Applied. I'll forward that with the other fix that is pending. -ben -- "Thought is the essence of where you are now."