linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@dilger.ca>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Dmitry Monakhov <dmonakhov@openvz.org>,
	linux-kernel@vger.kernel.org,
	ext4 development <linux-ext4@vger.kernel.org>,
	"Theodore Ts'o" <tytso@mit.edu>,
	Al Viro <viro@ZenIV.linux.org.uk>,
	Michael Kerrisk <mtk.manpages@gmail.com>
Subject: Re: [PATCH] fs: make generic_block_fiemap sig-tolerant PING2...
Date: Fri, 19 Dec 2014 16:38:55 -0700	[thread overview]
Message-ID: <6ACCC57E-556A-46A9-9758-EA42282A35E8@dilger.ca> (raw)
In-Reply-To: <20141219133339.5c8afaa0c47760e9b141df49@linux-foundation.org>

On Dec 19, 2014, at 2:33 PM, Andrew Morton <akpm@linux-foundation.org> wrote:
> 
> On Fri, 19 Dec 2014 12:13:50 +0300 Dmitry Monakhov <dmonakhov@openvz.org> 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






      reply	other threads:[~2014-12-19 23:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-17 13:24 [PATCH] fs: make generic_block_fiemap sig-tolerant Dmitry Monakhov
2014-12-02 14:43 ` [PATCH] fs: make generic_block_fiemap sig-tolerant PING Dmitry Monakhov
2014-12-10 13:49   ` [PATCH] fs: make generic_block_fiemap sig-tolerant PING2 Dmitry Monakhov
2014-12-18 23:12     ` Andrew Morton
2014-12-19  9:13       ` Dmitry Monakhov
2014-12-19 21:33         ` Andrew Morton
2014-12-19 23:38           ` Andreas Dilger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6ACCC57E-556A-46A9-9758-EA42282A35E8@dilger.ca \
    --to=adilger@dilger.ca \
    --cc=akpm@linux-foundation.org \
    --cc=dmonakhov@openvz.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    --cc=tytso@mit.edu \
    --cc=viro@ZenIV.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).