From: Alexander Zarochentsev <zam@namesys.com>
To: reiserfs-list@namesys.com
Cc: Francesco Biscani <biscani@pd.astro.it>
Subject: Re: possible reiser4 bug
Date: Sun, 26 Feb 2006 10:33:17 +0300 [thread overview]
Message-ID: <200602261033.18676.zam@namesys.com> (raw)
In-Reply-To: <200602260333.28555.biscani@pd.astro.it>
[-- Attachment #1: Type: text/plain, Size: 371 bytes --]
On Sunday 26 February 2006 05:33, Francesco Biscani wrote:
> On Saturday 25 February 2006 22:09, Alexander Zarochentsev wrote:
> > would you please try the attached patch.
>
> I'm having a similar problem on 2.6.16-rc4 + reiser4 from -mm1. I
> will be testing the attached patch.
please use better version of the patch (attached).
> Regards,
>
> Francesco
--
Alex.
[-- Attachment #2: reiser4-unix_file_write-get_exclusive_access-carefully.diff --]
[-- Type: text/x-diff, Size: 2674 bytes --]
fs/reiser4/plugin/file/file.c | 9 +++++----
fs/reiser4/plugin/item/extent_file_ops.c | 2 +-
fs/reiser4/vfs_ops.c | 5 ++++-
3 files changed, 10 insertions(+), 6 deletions(-)
Index: linux-2.6.16-rc3-mm1/fs/reiser4/plugin/file/file.c
===================================================================
--- linux-2.6.16-rc3-mm1.orig/fs/reiser4/plugin/file/file.c
+++ linux-2.6.16-rc3-mm1/fs/reiser4/plugin/file/file.c
@@ -2454,6 +2454,7 @@ ssize_t write_unix_file(struct file *fil
if (inode_get_flag(inode, REISER4_PART_CONV)) {
/* we can not currently write to a file which is partially converted */
+ txn_restart(ctx);
get_exclusive_access(uf_info);
result = finish_conversion(inode);
drop_exclusive_access(uf_info);
@@ -2481,6 +2482,7 @@ ssize_t write_unix_file(struct file *fil
3) convert file to extents to not enter here on each write
to mmaped file */
+ txn_restart(ctx);
get_exclusive_access(uf_info);
result = check_pages_unix_file(file, inode);
drop_exclusive_access(uf_info);
@@ -2535,14 +2537,13 @@ ssize_t write_unix_file(struct file *fil
while (left > 0) {
int excl = 0;
- /* getting exclusive or not exclusive access requires no
- transaction open */
- txn_restart_current();
-
/* faultin user page */
fault_in_pages_readable(buf,
left > PAGE_CACHE_SIZE ? PAGE_CACHE_SIZE : left);
+ /* getting exclusive or not exclusive access requires no
+ transaction open */
+ txn_restart(ctx);
if (inode->i_size == 0) {
get_exclusive_access(uf_info);
excl = 1;
Index: linux-2.6.16-rc3-mm1/fs/reiser4/vfs_ops.c
===================================================================
--- linux-2.6.16-rc3-mm1.orig/fs/reiser4/vfs_ops.c
+++ linux-2.6.16-rc3-mm1/fs/reiser4/vfs_ops.c
@@ -209,8 +209,11 @@ void writeout(struct super_block *sb, st
void reiser4_throttle_write(struct inode *inode)
{
- txn_restart_current();
+ reiser4_context *ctx = get_current_context();
+
+ txn_restart(ctx);
balance_dirty_pages_ratelimited(inode->i_mapping);
+ txn_restart(ctx);
}
const char *REISER4_SUPER_MAGIC_STRING = "ReIsEr4";
Index: linux-2.6.16-rc3-mm1/fs/reiser4/plugin/item/extent_file_ops.c
===================================================================
--- linux-2.6.16-rc3-mm1.orig/fs/reiser4/plugin/item/extent_file_ops.c
+++ linux-2.6.16-rc3-mm1/fs/reiser4/plugin/item/extent_file_ops.c
@@ -803,7 +803,7 @@ extent_balance_dirty_pages(struct inode
fault_in_pages_readable(f->data,
f->length > PAGE_CACHE_SIZE ?
PAGE_CACHE_SIZE : f->length);
-
+ txn_restart_current();
if (excl)
get_exclusive_access(uf_info);
else
next prev parent reply other threads:[~2006-02-26 7:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-24 5:35 possible reiser4 bug Alec Burney
2006-02-25 21:09 ` Alexander Zarochentsev
2006-02-25 11:17 ` James (Alec) Burney
2006-02-26 2:33 ` Francesco Biscani
2006-02-26 7:33 ` Alexander Zarochentsev [this message]
2006-02-28 13:46 ` Francesco Biscani
-- strict thread matches above, loose matches on Subject: below --
2006-03-10 19:51 Maarten Deprez, maartendeprez, maartendeprez, maartendeprez, maartendeprez, maartendeprez, maartendeprez, maartendeprez
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=200602261033.18676.zam@namesys.com \
--to=zam@namesys.com \
--cc=biscani@pd.astro.it \
--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.