All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] jbd: clear b_modified before moving the jh to a different transaction
@ 2012-01-10 18:12 Josef Bacik
  2012-01-10 20:17 ` Jan Kara
  2012-04-04  7:55 ` Jan Kara
  0 siblings, 2 replies; 8+ messages in thread
From: Josef Bacik @ 2012-01-10 18:12 UTC (permalink / raw)
  To: linux-fsdevel, linux-ext4, jack

If we are journalling data (ie journal=data or big symlinks) we can discard
buffers and move them to different transactions to make sure they get cleaned up
properly.  The problem is b_modified could still be set from the last
transaction that touched it, so putting it on the currently running transaction
or setting it up to be put on the next transaction will run into problems if the
buffer gets reused in that transaction as the space accounting logic won't be
done, which will result in panics at commit time because t_nr_buffers will end
up being more than t_outstanding_credits.  Thanks to Jan Kara for pointing out
the other part of this problem a few months ago.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
---
 fs/jbd/transaction.c  |    5 ++++-
 fs/jbd2/transaction.c |    5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/fs/jbd/transaction.c b/fs/jbd/transaction.c
index 7e59c6e..c968788 100644
--- a/fs/jbd/transaction.c
+++ b/fs/jbd/transaction.c
@@ -1784,6 +1784,7 @@ static int __dispose_buffer(struct journal_head *jh, transaction_t *transaction)
 		 */
 		clear_buffer_dirty(bh);
 		__journal_file_buffer(jh, transaction, BJ_Forget);
+		jh->b_modified = 0;
 		may_free = 0;
 	} else {
 		JBUFFER_TRACE(jh, "on running transaction");
@@ -1952,8 +1953,10 @@ static int journal_unmap_buffer(journal_t *journal, struct buffer_head *bh)
 		 * clear dirty bits when it is done with the buffer.
 		 */
 		set_buffer_freed(bh);
-		if (journal->j_running_transaction && buffer_jbddirty(bh))
+		if (journal->j_running_transaction && buffer_jbddirty(bh)) {
+			jh->b_modified = 0;
 			jh->b_next_transaction = journal->j_running_transaction;
+		}
 		journal_put_journal_head(jh);
 		spin_unlock(&journal->j_list_lock);
 		jbd_unlock_bh_state(bh);
diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
index a0e41a4..094dcd8 100644
--- a/fs/jbd2/transaction.c
+++ b/fs/jbd2/transaction.c
@@ -1756,6 +1756,7 @@ static int __dispose_buffer(struct journal_head *jh, transaction_t *transaction)
 		 * __journal_file_buffer
 		 */
 		clear_buffer_dirty(bh);
+		jh->b_modified = 0;
 		__jbd2_journal_file_buffer(jh, transaction, BJ_Forget);
 		may_free = 0;
 	} else {
@@ -1917,8 +1918,10 @@ static int journal_unmap_buffer(journal_t *journal, struct buffer_head *bh)
 		 * clear dirty bits when it is done with the buffer.
 		 */
 		set_buffer_freed(bh);
-		if (journal->j_running_transaction && buffer_jbddirty(bh))
+		if (journal->j_running_transaction && buffer_jbddirty(bh)) {
+			jh->b_modified = 0;
 			jh->b_next_transaction = journal->j_running_transaction;
+		}
 		jbd2_journal_put_journal_head(jh);
 		spin_unlock(&journal->j_list_lock);
 		jbd_unlock_bh_state(bh);
-- 
1.7.5.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] jbd: clear b_modified before moving the jh to a different transaction
  2012-01-10 18:12 [PATCH] jbd: clear b_modified before moving the jh to a different transaction Josef Bacik
@ 2012-01-10 20:17 ` Jan Kara
  2012-01-10 20:21   ` Josef Bacik
  2012-04-04  7:55 ` Jan Kara
  1 sibling, 1 reply; 8+ messages in thread
From: Jan Kara @ 2012-01-10 20:17 UTC (permalink / raw)
  To: Josef Bacik; +Cc: linux-fsdevel, linux-ext4, jack

On Tue 10-01-12 13:12:55, Josef Bacik wrote:
> If we are journalling data (ie journal=data or big symlinks) we can discard
> buffers and move them to different transactions to make sure they get cleaned up
> properly.  The problem is b_modified could still be set from the last
> transaction that touched it, so putting it on the currently running transaction
> or setting it up to be put on the next transaction will run into problems if the
> buffer gets reused in that transaction as the space accounting logic won't be
> done, which will result in panics at commit time because t_nr_buffers will end
> up being more than t_outstanding_credits.  Thanks to Jan Kara for pointing out
> the other part of this problem a few months ago.  Thanks,
  Ho hum, I'm inclined to apply this just because it makes sense. But I
still don't see how a transaction can reuse a buffer from BJ_Forget list.
We attach there only truncated buffers and their underlying block can be
reallocated only after the transaction freeing them is committed. So have
you some incentive that this patch indeed fixes the t_outstanding_credits
assertion you were hunting?

								Honza

> Signed-off-by: Josef Bacik <josef@redhat.com>
> ---
>  fs/jbd/transaction.c  |    5 ++++-
>  fs/jbd2/transaction.c |    5 ++++-
>  2 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/jbd/transaction.c b/fs/jbd/transaction.c
> index 7e59c6e..c968788 100644
> --- a/fs/jbd/transaction.c
> +++ b/fs/jbd/transaction.c
> @@ -1784,6 +1784,7 @@ static int __dispose_buffer(struct journal_head *jh, transaction_t *transaction)
>  		 */
>  		clear_buffer_dirty(bh);
>  		__journal_file_buffer(jh, transaction, BJ_Forget);
> +		jh->b_modified = 0;
>  		may_free = 0;
>  	} else {
>  		JBUFFER_TRACE(jh, "on running transaction");
> @@ -1952,8 +1953,10 @@ static int journal_unmap_buffer(journal_t *journal, struct buffer_head *bh)
>  		 * clear dirty bits when it is done with the buffer.
>  		 */
>  		set_buffer_freed(bh);
> -		if (journal->j_running_transaction && buffer_jbddirty(bh))
> +		if (journal->j_running_transaction && buffer_jbddirty(bh)) {
> +			jh->b_modified = 0;
>  			jh->b_next_transaction = journal->j_running_transaction;
> +		}
>  		journal_put_journal_head(jh);
>  		spin_unlock(&journal->j_list_lock);
>  		jbd_unlock_bh_state(bh);
> diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
> index a0e41a4..094dcd8 100644
> --- a/fs/jbd2/transaction.c
> +++ b/fs/jbd2/transaction.c
> @@ -1756,6 +1756,7 @@ static int __dispose_buffer(struct journal_head *jh, transaction_t *transaction)
>  		 * __journal_file_buffer
>  		 */
>  		clear_buffer_dirty(bh);
> +		jh->b_modified = 0;
>  		__jbd2_journal_file_buffer(jh, transaction, BJ_Forget);
>  		may_free = 0;
>  	} else {
> @@ -1917,8 +1918,10 @@ static int journal_unmap_buffer(journal_t *journal, struct buffer_head *bh)
>  		 * clear dirty bits when it is done with the buffer.
>  		 */
>  		set_buffer_freed(bh);
> -		if (journal->j_running_transaction && buffer_jbddirty(bh))
> +		if (journal->j_running_transaction && buffer_jbddirty(bh)) {
> +			jh->b_modified = 0;
>  			jh->b_next_transaction = journal->j_running_transaction;
> +		}
>  		jbd2_journal_put_journal_head(jh);
>  		spin_unlock(&journal->j_list_lock);
>  		jbd_unlock_bh_state(bh);
> -- 
> 1.7.5.2
> 
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] jbd: clear b_modified before moving the jh to a different transaction
  2012-01-10 20:17 ` Jan Kara
@ 2012-01-10 20:21   ` Josef Bacik
  2012-01-10 21:10     ` Jan Kara
  0 siblings, 1 reply; 8+ messages in thread
From: Josef Bacik @ 2012-01-10 20:21 UTC (permalink / raw)
  To: Jan Kara; +Cc: Josef Bacik, linux-fsdevel, linux-ext4

On Tue, Jan 10, 2012 at 09:17:06PM +0100, Jan Kara wrote:
> On Tue 10-01-12 13:12:55, Josef Bacik wrote:
> > If we are journalling data (ie journal=data or big symlinks) we can discard
> > buffers and move them to different transactions to make sure they get cleaned up
> > properly.  The problem is b_modified could still be set from the last
> > transaction that touched it, so putting it on the currently running transaction
> > or setting it up to be put on the next transaction will run into problems if the
> > buffer gets reused in that transaction as the space accounting logic won't be
> > done, which will result in panics at commit time because t_nr_buffers will end
> > up being more than t_outstanding_credits.  Thanks to Jan Kara for pointing out
> > the other part of this problem a few months ago.  Thanks,
>   Ho hum, I'm inclined to apply this just because it makes sense. But I
> still don't see how a transaction can reuse a buffer from BJ_Forget list.
> We attach there only truncated buffers and their underlying block can be
> reallocated only after the transaction freeing them is committed. So have
> you some incentive that this patch indeed fixes the t_outstanding_credits
> assertion you were hunting?
> 

So more the problem is where we set b_next_transaction, since it could be
reallocated in the next transaction after the current transaction commits and
then we're really screwed.  I have no real evidence to prove that this is
causing my problem yet, but it's definitely wrong and I want to get it fixed
before I forget it :).  Thanks,

Josef

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] jbd: clear b_modified before moving the jh to a different transaction
  2012-01-10 20:21   ` Josef Bacik
@ 2012-01-10 21:10     ` Jan Kara
  0 siblings, 0 replies; 8+ messages in thread
From: Jan Kara @ 2012-01-10 21:10 UTC (permalink / raw)
  To: Josef Bacik; +Cc: Jan Kara, linux-fsdevel, linux-ext4

On Tue 10-01-12 15:21:20, Josef Bacik wrote:
> On Tue, Jan 10, 2012 at 09:17:06PM +0100, Jan Kara wrote:
> > On Tue 10-01-12 13:12:55, Josef Bacik wrote:
> > > If we are journalling data (ie journal=data or big symlinks) we can discard
> > > buffers and move them to different transactions to make sure they get cleaned up
> > > properly.  The problem is b_modified could still be set from the last
> > > transaction that touched it, so putting it on the currently running transaction
> > > or setting it up to be put on the next transaction will run into problems if the
> > > buffer gets reused in that transaction as the space accounting logic won't be
> > > done, which will result in panics at commit time because t_nr_buffers will end
> > > up being more than t_outstanding_credits.  Thanks to Jan Kara for pointing out
> > > the other part of this problem a few months ago.  Thanks,
> >   Ho hum, I'm inclined to apply this just because it makes sense. But I
> > still don't see how a transaction can reuse a buffer from BJ_Forget list.
> > We attach there only truncated buffers and their underlying block can be
> > reallocated only after the transaction freeing them is committed. So have
> > you some incentive that this patch indeed fixes the t_outstanding_credits
> > assertion you were hunting?
> 
> So more the problem is where we set b_next_transaction, since it could be
> reallocated in the next transaction after the current transaction commits and
> then we're really screwed.  I have no real evidence to prove that this is
> causing my problem yet, but it's definitely wrong and I want to get it fixed
> before I forget it :).
  I see. But journal_invalidatepage() is called before blocks are freed
which means that the freeing of the block happens either in the running
transaction (to which we set b_next_transaction) or even in the following
one. And we also set buffer_freed() so the buffer should be filed to
BJ_Forget list when it is refiled. I agree the logic is kind of fragile so
there can be bug somewhere. Just I don't see it (yet).

								Honza
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] jbd: clear b_modified before moving the jh to a different transaction
  2012-01-10 18:12 [PATCH] jbd: clear b_modified before moving the jh to a different transaction Josef Bacik
  2012-01-10 20:17 ` Jan Kara
@ 2012-04-04  7:55 ` Jan Kara
  2012-04-04 16:46   ` Josef Bacik
  1 sibling, 1 reply; 8+ messages in thread
From: Jan Kara @ 2012-04-04  7:55 UTC (permalink / raw)
  To: Josef Bacik; +Cc: linux-fsdevel, linux-ext4, jack

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

On Tue 10-01-12 13:12:55, Josef Bacik wrote:
> If we are journalling data (ie journal=data or big symlinks) we can discard
> buffers and move them to different transactions to make sure they get cleaned up
> properly.  The problem is b_modified could still be set from the last
> transaction that touched it, so putting it on the currently running transaction
> or setting it up to be put on the next transaction will run into problems if the
> buffer gets reused in that transaction as the space accounting logic won't be
> done, which will result in panics at commit time because t_nr_buffers will end
> up being more than t_outstanding_credits.  Thanks to Jan Kara for pointing out
> the other part of this problem a few months ago.  Thanks,
> 
> Signed-off-by: Josef Bacik <josef@redhat.com>
  So I think I've nailed this down. Your feeling that the problem is with
refiling buffer to BJ_Forget list of the running transaction was right. The
missing piece to the puzzle was that journal_invalidatepage() can get
called not only when underlying block is freed but also when someone
flushes page cache. The traces I have suggest that someone has flushed page
cache (likely of the block device), that moved buffer from the checkpoint
list to BJ_Forget list of the running transaction and then the same running
transaction tried to modify the buffer which triggered the accounting
problem you spotted.

I have updated the changelog and pushed the patch to my tree (for JBD
only). I'll duplicate the patch for JBD2 tomorrow.

								Honza


-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

[-- Attachment #2: 0001-jbd-clear-b_modified-before-moving-the-jh-to-a-diffe.patch --]
[-- Type: text/x-patch, Size: 2473 bytes --]

>From d433e0479c9cde46b29b30a5c5996c1dbe57005f Mon Sep 17 00:00:00 2001
From: Josef Bacik <josef@redhat.com>
Date: Tue, 10 Jan 2012 13:12:55 -0500
Subject: [PATCH] jbd: clear b_modified before moving the jh to a different transaction

journal_forget() and journal_invalidatepage() functions move buffer to
BJ_Forget list of a running transaction so that the buffer gets cleaned up when
the transaction is committed. This usually happens when underlying block is
freed but journal_invalidatepage() can also move the buffer when page cache of
the corresponding inode (may be a block device) gets flushed.  When the buffer
had b_modfied set from the previous transaction and we happen to modify it
again in the current transaction, we won't properly account for the modified
buffer by subtracting the number of reserved credits of the running transaction
because do_get_write_access() won't clear b_modified (buffer already is on
running transaction so do_get_write_access() things it has nothing to do).
This then results in assertion failure in commit code because the transaction
has more buffers than reserved credits (t_nr_buffers > t_outstanding_credits).

We fix the issue by clearing b_modified before moving buffer to a BJ_Forget list
of another transaction because logically, it's not changed for that transaction
anymore.

CC: stable@kernel.org
Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
---
 fs/jbd/transaction.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/fs/jbd/transaction.c b/fs/jbd/transaction.c
index febc10d..fb48e44 100644
--- a/fs/jbd/transaction.c
+++ b/fs/jbd/transaction.c
@@ -1788,6 +1788,7 @@ static int __dispose_buffer(struct journal_head *jh, transaction_t *transaction)
 		 */
 		clear_buffer_dirty(bh);
 		__journal_file_buffer(jh, transaction, BJ_Forget);
+		jh->b_modified = 0;
 		may_free = 0;
 	} else {
 		JBUFFER_TRACE(jh, "on running transaction");
@@ -1956,8 +1957,10 @@ static int journal_unmap_buffer(journal_t *journal, struct buffer_head *bh)
 		 * clear dirty bits when it is done with the buffer.
 		 */
 		set_buffer_freed(bh);
-		if (journal->j_running_transaction && buffer_jbddirty(bh))
+		if (journal->j_running_transaction && buffer_jbddirty(bh)) {
+			jh->b_modified = 0;
 			jh->b_next_transaction = journal->j_running_transaction;
+		}
 		journal_put_journal_head(jh);
 		spin_unlock(&journal->j_list_lock);
 		jbd_unlock_bh_state(bh);
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] jbd: clear b_modified before moving the jh to a different transaction
  2012-04-04  7:55 ` Jan Kara
@ 2012-04-04 16:46   ` Josef Bacik
  2012-04-04 21:14     ` Jan Kara
  0 siblings, 1 reply; 8+ messages in thread
From: Josef Bacik @ 2012-04-04 16:46 UTC (permalink / raw)
  To: Jan Kara; +Cc: Josef Bacik, linux-fsdevel, linux-ext4

On Wed, Apr 04, 2012 at 09:55:20AM +0200, Jan Kara wrote:
> On Tue 10-01-12 13:12:55, Josef Bacik wrote:
> > If we are journalling data (ie journal=data or big symlinks) we can discard
> > buffers and move them to different transactions to make sure they get cleaned up
> > properly.  The problem is b_modified could still be set from the last
> > transaction that touched it, so putting it on the currently running transaction
> > or setting it up to be put on the next transaction will run into problems if the
> > buffer gets reused in that transaction as the space accounting logic won't be
> > done, which will result in panics at commit time because t_nr_buffers will end
> > up being more than t_outstanding_credits.  Thanks to Jan Kara for pointing out
> > the other part of this problem a few months ago.  Thanks,
> > 
> > Signed-off-by: Josef Bacik <josef@redhat.com>
>   So I think I've nailed this down. Your feeling that the problem is with
> refiling buffer to BJ_Forget list of the running transaction was right. The
> missing piece to the puzzle was that journal_invalidatepage() can get
> called not only when underlying block is freed but also when someone
> flushes page cache. The traces I have suggest that someone has flushed page
> cache (likely of the block device), that moved buffer from the checkpoint
> list to BJ_Forget list of the running transaction and then the same running
> transaction tried to modify the buffer which triggered the accounting
> problem you spotted.
> 
> I have updated the changelog and pushed the patch to my tree (for JBD
> only). I'll duplicate the patch for JBD2 tomorrow.
> 

Ok now it's my turn to be unsure ;).  I thought invalidatepage could only be
called via truncate?  You say it happens when someone flushes pagecache, do you
mean like echo 3 > /proc/sys/vm/drop_caches?  I've followed invalidatepage and
can't see what you are talking about, so as usual I need it explained to me
because I'm stupid.  Thanks,

Josef

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] jbd: clear b_modified before moving the jh to a different transaction
  2012-04-04 16:46   ` Josef Bacik
@ 2012-04-04 21:14     ` Jan Kara
  2012-04-05 14:19       ` Josef Bacik
  0 siblings, 1 reply; 8+ messages in thread
From: Jan Kara @ 2012-04-04 21:14 UTC (permalink / raw)
  To: Josef Bacik; +Cc: Jan Kara, linux-fsdevel, linux-ext4

On Wed 04-04-12 12:46:57, Josef Bacik wrote:
> On Wed, Apr 04, 2012 at 09:55:20AM +0200, Jan Kara wrote:
> > On Tue 10-01-12 13:12:55, Josef Bacik wrote:
> > > If we are journalling data (ie journal=data or big symlinks) we can discard
> > > buffers and move them to different transactions to make sure they get cleaned up
> > > properly.  The problem is b_modified could still be set from the last
> > > transaction that touched it, so putting it on the currently running transaction
> > > or setting it up to be put on the next transaction will run into problems if the
> > > buffer gets reused in that transaction as the space accounting logic won't be
> > > done, which will result in panics at commit time because t_nr_buffers will end
> > > up being more than t_outstanding_credits.  Thanks to Jan Kara for pointing out
> > > the other part of this problem a few months ago.  Thanks,
> > > 
> > > Signed-off-by: Josef Bacik <josef@redhat.com>
> >   So I think I've nailed this down. Your feeling that the problem is with
> > refiling buffer to BJ_Forget list of the running transaction was right. The
> > missing piece to the puzzle was that journal_invalidatepage() can get
> > called not only when underlying block is freed but also when someone
> > flushes page cache. The traces I have suggest that someone has flushed page
> > cache (likely of the block device), that moved buffer from the checkpoint
> > list to BJ_Forget list of the running transaction and then the same running
> > transaction tried to modify the buffer which triggered the accounting
> > problem you spotted.
> > 
> > I have updated the changelog and pushed the patch to my tree (for JBD
> > only). I'll duplicate the patch for JBD2 tomorrow.
> > 
> 
> Ok now it's my turn to be unsure ;).  I thought invalidatepage could only be
> called via truncate?  You say it happens when someone flushes pagecache, do you
> mean like echo 3 > /proc/sys/vm/drop_caches?
  Yup, or things like BLKFLSBUF ioctl. But yes, you are right they don't
end up calling ext3_invalidatepage() I often get confused by the name of
invalidate_mapping_pages()... Anyway ext3_invalidatepage() definitely gets
called (I see that in my traces) and now I tend to thing it's from
ext3_evict_inode(). The guy was using 2.6.37 kernel which doesn't have
b22570d9abb3d844e65c15c8bc0d57a78129e3b4 so truncate_inode_pages() gets
called from ext3_evict_inode() before the buffer is checkpointed and that
causes the described scenario. But the guy claims he's seen the problem
with 3.2 as well. So I guess I'll forward-port the buffer tracking patches
and ask him to reproduce with 3.2.

								Honza
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] jbd: clear b_modified before moving the jh to a different transaction
  2012-04-04 21:14     ` Jan Kara
@ 2012-04-05 14:19       ` Josef Bacik
  0 siblings, 0 replies; 8+ messages in thread
From: Josef Bacik @ 2012-04-05 14:19 UTC (permalink / raw)
  To: Jan Kara; +Cc: Josef Bacik, linux-fsdevel, linux-ext4

On Wed, Apr 04, 2012 at 11:14:44PM +0200, Jan Kara wrote:
> On Wed 04-04-12 12:46:57, Josef Bacik wrote:
> > On Wed, Apr 04, 2012 at 09:55:20AM +0200, Jan Kara wrote:
> > > On Tue 10-01-12 13:12:55, Josef Bacik wrote:
> > > > If we are journalling data (ie journal=data or big symlinks) we can discard
> > > > buffers and move them to different transactions to make sure they get cleaned up
> > > > properly.  The problem is b_modified could still be set from the last
> > > > transaction that touched it, so putting it on the currently running transaction
> > > > or setting it up to be put on the next transaction will run into problems if the
> > > > buffer gets reused in that transaction as the space accounting logic won't be
> > > > done, which will result in panics at commit time because t_nr_buffers will end
> > > > up being more than t_outstanding_credits.  Thanks to Jan Kara for pointing out
> > > > the other part of this problem a few months ago.  Thanks,
> > > > 
> > > > Signed-off-by: Josef Bacik <josef@redhat.com>
> > >   So I think I've nailed this down. Your feeling that the problem is with
> > > refiling buffer to BJ_Forget list of the running transaction was right. The
> > > missing piece to the puzzle was that journal_invalidatepage() can get
> > > called not only when underlying block is freed but also when someone
> > > flushes page cache. The traces I have suggest that someone has flushed page
> > > cache (likely of the block device), that moved buffer from the checkpoint
> > > list to BJ_Forget list of the running transaction and then the same running
> > > transaction tried to modify the buffer which triggered the accounting
> > > problem you spotted.
> > > 
> > > I have updated the changelog and pushed the patch to my tree (for JBD
> > > only). I'll duplicate the patch for JBD2 tomorrow.
> > > 
> > 
> > Ok now it's my turn to be unsure ;).  I thought invalidatepage could only be
> > called via truncate?  You say it happens when someone flushes pagecache, do you
> > mean like echo 3 > /proc/sys/vm/drop_caches?
>   Yup, or things like BLKFLSBUF ioctl. But yes, you are right they don't
> end up calling ext3_invalidatepage() I often get confused by the name of
> invalidate_mapping_pages()... Anyway ext3_invalidatepage() definitely gets
> called (I see that in my traces) and now I tend to thing it's from
> ext3_evict_inode(). The guy was using 2.6.37 kernel which doesn't have
> b22570d9abb3d844e65c15c8bc0d57a78129e3b4 so truncate_inode_pages() gets
> called from ext3_evict_inode() before the buffer is checkpointed and that
> causes the described scenario. But the guy claims he's seen the problem
> with 3.2 as well. So I guess I'll forward-port the buffer tracking patches
> and ask him to reproduce with 3.2.
> 

Ah yeah and my reports are from RHEL5 which calls truncate_inode_pages from
generic_forget_inode, so that makes sense, but yeah why it would happen on newer
stuff is weird.  Let me know how that works out ;).  If anything the patch is
obviously correct, I'm ok with patch and praying.  Thanks,

Josef

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-04-05 14:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-10 18:12 [PATCH] jbd: clear b_modified before moving the jh to a different transaction Josef Bacik
2012-01-10 20:17 ` Jan Kara
2012-01-10 20:21   ` Josef Bacik
2012-01-10 21:10     ` Jan Kara
2012-04-04  7:55 ` Jan Kara
2012-04-04 16:46   ` Josef Bacik
2012-04-04 21:14     ` Jan Kara
2012-04-05 14:19       ` Josef Bacik

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.