[Ocfs2-devel] [PATCH 2/3] ocfs2/xattr: Merge xattr set transaction.
Joel Becker
Joel.Becker at oracle.com
Thu Oct 23 22:59:57 PDT 2008
On Fri, Oct 24, 2008 at 09:17:40AM +0800, Tao Ma wrote:
> Joel Becker wrote:
>> On Fri, Oct 24, 2008 at 08:44:25AM +0800, Tao Ma wrote:
>>> Joel Becker wrote:
>> No, I found it incredibly hard to wade through, because I'd get
>> to a point where I'd lost track of where I was, and I would look and see
>> I'd only viewed 44% of the patch :-)
>> There's a lot going on in here. You're moving the transaction
>> calculations around, moving locks, reorganizing the calls to the various
>> set handlers, and that's just for starters.
> OK, I will try to separate it into small ones.
Thanks. Don't worry about making them tiny - there's a lot
there. But see if you can think of a couple logical steps.
>> For example, when setting an xattr you try ibody_set() first.
>> If that succeeds, you then go ahead and clear the same xattr out of the
>> external block/tree. So if there is an extend_trans() somewhere in
>> there, and it commits a change, you could crash and have the xattr in
>> both the ibody and the external block/tree. The same with the reverse
>> (set in external, commit, clear in ibody, crash). We need to make sure
>> we either don't actually have these cases happen or handle them
>> gracefully.
> yeah, you may be right. As my previous e-mail said, I will try to calculate
> all the credits in the beginning. Let's see how it works.
Cool. If you can, awesome. If not, let's make sure that the
remounted filesystem can handle whatever's there.
Joel
--
"Nearly all men can stand adversity, but if you really want to
test a man's character, give him power."
- Abraham Lincoln
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127
More information about the Ocfs2-devel
mailing list