login
Login
/
Register
Search
Header Space
Forums
News
Jobs
Blogs
Features
Man Pages
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
May
»
29
Re: [PATCH-v2] JBD: Fix race between free buffer and commit trasanction
view
thread
Score:
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From:
Mingming Cao <cmm@...>
To: Jan Kara <jack@...>
Cc: Andrew Morton <akpm@...>, <pbadari@...>, <linux-ext4@...>, <linux-kernel@...>, Jens Axboe <jens.axboe@...>
Subject:
Re: [PATCH-v2] JBD: Fix race between free buffer and commit trasanction
Date: Wednesday, May 28, 2008 - 8:15 pm
On Wed, 2008-05-28 at 20:55 +0200, Jan Kara wrote:
quoted text
> On Wed 28-05-08 11:18:59, Mingming Cao wrote:
quoted text
> > @@ -1682,9 +1712,11 @@ out: > > * journal_try_to_free_buffer() is changing its state. But that > > * cannot happen because we never reallocate freed data as metadata > > * while the data is part of a transaction. Yes? > > + * > > + * Return 0 on failure, 1 on success > > */ > > int journal_try_to_free_buffers(journal_t *journal, > > - struct page *page, gfp_t unused_gfp_mask) > > + struct page *page, gfp_t gfp_mask) > > { > > struct buffer_head *head; > > struct buffer_head *bh; > > @@ -1713,7 +1745,28 @@ int journal_try_to_free_buffers(journal_ > > if (buffer_jbd(bh)) > > goto busy; > > } while ((bh = bh->b_this_page) != head); > > + > > ret = try_to_free_buffers(page); > > + > > + /* > > + * There are a number of places where journal_try_to_free_buffers() > > + * could race with journal_commit_transaction(), the later still > > + * holds the reference to the buffers to free while processing them. > > + * try_to_free_buffers() failed to free those buffers. Some of the > > + * caller of releasepage() request page buffers to be dropped, otherwise > > + * treat the fail-to-free as errors (such as generic_file_direct_IO()) > > + * > > + * So, if the caller of try_to_release_page() wants the synchronous > > + * behaviour(i.e make sure buffers are dropped upon return), > > + * let's wait for the current transaction to finish flush of > > + * dirty data buffers, then try to free those buffers again, > > + * with the journal locked. > > + */ > > + if (ret == 0 && (gfp_mask & GFP_KERNEL == GFP_KERNEL)) { > I think Andrew prefered this test to be expanded but otherwise the patch > is fine now. You can add: > Acked-by: Jan Kara <jack@suse.cz> >
Okay, I will update the patch and cleanup the history, sent it to Andrew. Thanks. Mingming --
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:
[RFC] JBD ordered mode rewrite
, Jan Kara
, (Thu Mar 6, 1:42 pm)
Possible race between direct IO and JBD?
, Mingming Cao
, (Fri Apr 25, 7:38 pm)
Re: Possible race between direct IO and JBD?
, Jan Kara
, (Mon Apr 28, 8:26 am)
Re: Possible race between direct IO and JBD?
, Badari Pulavarty
, (Mon Apr 28, 1:11 pm)
Re: Possible race between direct IO and JBD?
, Jan Kara
, (Mon Apr 28, 2:09 pm)
Re: Possible race between direct IO and JBD?
, Mingming Cao
, (Mon Apr 28, 3:09 pm)
Re: Possible race between direct IO and JBD?
, Jan Kara
, (Tue Apr 29, 8:43 am)
[PATCH] jbd_commit_transaction() races with journal_try_to_d...
, Badari Pulavarty
, (Thu May 1, 11:16 am)
Re: [PATCH] jbd_commit_transaction() races with journal_try_...
, Jan Kara
, (Mon May 5, 1:06 pm)
Re: [PATCH] jbd_commit_transaction() races with journal_try_...
, Mingming Cao
, (Fri May 9, 6:27 pm)
Re: [PATCH] jbd_commit_transaction() races with journal_try_...
, Jan Kara
, (Mon May 12, 11:54 am)
Re: [PATCH] jbd_commit_transaction() races with journal_try_...
, Mingming Cao
, (Mon May 12, 8:39 pm)
Re: [PATCH] jbd_commit_transaction() races with journal_try_...
, Jan Kara
, (Tue May 13, 10:54 am)
Re: [PATCH] jbd_commit_transaction() races with journal_try_...
, Mingming Cao
, (Tue May 13, 6:23 pm)
Re: [PATCH] jbd_commit_transaction() races with journal_try_...
, Jan Kara
, (Wed May 14, 1:08 pm)
Re: [PATCH] jbd_commit_transaction() races with journal_try_...
, Mingming Cao
, (Wed May 14, 1:41 pm)
Re: [PATCH] jbd_commit_transaction() races with journal_try_...
, Jan Kara
, (Wed May 14, 2:14 pm)
[PATCH] Fix DIO EIO error caused by race between jbd_commit_...
, Mingming Cao
, (Fri May 16, 10:14 am)
Re: [PATCH] Fix DIO EIO error caused by race between jbd_com...
, Badari Pulavarty
, (Fri May 16, 1:12 pm)
[PATCH] JBD2: Fix DIO EIO error caused by race between free ...
, Mingming Cao
, (Fri May 16, 5:01 pm)
[PATCH] JBD: Fix DIO EIO error caused by race between free b...
, Mingming Cao
, (Fri May 16, 5:01 pm)
Re: [PATCH] JBD: Fix DIO EIO error caused by race between fr...
, Jan Kara
, (Sun May 18, 6:37 pm)
Re: [PATCH] JBD: Fix DIO EIO error caused by race between fr...
, Mingming Cao
, (Mon May 19, 3:59 pm)
Re: [PATCH] JBD: Fix DIO EIO error caused by race between fr...
, Andrew Morton
, (Mon May 19, 4:25 pm)
Re: [PATCH] JBD: Fix DIO EIO error caused by race between fr...
, Mingming Cao
, (Mon May 19, 6:07 pm)
[PATCH -v2] JBD2: Fix race between journal free buffer and c...
, Mingming Cao
, (Tue May 20, 2:03 pm)
[PATCH-v2] JBD: Fix race between free buffer and commit tras...
, Mingming Cao
, (Tue May 20, 2:02 pm)
[PATCH 2/2][TAKE3] JBD2: Fix race between free buffer and co...
, Mingming
, (Wed May 21, 7:39 pm)
[PATCH 1/2][TAKE3] JBD: Fix race between free buffer and com...
, Mingming
, (Wed May 21, 7:38 pm)
Re: [PATCH 1/2][TAKE3] JBD: Fix race between free buffer and...
, Andrew Morton
, (Thu May 22, 1:57 am)
Re: [PATCH-v2] JBD: Fix race between free buffer and commit ...
, Jan Kara
, (Tue May 20, 7:53 pm)
Re: [PATCH-v2] JBD: Fix race between free buffer and commit ...
, Mingming
, (Wed May 21, 1:14 pm)
Re: [PATCH-v2] JBD: Fix race between free buffer and commit ...
, Jan Kara
, (Sat May 24, 6:44 pm)
Re: [PATCH-v2] JBD: Fix race between free buffer and commit ...
, Mingming Cao
, (Wed May 28, 2:18 pm)
Re: [PATCH-v2] JBD: Fix race between free buffer and commit ...
, Jan Kara
, (Wed May 28, 2:55 pm)
[PATCH][take 5] JBD: Fix race between free buffer and commit...
, Mingming Cao
, (Wed May 28, 8:16 pm)
[PATCH][take 5] JBD2: Fix race between free buffer and commi...
, Mingming Cao
, (Wed May 28, 8:18 pm)
Re: [PATCH][take 5] JBD2: Fix race between free buffer and c...
, Aneesh Kumar K.V
, (Fri May 30, 2:24 am)
Re: [PATCH][take 5] JBD2: Fix race between free buffer and c...
, Mingming Cao
, (Fri May 30, 11:17 am)
Re: [PATCH-v2] JBD: Fix race between free buffer and commit ...
, Mingming Cao
, (Wed May 28, 8:15 pm)
Re: [PATCH] JBD: Fix DIO EIO error caused by race between fr...
, Jens Axboe
, (Tue May 20, 5:30 am)
Re: [PATCH] JBD: Fix DIO EIO error caused by race between fr...
, Mingming Cao
, (Tue May 20, 1:47 pm)
Re: [PATCH] Fix DIO EIO error caused by race between jbd_com...
, Josef Bacik
, (Fri May 16, 11:01 am)
Re: [PATCH] Fix DIO EIO error caused by race between jbd_com...
, Mingming Cao
, (Fri May 16, 1:11 pm)
Re: [PATCH] Fix DIO EIO error caused by race between jbd_com...
, Badari Pulavarty
, (Fri May 16, 1:17 pm)
Re: [PATCH] Fix DIO EIO error caused by race between jbd_com...
, Mingming Cao
, (Fri May 16, 1:30 pm)
Re: [PATCH] jbd_commit_transaction() races with journal_try_...
, Mingming Cao
, (Fri May 16, 10:13 am)
Re: [PATCH] jbd_commit_transaction() races with journal_try_...
, Mingming Cao
, (Tue May 13, 12:37 pm)
Re: [PATCH] jbd_commit_transaction() races with journal_try_...
, Mingming Cao
, (Mon May 12, 3:23 pm)
Re: [PATCH] jbd_commit_transaction() races with journal_try_...
, Jan Kara
, (Tue May 13, 10:20 am)
Re: [PATCH] jbd_commit_transaction() races with journal_try_...
, Badari Pulavarty
, (Mon May 5, 8:10 pm)
Re: [PATCH] jbd_commit_transaction() races with journal_try_...
, Mingming Cao
, (Mon May 5, 1:53 pm)
Re: [PATCH] jbd_commit_transaction() races with journal_try_...
, Mingming Cao
, (Thu May 1, 6:08 pm)
Re: Possible race between direct IO and JBD?
, Mingming Cao
, (Tue Apr 29, 1:49 pm)
Re: Possible race between direct IO and JBD?
, Andrew Morton
, (Sat Apr 26, 6:41 am)
Re: [RFC] JBD ordered mode rewrite
, Andreas Dilger
, (Fri Mar 7, 7:52 pm)
Re: [RFC] JBD ordered mode rewrite
, Jan Kara
, (Mon Mar 10, 3:54 pm)
Re: [RFC] JBD ordered mode rewrite
, Andreas Dilger
, (Mon Mar 10, 5:37 pm)
Re: [RFC] JBD ordered mode rewrite
, Christoph Hellwig
, (Sat Mar 8, 8:14 am)
Re: [RFC] JBD ordered mode rewrite
, Mingming Cao
, (Fri Mar 7, 8:08 pm)
Re: [RFC] JBD ordered mode rewrite
, Mingming Cao
, (Fri Mar 7, 6:55 am)
Re: [RFC] JBD ordered mode rewrite
, Jan Kara
, (Mon Mar 10, 2:29 pm)
Re: [RFC] JBD ordered mode rewrite
, Mark Fasheh
, (Thu Mar 6, 9:34 pm)
Re: [RFC] JBD ordered mode rewrite
, Jan Kara
, (Mon Mar 10, 2:00 pm)
Re: [RFC] JBD ordered mode rewrite
, Andrew Morton
, (Thu Mar 6, 7:53 pm)
Re: [RFC] JBD ordered mode rewrite
, Jan Kara
, (Mon Mar 10, 1:38 pm)
Re: [RFC] JBD ordered mode rewrite
, Josef Bacik
, (Thu Mar 6, 3:05 pm)
Re: [RFC] JBD ordered mode rewrite
, Jan Kara
, (Mon Mar 10, 12:30 pm)
Navigation
Create content
Mailing list archives
Recent posts
Mail archive search
Enter your search terms.
all mailing lists
alsa-devel
dragonflybsd-bugs
dragonflybsd-commit
dragonflybsd-docs
dragonflybsd-kernel
dragonflybsd-submit
dragonflybsd-user
freebsd-announce
freebsd-bugs
freebsd-chat
freebsd-cluster
freebsd-current
freebsd-drivers
freebsd-embeded
freebsd-fs
freebsd-hackers
freebsd-hardware
freebsd-mobile
freebsd-net
freebsd-performance
freebsd-pf
freebsd-security
freebsd-security-notifications
freebsd-threads
git
git-commits-head
linux-activists
linux-arm
linux-ath5k-devel
linux-btrfs
linux-c-programming
linux-driver-devel
linux-ext4
linux-fsdevel
linux-ia64
linux-input
linux-kernel
linux-kernel-janitors
linux-kernel-mentors
linux-kernel-newbies
linux-kvm
linux-net
linux-netdev
linux-newbie
linux-nfs
linux-raid
linux-scsi
linux-security-module
linux-sparse
linux-usb
linux-usb-devel
madwifi-devel
netbsd-announce
netbsd-tech-kern
openbsd-announce
openbsd-bugs
openbsd-ipv6
openbsd-misc
openbsd-security-announce
openbsd-smp
openbsd-source-changes
openbsd-tech
openfabrics-general
openmoko-community
openmoko-devel
openmoko-kernel
reiserfs-devel
tux3
ucarp
Optionally limit your search to a specific mailing list.
advanced
Popular discussions
linux-kernel
:
Nigel Cunningham
Re: [Suspend2-devel] Re: CFS and suspend2: hang in atomic copy
Bart Van Assche
Integration of SCST in the mainstream Linux kernel
Greg Kroah-Hartman
[PATCH 005/196] Chinese: add translation of SubmittingDrivers
Rafael J. Wysocki
[Bug #10821] rt25xx: lock dependency warning, association failure, and kmalloc cor...
git
:
Martin Langhoff
Re: Change set based shallow clone
Karl
[StGIT PATCH] Don't use patches/<branch>/current
Andrew Morton
Untracked working tree files
Jon Smirl
! [rejected] master -> master (non-fast forward)
openbsd-misc
:
Richard Stallman
Real men don't attack straw men
askthelist
Packets Per Second Limit?
GVG GVG
ssh_exchange_identification: Connection closed by remote host
Renaud Allard
Spamd default behaviour of accepting everything
linux-netdev
:
Simon Horman
Re: [PATCHv2 RFC 05/25] IPVS: Add internal versions of sockopt interface structs
Lennert Buytenhek
[PATCH 08/39] mv643xx_eth: nuke port status register bit defines
Jiri Bohac
PATCH: fix bridged 802.3ad bonding
Natalie Protasevich
[BUG] New Kernel Bugs
Latest forum posts
make bzImage
8 hours ago
Linux kernel
make bzImage
9 hours ago
Linux kernel
collectl: the one performance monitoring tool for all your needs
11 hours ago
Linux general
Replacing Windows XP bootloader with GRUB bootloader
14 hours ago
Linux general
Anybody know where I can find an embedded sw engineer with good experience in digital video products???
16 hours ago
Windows
Problem in Inserting a module
19 hours ago
Linux kernel
stop process from getting scheduled out
1 day ago
Linux kernel
register_security LSM
1 day ago
Linux kernel
Process activity notification
1 day ago
Linux kernel
How to make my PCIE ATA storage device running in Linux
1 day ago
Linux general
Show all forums...
Recent Tags
more tags
Colocation donated by:
Who's online
There are currently
5 users
and
877 guests
online.
Online users
Jeremy
strcmp
catfeeder
Mr_Z
kingneutron
Syndicate
speck-geostationary