reiserfs-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ivan Shapovalov <intelfx100@gmail.com>
To: Edward Shishkin <edward.shishkin@gmail.com>,
	reiserfs-devel@vger.kernel.org
Subject: Re: [PATCHv2 3/3] reiser4: mark pages created during tail2extent conversion as dirty.
Date: Thu, 12 Nov 2015 14:31:30 +0300	[thread overview]
Message-ID: <1447327890.926.5.camel@gmail.com> (raw)
In-Reply-To: <56446331.2090106@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2854 bytes --]

On 2015-11-12 at 11:00 +0100, Edward Shishkin wrote:
> On 11/11/2015 11:30 AM, Edward Shishkin wrote:
> > 
> > 
> > On 11/09/2015 01:18 PM, Edward Shishkin wrote:
> > > On 10/25/2015 01:02 AM, Ivan Shapovalov wrote:
> > > > This is responsible for an oops in v4.2 in
> > > > write_jnodes_to_disk_extent() -> set_page_writeback().
> > 
> > 
> > As to me, this patch doesn't prevent the oops,
> > so someone else forgets to set pages dirty...
> 
> 
> False alarm: I applied to the old stuff..
> Everything woks without the hack in
> write_jnodes_to_disk_extent().
> Good work! Merged to reiser4-for-4.2.3.

Hi Edward,

Glad to hear that. I was already halfway recovering my debug patches
for collecting stacktraces and related information and was going to ask
you to reproduce :)

> > > > The pages needs to be marked dirty before marked writeback.
> > > > 
> > > >  From a similar problem in f2fs:
> > > > "The cgroup attaches inode->i_wb via mark_inode_dirty and when
> > > > set_page_writeback is called, __inc_wb_stat() updates i_wb's
> > > > stat.
> > > > 
> > > > So, we need to explicitly call set_page_dirty-
> > > > >__mark_inode_dirty in
> > > > prior to any writebacking pages."
> > > > 
> > > > Signed-off-by: Ivan Shapovalov <intelfx100@gmail.com>
> > > > ---
> > > >   fs/reiser4/plugin/file/tail_conversion.c | 1 +
> > > >   1 file changed, 1 insertion(+)
> > > > 
> > > > diff --git a/fs/reiser4/plugin/file/tail_conversion.c 
> > > > b/fs/reiser4/plugin/file/tail_conversion.c
> > > > index 7542c03..c856b73 100644
> > > > --- a/fs/reiser4/plugin/file/tail_conversion.c
> > > > +++ b/fs/reiser4/plugin/file/tail_conversion.c
> > > > @@ -175,6 +175,7 @@ static int replace(struct inode *inode,
> > > > struct 
> > > > page **pages, unsigned nr_pages,
> > > >                                   i_mapping));
> > > >           if (result)
> > > >               break;
> > > > +        set_page_dirty_notag(pages[i]);
> > > 
> > > 
> > > So, at this point the page is dirty but not uptodate.
> > > I am confused with this. Why not to set the page
> > > uptodate right before setting it dirty? At this point
> > > everything has been copied already, so the page is
> > > in fact uptodate. Could you please try this?

Have you made this correction in the merged patch?
Anyway, could you
please explain why it should be done one way and not another? What will
happen if the ordering is left as is?

Is it about marking page uptodate _before unlocking_, so that no one will see it dirty && !uptodate?

Thanks,
-- 
Ivan Shapovalov / intelfx /

> > > >           unlock_page(pages[i]);
> > > >           result = find_or_create_extent(pages[i]);
> > > >           if (result) {

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 213 bytes --]

  reply	other threads:[~2015-11-12 11:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-24 23:02 [PATCHv2 0/3] reiser4: another batch of fixes for 4.2 Ivan Shapovalov
2015-10-24 23:02 ` [PATCHv2 1/3] reiser4: remove last traces of JNODE_NEW in the debugging code Ivan Shapovalov
2015-11-09 11:49   ` Edward Shishkin
2015-10-24 23:02 ` [PATCHv2 2/3] reiser4: call account_page_redirty() on re-dirtying pages before giving them to entd Ivan Shapovalov
2015-11-09 11:50   ` Edward Shishkin
2015-10-24 23:02 ` [PATCHv2 3/3] reiser4: mark pages created during tail2extent conversion as dirty Ivan Shapovalov
2015-11-09 12:18   ` Edward Shishkin
2015-11-11 10:30     ` Edward Shishkin
2015-11-12 10:00       ` Edward Shishkin
2015-11-12 11:31         ` Ivan Shapovalov [this message]
2015-11-12 15:50           ` Edward Shishkin
2015-12-04  5:09 ` [PATCHv2 0/3] reiser4: another batch of fixes for 4.2 doiggl

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=1447327890.926.5.camel@gmail.com \
    --to=intelfx100@gmail.com \
    --cc=edward.shishkin@gmail.com \
    --cc=reiserfs-devel@vger.kernel.org \
    /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).