Re: [PATCH 1/9] Btrfs: introduce sub transaction stuff

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

 



Excerpts from Liu Bo's message of 2011-05-19 04:11:24 -0400:
> Introduce a new concept "sub transaction",
> the relation between transaction and sub transaction is
> 
> transaction A       ---> transid = x
>    sub trans a(1)   ---> sub_transid = x+1
>    sub trans a(2)   ---> sub_transid = x+2
>      ... ...
>    sub trans a(n-1) ---> sub_transid = x+n-1
>    sub trans a(n)   ---> sub_transid = x+n
> transaction B       ---> transid = x+n+1
>      ... ...
> 
> And the most important is
> a) a trans handler's transid now gets value from sub transid instead of transid.
> b) when a transaction commits, transid may not added by 1, but depend on the
>    biggest sub_transaction of the last neighbour transaction,
>    i.e.
>         B->transid = a(n)->transid + 1,
>         (B->transid - A->transid) >= 1
> c) we start a new sub transaction after a fsync.
> 
> We also ship some 'trans->transid' to 'trans->transaction->transid' to
> ensure btrfs works well and to get rid of WARNings.
> 
> These are used for the new log code.

This is exactly what I had in mind.  I need to read it harder and make
sure it interacts well with the directory logging code, but I love it.

Thanks!

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


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux