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

Re: Extended Attributes and Access Control Lists


On Thu, Nov 01, 2001 at 12:21:05PM -0800, Andrew Morton wrote:

> 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.

No, that should be fine --- getting the write access should cause an
implicit wait on the buffer until it is unlocked, and should prevent
future flushing of that buffer.  journal_get_write_access() locks the
buffer internally to be able to play with the buffer safely, and that
automatically results in it waiting for any existing locker to drop
the lock.

The only danger comes if you actually write the buffer while it is
locked, but that's journal_dirty_metadata(), not

> > 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?

It shouldn't be, no.  Even calling it multiple times on the same
buffer should be fine.


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