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

Re: Extended Attributes and Access Control Lists



Andreas Gruenbacher wrote:
> 
> Hello again,
> 
> Eric Jarman is running some tests of the ext3 extended attribute
> code, and has found there is still a problem left. I would appreciate any
> feedback on what the causes of this problem could be.
> 
> When stressing the filesystem, and when the quota limit is reached, the
> assertion in line 611 in fs/jbd/transaction.c triggers:
> 
>     608                 lock_journal(journal);
>     609         }
>     610
> =>  611         J_ASSERT_JH(jh, !buffer_locked(jh2bh(jh)));
>     612
>     613         error = -EROFS;
>     614         if (is_handle_aborted(handle))
> 
> In this test Eric simply created a file with dd.
> 
> The changes we have applied relatively to 0.7.22 are:
> 
> - increase the number of blocks in ext3_journal_start() calls to also
>   cover EA's.
> 
> - I have been using ext3_journal_get_write_access() after ext3_new_block
>   and getblk of this block. Not I have changed that to
>   ext3_journal_get_create_access(), which seems to aggravate the problem.

That sounds OK.

It looks like you're calling get_write_access() against a
locked buffer.  ext3 considers that a bug because a
locked buffer is presumably undergoing writeout to the
journal, and modifying it at that stage violates all sorts
of ordering requirements.

The buffer could be locked for a number of reasons.  The
most obvious is that you locked it!  Or maybe bdflush
or kupdate or sys_sync() came along and decided to flush it.

TO prevent the latter case you need to ensure that the
buffer is not present on the BUF_DIRTY LRU, or that it's
never marked dirty (use journal_dirty_metadata, not mark_buffer_dirty).

> After the assertion, the system oopses, and freezes shortly thereafter.
> 
> I noticed there are code paths where ext3_journal_get_write_access() is
> called more than once for the same transaction handle. Is this a problem?
> 
> I have attached the messages exchanged with Eric; it includes backtraces
> of the oopses and probably more accurate descriptions than mine :-)
> 

I see no attachments here :)





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