Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752652AbaLSXjA (ORCPT ); Fri, 19 Dec 2014 18:39:00 -0500 Received: from mail-pd0-f169.google.com ([209.85.192.169]:40070 "EHLO mail-pd0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751355AbaLSXi6 convert rfc822-to-8bit (ORCPT ); Fri, 19 Dec 2014 18:38:58 -0500 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: [PATCH] fs: make generic_block_fiemap sig-tolerant PING2... From: Andreas Dilger In-Reply-To: <20141219133339.5c8afaa0c47760e9b141df49@linux-foundation.org> Date: Fri, 19 Dec 2014 16:38:55 -0700 Cc: Dmitry Monakhov , linux-kernel@vger.kernel.org, ext4 development , "Theodore Ts'o" , Al Viro , Michael Kerrisk Content-Transfer-Encoding: 8BIT Message-Id: <6ACCC57E-556A-46A9-9758-EA42282A35E8@dilger.ca> References: <1413552269-32203-1-git-send-email-dmonakhov@openvz.org> <871toikt7c.fsf@openvz.org> <87zjavehsx.fsf@openvz.org> <20141218151247.b6ccd73351f40db66818c07e@linux-foundation.org> <87egrwf1dd.fsf@openvz.org> <20141219133339.5c8afaa0c47760e9b141df49@linux-foundation.org> To: Andrew Morton X-Mailer: Apple Mail (2.1993) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Dec 19, 2014, at 2:33 PM, Andrew Morton wrote: > > On Fri, 19 Dec 2014 12:13:50 +0300 Dmitry Monakhov wrote: > >> --- a/Documentation/filesystems/fiemap.txt >> +++ b/Documentation/filesystems/fiemap.txt >> @@ -196,7 +196,8 @@ struct fiemap_extent_info { >> }; >> >> It is intended that the file system should not need to access any of this >> -structure directly. >> +structure directly. Filesystem handlers should be tolerant to signals and return >> +EINTR once fatal signal received. > > Thanks. I was concerned about userspace effects and back-compatibility > issues, because I'd misread fatal_signal_pending() as signal_pending(). > > Because it uses fatal_signal_pending(), the effects of this change > should be indiscernible to userspace, yes? > > I'm now wondering if the above doc update is unneeded and incorrect. > Is it likely that the fs handler (fiemap_fill_next_extent) will ever > consume a large amount of time? If not then we can leave the logic in > __generic_block_fiemap() and not bother callees. > > > > The fix only addresses filesystems which use generic_block_fiemap(). > Presumably ocfs2, btrfs, nilfs2, lustre and xfs remain vulnerable to > the problem you identified? I don't think they are - those filesystems generate the FIEMAP mapping by walking the extent tree directly, while the "compat" code for block based filesystems are (or were) essentially walking every possible block offset to see if there was anything mapped at that position. Cheers, Andreas -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/