From: fs <fs@ercist.iscas.ac.cn>
To: Vladimir Saveliev <vs@namesys.com>
Cc: reiserfs-list@namesys.com,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Hans Reiser <reiser@namesys.com>
Subject: Re: [PATCH] ReiserFS _get_block_create_0 wrong behavior when I/O fails
Date: Thu, 16 Jun 2005 13:04:59 -0400 [thread overview]
Message-ID: <1118941347.2886.2.camel@CoolQ> (raw)
In-Reply-To: <1118850101.17622.579.camel@tribesman.namesys.com>
Dear Vladimir Saveliev,
On Wed, 2005-06-15 at 11:41, Vladimir Saveliev wrote:
> > Patch:
> > diff -uNp /tmp/linux-2.6.12-rc6/fs/reiserfs/inode.c /tmp/linux-2.6.12-rc6.new/fs/reiserfs/inode.c
> > --- /tmp/linux-2.6.12-rc6/fs/reiserfs/inode.c 2005-06-06 11:22:29.000000000 -0400
> > +++ /tmp/linux-2.6.12-rc6.new/fs/reiserfs/inode.c 2005-06-15 13:56:45.552564512 -0400
> > @@ -254,6 +254,7 @@ static int _get_block_create_0 (struct i
> > char * p = NULL;
> > int chars;
> > int ret ;
> > + int result ;
> > int done = 0 ;
> > unsigned long offset ;
> >
> > @@ -262,7 +263,8 @@ static int _get_block_create_0 (struct i
> > (loff_t)block * inode->i_sb->s_blocksize + 1, TYPE_ANY, 3);
> >
> > research:
> > - if (search_for_position_by_key (inode->i_sb, &key, &path) != POSITION_FOUND) {
> > + result = search_for_position_by_key (inode->i_sb, &key, &path) ;
> > + if (result != POSITION_FOUND) {
> > pathrelse (&path);
> > if (p)
> > kunmap(bh_result->b_page) ;
> > @@ -270,7 +272,8 @@ research:
> > // That there is some MMAPED data associated with it that is yet to be written to disk.
> > if ((args & GET_BLOCK_NO_HOLE) && !PageUptodate(bh_result->b_page) ) {
> > return -ENOENT ;
> > - }
> > + }else if (result == IO_ERROR)
> > + return -EIO ;
> > return 0 ;
> > }
> >
>
> Your patch is incomplete. There is one more search_for_position_by_key
> at the end of this function. You probably want to check its return value
> also.
I notice there's a comment
if (search_for_position_by_key (inode->i_sb, &key, &path) !=
POSITION_FOUND)
// we read something from tail, even if now we got IO_ERROR <-
Here, can you explain more ?
break;
next prev parent reply other threads:[~2005-06-16 17:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-15 20:09 [PATCH] ReiserFS _get_block_create_0 wrong behavior when I/O fails fs
2005-06-15 20:09 ` fs
2005-06-15 15:41 ` Vladimir Saveliev
2005-06-16 17:04 ` fs [this message]
2005-06-16 10:41 ` Vladimir Saveliev
2005-06-16 10:46 ` Vladimir Saveliev
2005-06-16 18:46 ` Hans Reiser
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=1118941347.2886.2.camel@CoolQ \
--to=fs@ercist.iscas.ac.cn \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=reiser@namesys.com \
--cc=reiserfs-list@namesys.com \
--cc=vs@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.