Re: journal buffer_credits problem

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

 



[--snip--]
> Again, I would like to take a look at your related versionfs change.
>
> BTW, you might want to post on ext2-devel as well.
>
> Regards,
>
> Chris

Thanks Chris.  We had to first understand what these buffer_credits are.
And we believe we may have fixed the problem (preliminary tests no longer
tickle the problem).  This was due to the way we were nesting another file
creation+write (for the version file) inside a normal prepare/commit write.

I'll let my student Akshat post a more detailed explanation of the fix's
hypothesis.

Erez.

Chris,


Here's a detailed explanation of what we're trying to do, and what we understand of it. It would be
useful if you could confirm that our understanding is correct.
In versionfs, we make a copy of a file whenever it changes. To do so, we do a sendfile-like operation
after doing an ext3_prepare_write() so that we can copy the old contents of the file before the file changes permanently.
A prepare_write will start a transaction and reserve a number of buffer credits for itself. In our code, we are nesting the file copy for versioning between the prepare_write and the commit_write. As a result, the copy operation will eat up buffer credits from the current transaction. ext3_prepare_write obviously does not reserve credits for us because it has no idea that we intend to a whole lot more ext3 activity in between. I think that for the most part, it so happens that the number of credits reserved in ext3_prepare_write is conservatively quite high and we can squeeze in our copy file without running out of credits, but sometimes we get unlucky and there aren't enough credits for copying.
As Erez said, we were nesting the copy operation between a prepare and commit write. If instead, we do the copy before ext3_prepare_write and not bother ext3 between ext3_prepare_write and ext3_commit_write, we don't run into the buffer_credit problem, since the copy operation will happen in its own transaction and will be allocated as many buffer credits as required.


Regards,
Akshat Aranya

_________________________________________________________________
The hottest things. The coolest deals. http://www.msn.co.in/Shopping/ Get them online!



_______________________________________________ Ext3-users@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/ext3-users

[Index of Archives]         [Linux RAID]     [Kernel Development]     [Red Hat Install]     [Video 4 Linux]     [Postgresql]     [Fedora]     [Gimp]     [Yosemite News]

  Powered by Linux