All of lore.kernel.org
 help / color / mirror / Atom feed
From: Edward Shishkin <edward.shishkin@gmail.com>
To: Mat <jackdachef@gmail.com>
Cc: reiserfs-devel@vger.kernel.org, Brandon Berhent <cheater1034@gmail.com>
Subject: Re: [BUG] reiser4-for-2.6.27
Date: Sun, 19 Oct 2008 22:41:52 +0400	[thread overview]
Message-ID: <48FB7F70.9090900@gmail.com> (raw)
In-Reply-To: <loom.20081019T090028-392@post.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 399 bytes --]

Mat wrote:
> Hi Edward,
>
> this one's the kernel-config for the second (posted) error:
>   

Yup, it seems to be a bug: reiser4_set_page_dirty_internal() didn't
take care about disabling preemption, while per-cpu stuff needs this.
I wonder why nobody did report it earlier. It requires CONFIG_PREEMPT=y
and CONFIG_DEBUG_PREEMPT=y though..

A possible fixup is attached.

Thank to everyone.
Edward.

[-- Attachment #2: reiser4-disable-preemption-in-set-page-dirty.patch --]
[-- Type: text/x-patch, Size: 694 bytes --]

---
 linux-2.6.27/fs/reiser4/page_cache.c |    2 ++
 1 file changed, 2 insertions(+)

--- linux-2.6.27/fs/reiser4/page_cache.c.orig
+++ linux-2.6.27/fs/reiser4/page_cache.c
@@ -469,10 +469,12 @@ void reiser4_set_page_dirty_internal(str
 	if (!TestSetPageDirty(page)) {
 		WARN_ON_ONCE(!PagePrivate(page) && !PageUptodate(page));
 		if (mapping_cap_account_dirty(mapping)) {
+			preempt_disable();
 			__inc_zone_page_state(page, NR_FILE_DIRTY);
 			__inc_bdi_stat(mapping->backing_dev_info,
 				       BDI_RECLAIMABLE);
 			task_io_account_write(PAGE_CACHE_SIZE);
+			preempt_enable();
 		}
 		assert("edward-1558", mapping->host != NULL);
 		__mark_inode_dirty(mapping->host, I_DIRTY_PAGES);

  reply	other threads:[~2008-10-19 18:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-19  9:02 [BUG] reiser4-for-2.6.27 Mat
2008-10-19 18:41 ` Edward Shishkin [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-10-23 12:14 Mat
2008-10-19  1:08 Brandon Berhent
2008-10-19  8:02 ` Edward Shishkin
2008-10-19  8:57 ` Christopher Sawtell
2008-10-19 18:53   ` Edward Shishkin

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=48FB7F70.9090900@gmail.com \
    --to=edward.shishkin@gmail.com \
    --cc=cheater1034@gmail.com \
    --cc=jackdachef@gmail.com \
    --cc=reiserfs-devel@vger.kernel.org \
    /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.