From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kara Subject: Re: [PATCH 1/2 v2] fs: Return EAGAIN when O_NONBLOCK write should block on frozen fs Date: Mon, 12 Nov 2012 11:45:31 +0100 Message-ID: <20121112104531.GA23297@quack.suse.cz> References: <1352378498-30625-1-git-send-email-jack@suse.cz> <20121112054243.GQ24575@dastard> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Jan Kara , Al Viro , linux-fsdevel@vger.kernel.org, dchinner@redhat.com To: Dave Chinner Return-path: Received: from cantor2.suse.de ([195.135.220.15]:56278 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750988Ab2KLKpe (ORCPT ); Mon, 12 Nov 2012 05:45:34 -0500 Content-Disposition: inline In-Reply-To: <20121112054243.GQ24575@dastard> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon 12-11-12 16:42:43, Dave Chinner wrote: > On Thu, Nov 08, 2012 at 01:41:37PM +0100, Jan Kara wrote: > > When user asks for O_NONBLOCK behavior for a file descriptor, return > > EAGAIN instead of blocking on a frozen filesystem. > > > > Signed-off-by: Jan Kara > > --- > > fs/btrfs/file.c | 3 ++- > > fs/cifs/file.c | 3 ++- > > fs/fuse/file.c | 3 ++- > > fs/ntfs/file.c | 3 ++- > > fs/ocfs2/file.c | 3 ++- > > fs/xfs/xfs_file.c | 3 ++- > > include/linux/fs.h | 10 ++++++++++ > > mm/filemap.c | 3 ++- > > 8 files changed, 24 insertions(+), 7 deletions(-) > > Looks good, though you missed generic_file_splice_write(). Shouldn't > this also return EAGAIN? Yes, it should. Thanks for spotting this. I've also noticed ocfs2 misses freeze protection in splice_write at all. I'll fix that in a separate patch and send v3. Honza -- Jan Kara SUSE Labs, CR