login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
October
»
23
Re: [PATCH] reiserfs: don't drop PG_dirty when releasing sub-page-sized dirty file
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Maxim Levitsky
Subject:
Re: [PATCH] reiserfs: don't drop PG_dirty when releasing sub-page-sized dirty file
Date: Tuesday, October 23, 2007 - 3:17 am
On Tuesday 23 October 2007 09:55:14 Fengguang Wu wrote:
quoted text
> This is not a new problem in 2.6.23-git17. > 2.6.22/2.6.23 is buggy in the same way. > > Reiserfs could leave newly created sub-page-size files in dirty state > for ever. They cannot be synced to disk by pdflush routines or > explicit `sync' commands. Only `umount' can do the trick. > > The direct cause is: the dirty page's PG_dirty is wrongly _cleared_. > Call trace: > [<ffffffff8027e920>] cancel_dirty_page+0xd0/0xf0 > [<ffffffff8816d470>] :reiserfs:reiserfs_cut_from_item+0x660/0x710 > [<ffffffff8816d791>] :reiserfs:reiserfs_do_truncate+0x271/0x530 > [<ffffffff8815872d>] :reiserfs:reiserfs_truncate_file+0xfd/0x3b0 > [<ffffffff8815d3d0>] :reiserfs:reiserfs_file_release+0x1e0/0x340 > [<ffffffff802a187c>] __fput+0xcc/0x1b0 > [<ffffffff802a1ba6>] fput+0x16/0x20 > [<ffffffff8029e676>] filp_close+0x56/0x90 > [<ffffffff8029fe0d>] sys_close+0xad/0x110 > [<ffffffff8020c41e>] system_call+0x7e/0x83 > > Fix the bug by removing the cancel_dirty_page() call. Tests show that > it causes no bad behaviors on various write sizes. > > > === for the patient === > Here are more detailed demonstrations of the problem. > > 1) the page has both PG_dirty(D)/PAGECACHE_TAG_DIRTY(d) after being written to; > and then only PAGECACHE_TAG_DIRTY(d) remains after the file is closed. > > ------------------------------ screen 0 ------------------------------ > [T0] root /home/wfg# cat > /test/tiny > [T1] hi > [T2] root /home/wfg# > > ------------------------------ screen 1 ------------------------------ > [T1] root /home/wfg# echo /test/tiny > /proc/filecache > [T1] root /home/wfg# cat /proc/filecache > # file /test/tiny > # flags R:referenced A:active M:mmap U:uptodate D:dirty W:writeback O:owner B:buffer d:dirty w:writeback > # idx len state refcnt > 0 1 ___UD__Bd_ 2 > [T2] root /home/wfg# cat /proc/filecache > # file /test/tiny > # flags R:referenced A:active M:mmap U:uptodate D:dirty W:writeback O:owner B:buffer d:dirty w:writeback > # idx len state refcnt > 0 1 ___U___Bd_ 2 > > 2) note the non-zero 'cancelled_write_bytes' after /tmp/hi is copied. > > ------------------------------ screen 0 ------------------------------ > [T0] root /home/wfg# echo hi > /tmp/hi > [T1] root /home/wfg# cp /tmp/hi /dev/stdin /test > [T2] hi > [T3] root /home/wfg# > > ------------------------------ screen 1 ------------------------------ > [T1] root /proc/4397# cd /proc/`pidof cp` > [T1] root /proc/4713# cat io > rchar: 8396 > wchar: 3 > syscr: 20 > syscw: 1 > read_bytes: 0 > write_bytes: 20480 > cancelled_write_bytes: 4096 > [T2] root /proc/4713# cat io > rchar: 8399 > wchar: 6 > syscr: 21 > syscw: 2 > read_bytes: 0 > write_bytes: 24576 > cancelled_write_bytes: 4096 > > //Question: the 'write_bytes' is a bit more than expected ;-) > > Cc: Maxim Levitsky <maximlevitsky@gmail.com> > Cc: Peter Zijlstra <peterz@infradead.org> > Signed-off-by: Fengguang Wu <wfg@mail.ustc.edu.cn> > --- > fs/reiserfs/stree.c | 3 --- > 1 file changed, 3 deletions(-) > > --- linux-2.6.24-git17.orig/fs/reiserfs/stree.c > +++ linux-2.6.24-git17/fs/reiserfs/stree.c > @@ -1458,9 +1458,6 @@ static void unmap_buffers(struct page *p > } > bh = next; > } while (bh != head); > - if (PAGE_SIZE == bh->b_size) { > - cancel_dirty_page(page, PAGE_CACHE_SIZE); > - } > } > } > } > >
One thing to say... Works perfectly! Big thanks for fixing that bug. Best regards, Maxim Levitsky -
unsubscribe notice
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/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
100% iowait on one of cpus in current -git
, Maxim Levitsky
, (Sun Oct 21, 11:22 pm)
Re: 100% iowait on one of cpus in current -git
, Paolo Ornati
, (Mon Oct 22, 2:11 am)
Re: 100% iowait on one of cpus in current -git
, Peter Zijlstra
, (Mon Oct 22, 2:41 am)
Re: 100% iowait on one of cpus in current -git
, Maxim Levitsky
, (Mon Oct 22, 2:43 am)
Re: 100% iowait on one of cpus in current -git
, Maxim Levitsky
, (Mon Oct 22, 2:59 am)
Re: 100% iowait on one of cpus in current -git
, Peter Zijlstra
, (Mon Oct 22, 3:22 am)
Re: 100% iowait on one of cpus in current -git
, Maxim Levitsky
, (Mon Oct 22, 3:40 am)
Re: 100% iowait on one of cpus in current -git
, Fengguang Wu
, (Mon Oct 22, 3:55 am)
Re: 100% iowait on one of cpus in current -git
, Maxim Levitsky
, (Mon Oct 22, 3:58 am)
Re: 100% iowait on one of cpus in current -git
, Fengguang Wu
, (Mon Oct 22, 4:19 am)
Re: 100% iowait on one of cpus in current -git
, Maxim Levitsky
, (Mon Oct 22, 5:21 am)
Re: 100% iowait on one of cpus in current -git
, Fengguang Wu
, (Mon Oct 22, 5:37 am)
Re: 100% iowait on one of cpus in current -git
, Maxim Levitsky
, (Mon Oct 22, 6:05 am)
Re: 100% iowait on one of cpus in current -git
, Fengguang Wu
, (Mon Oct 22, 6:10 am)
Re: 100% iowait on one of cpus in current -git
, Maxim Levitsky
, (Mon Oct 22, 6:28 am)
[PATCH] reiserfs: don't drop PG_dirty when releasing sub-p ...
, Fengguang Wu
, (Tue Oct 23, 12:55 am)
Re: [PATCH] reiserfs: don't drop PG_dirty when releasing s ...
, Peter Zijlstra
, (Tue Oct 23, 3:07 am)
Re: [PATCH] reiserfs: don't drop PG_dirty when releasing s ...
, Maxim Levitsky
, (Tue Oct 23, 3:17 am)
Re: [PATCH] reiserfs: don't drop PG_dirty when releasing s ...
, Fengguang Wu
, (Tue Oct 23, 4:56 am)
Re: [PATCH] reiserfs: don't drop PG_dirty when releasing s ...
, Chris Mason
, (Tue Oct 23, 7:10 am)
Re: [PATCH] reiserfs: don't drop PG_dirty when releasing s ...
, Fengguang Wu
, (Tue Oct 23, 7:40 am)
Re: [PATCH] reiserfs: don't drop PG_dirty when releasing s ...
, Fengguang Wu
, (Tue Oct 23, 7:41 am)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Mathieu Desnoyers
[PATCH 01/10] local_t : architecture independant extension
Ingo Molnar
Re: 2.6.20-rc6-mm3
monstr
[PATCH 46/56] microblaze_v2: headers files entry.h current.h mman.h registers.h se...
alan
Re: Versioning file system
Jan Engelhardt
Re: Linux Security *Module* Framework (Was: LSM conversion to static interface)
git
:
Andy Parkins
git-fetch fails with error code 128
Johannes Sixt
Re: [PATCH v2 04/13] Teach rebase interactive the mark command
Yakov Lerner
Re: Autoconf/Automake
Miklos Vajna
Re: [IRC/patches] Failed octopus merge does not clean up
Johannes Sixt
Re: [msysGit] [PATCH 01/12] Fake reencoding success under NO_ICONV instead of retu...
linux-netdev
:
jamal
[net-next-2.6 PATCH 1/7] xfrm: introduce basic mark infrastructure
jamal
[net-next-2.6 PATCH 0/7] xfrm by MARK
Timo Teräs
ip xfrm policy semantics
Jeff Garzik
Re: [PATCH 1/5] sky2: phy setup changes
Ken-ichirou MATSUZAWA
Re: [PATCH] don't touch bridge sysfs in container.
git-commits-head
:
Linux Kernel Mailing List
No need to do lock_super() for exclusion in generic_shutdown_super()
Linux Kernel Mailing List
x86, msr: Export the register-setting MSR functions via /dev/*/msr
Linux Kernel Mailing List
MIPS: SMTC: Fix lockup in smtc_distribute_timer
Linux Kernel Mailing List
V4L/DVB (13840): smsusb: Add ISDB-T firmware for Hauppauge WinTV-Nova-T-MiniStick
Linux Kernel Mailing List
Input: gpio-keys - add support for disabling gpios through sysfs
openbsd-misc
:
Marco Peereboom
Re: Defending OpenBSD Performance
elitdostlar
Seks partneri arayan bayanlar bu adreste - 8878xs706x6438
Damon Schultz
Routing iTunes sharing across subnets using OpenBSD
Ashraf Cotu
Je sur comptable a la banque BCB je vais virée $6.million a la etranger
Chris Black
Re: carp, 2 router
Colocation donated by:
Syndicate