Re: [PATCH] jbd: fix assertion failure in journal_next_log_block

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Jan 31, 2008  11:14 -0500, Josef Bacik wrote:
[snip excellent analysis]
> So you get into this situation where
> t_nr_buffers (the actual number of buffers that are on the transaction) is
> greater than the number of buffers accounted for via t_outstanding_credits.
> This presents a problem since as we loop through writting buffers to the
> journal, we decrement t_outstanding_credits, and if t_nr_buffers is more than
> t_outstanding_credits then we end up with a negative number for
> t_outstanding_credits
> 
> Signed-off-by: Josef Bacik <jbacik@xxxxxxxxxx>

Do you know what kernel this problem was introduced in, or is this a
long standing problem?  Presumably the same is needed for jbd2?

Once we have some decent amount of testing going on with ext4, I think
it makes sense to merge the jbd2 changes back into jbd and return to
a single code base, since there is nothing in the jbd2 code that ext3
can't also work with (i.e. all of the changes are properly isolated
with compatibility flags and such).

> @@ -1056,7 +1056,7 @@ static inline int jbd_space_needed(journal_t *journal)
>  	int nblocks = journal->j_max_transaction_buffers;
>  	if (journal->j_committing_transaction)
>  		nblocks += journal->j_committing_transaction->
> -					t_outstanding_credits;
> +					t_nr_buffers;

(trivial) this can be moved back onto the previous line.

> @@ -1168,7 +1168,7 @@ static inline int jbd_space_needed(journal_t *journal)
>  	int nblocks = journal->j_max_transaction_buffers;
>  	if (journal->j_committing_transaction)
>  		nblocks += journal->j_committing_transaction->
> -					t_outstanding_credits;
> +					t_nr_buffers;

Same...

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.

-
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux