All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Gaughen <mgaughen@polyserve.com>
To: Chris Mason <mason@suse.com>
Cc: Michael Gaughen <mgaughen@polyserve.com>, reiserfs-list@namesys.com
Subject: Re: BUG in reiserfs_write_full_page().
Date: Mon, 21 Jul 2003 14:24:44 -0700	[thread overview]
Message-ID: <3F1C5A1C.4070607@polyserve.com> (raw)
In-Reply-To: <3F183F99.7080405@polyserve.com>

Michael Gaughen wrote:

> Chris Mason wrote:
>
>> On Fri, 2003-07-18 at 09:45, Nikita Danilov wrote:
>>  
>>
>>> > > But, we shouldn't have to.  Other parts of the OS should be 
>>> protecting
>>> > us from a writepage being called at this time, which is why the 
>>> bug is
>>> > there.  Someone did a non GFP_NOFS allocation with a transaction
>>>
>>> __bread()->__getblk()->__find_get_block()->find_get_page() allocates
>>> page with bdev->bd_inode->i_mapping->gfp_flags, which is GFP_USER, that
>>> includes GFP_FS.
>>>   
>>
>>
>> You're in 2.5 land ;-)  There seem to be a few problems there, I've got
>> an oops in find_inode and a deadlock under load, but I still need to
>> read the (huge) sysrq-t to figure things out.
>>
>
> But, in 2.4, the page fault handling code also gets the gfp_mask from 
> the inode's
> address_space gfp_mask (in ->page_cache_read()->page_cache_alloc()).  
> It looks
> like clean_inode() sets the gfp_mask to GFP_HIGHUSER, which also includes
> GFP_FS, and unless I am missing something, I don't see that GFP_FS is 
> ever
> cleared in this case. 


And to take this a step further (if what I described is indeed the 
problem),
GFP_NOFS could be cleared, in inode->i_mapping->gfp_mask, inside of
reiserfs_read_inode2() and reiserfs_new_inode().  Then you don't have to
rely on the core kernel for protection, and you truly guarantee that write-
page will not be called in this case.  Does that sound reasonable?

-Mike


      reply	other threads:[~2003-07-21 21:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-17 21:19 BUG in reiserfs_write_full_page() Michael Gaughen
2003-07-17 21:33 ` Chris Mason
2003-07-17 21:53   ` Michael Gaughen
2003-07-18 13:23     ` Chris Mason
2003-07-18 13:45       ` Nikita Danilov
2003-07-18 14:00         ` Chris Mason
2003-07-18 18:42           ` Michael Gaughen
2003-07-21 21:24             ` Michael Gaughen [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=3F1C5A1C.4070607@polyserve.com \
    --to=mgaughen@polyserve.com \
    --cc=mason@suse.com \
    --cc=reiserfs-list@namesys.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.