From: Frederic Weisbecker <fweisbec@gmail.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Chris Mason <chris.mason@oracle.com>,
Roland Dreier <rdreier@cisco.com>, Ingo Molnar <mingo@elte.hu>,
Andi Kleen <andi@firstfloor.org>, Jeff Mahoney <jeffm@suse.com>,
Alexander Beregalov <a.beregalov@gmail.com>,
Bron Gondwana <brong@fastmail.fm>,
Reiserfs <reiserfs-devel@vger.kernel.org>,
Al Viro <viro@zeniv.linux.org.uk>,
Andrea Gelmini <andrea.gelmini@gmail.com>,
"Trenton D. Adams" <trenton.d.adams@gmail.com>,
Thomas Meyer <thomas@m3y3r.de>,
Alessio Igor Bogani <abogani@texware.it>,
Marcel Hilzinger <mhilzinger@linuxnewmedia.de>,
Edward Shishkin <edward.shishkin@gmail.com>,
Laurent Riffard <laurent.riffard@free.fr>,
Thomas Gleixner <tglx@linutronix.de>
Subject: [PATCH 3/3] kill-the-bkl/reiserfs: drop the fs race watchdog from _get_block_create_0()
Date: Thu, 15 Oct 2009 00:26:07 +0200 [thread overview]
Message-ID: <1255559167-5554-4-git-send-email-fweisbec@gmail.com> (raw)
In-Reply-To: <1255559167-5554-1-git-send-email-fweisbec@gmail.com>
We had a watchdog in _get_block_create_0() that jumped to a fixup retry
path in case the bkl got relaxed while calling kmap().
This is not necessary anymore since we now have a reiserfs lock that is
not implicitly relaxed while sleeping.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jeff Mahoney <jeffm@suse.com>
Cc: Chris Mason <chris.mason@oracle.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Alexander Beregalov <a.beregalov@gmail.com>
Cc: Laurent Riffard <laurent.riffard@free.fr>
Cc: Thomas Gleixner <tglx@linutronix.de>
---
fs/reiserfs/inode.c | 11 ++---------
1 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c
index 965c8ea..0d493a3 100644
--- a/fs/reiserfs/inode.c
+++ b/fs/reiserfs/inode.c
@@ -251,7 +251,6 @@ static int _get_block_create_0(struct inode *inode, sector_t block,
struct cpu_key key;
struct buffer_head *bh;
struct item_head *ih, tmp_ih;
- int fs_gen;
b_blocknr_t blocknr;
char *p = NULL;
int chars;
@@ -265,7 +264,6 @@ static int _get_block_create_0(struct inode *inode, sector_t block,
(loff_t) block * inode->i_sb->s_blocksize + 1, TYPE_ANY,
3);
- research:
result = search_for_position_by_key(inode->i_sb, &key, &path);
if (result != POSITION_FOUND) {
pathrelse(&path);
@@ -340,7 +338,6 @@ static int _get_block_create_0(struct inode *inode, sector_t block,
}
// read file tail into part of page
offset = (cpu_key_k_offset(&key) - 1) & (PAGE_CACHE_SIZE - 1);
- fs_gen = get_generation(inode->i_sb);
copy_item_head(&tmp_ih, ih);
/* we only want to kmap if we are reading the tail into the page.
@@ -348,13 +345,9 @@ static int _get_block_create_0(struct inode *inode, sector_t block,
** sure we need to. But, this means the item might move if
** kmap schedules
*/
- if (!p) {
+ if (!p)
p = (char *)kmap(bh_result->b_page);
- if (fs_changed(fs_gen, inode->i_sb)
- && item_moved(&tmp_ih, &path)) {
- goto research;
- }
- }
+
p += offset;
memset(p, 0, inode->i_sb->s_blocksize);
do {
--
1.6.2.3
prev parent reply other threads:[~2009-10-14 22:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-14 22:26 [PATCH 0/3] reiserfs/kill-bkl: Ioctl path fixes and unlocked_ioctl conversion Frederic Weisbecker
2009-10-14 22:26 ` [PATCH 1/3] kill-the-bkl/reiserfs: always lock the ioctl path Frederic Weisbecker
2009-10-14 22:26 ` [PATCH 2/3] kill-the-bkl/reiserfs: definitely drop the bkl from reiserfs_ioctl() Frederic Weisbecker
2009-10-14 22:26 ` Frederic Weisbecker [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=1255559167-5554-4-git-send-email-fweisbec@gmail.com \
--to=fweisbec@gmail.com \
--cc=a.beregalov@gmail.com \
--cc=abogani@texware.it \
--cc=andi@firstfloor.org \
--cc=andrea.gelmini@gmail.com \
--cc=brong@fastmail.fm \
--cc=chris.mason@oracle.com \
--cc=edward.shishkin@gmail.com \
--cc=jeffm@suse.com \
--cc=laurent.riffard@free.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=mhilzinger@linuxnewmedia.de \
--cc=mingo@elte.hu \
--cc=rdreier@cisco.com \
--cc=reiserfs-devel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=thomas@m3y3r.de \
--cc=trenton.d.adams@gmail.com \
--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).