[Gluster-devel] Reduce number of inodelk/entrylk calls on ec xlator

Xavier Hernandez xhernandez at datalab.es
Tue Jul 1 13:44:30 UTC 2014


On Tuesday 01 July 2014 21:37:57 haiwei.xie-soulinfo wrote:
> hi Xavi,
> 
>    Writev inodelk lock whole file, so write speed is bad. If
> inodelk(offset,len), IDA_KEY_SIZE xattr will be not consistent crossing
> bricks from unorder writev.
> 
>    So how about just use IDA_KEY_VERSION and bricks ia_size to check data
> crash? Drop IDA_KEY_SIZE, and lookup lock whole file, readv lock
> (offset,len).
> 
>    I guess, this can get good performance and data consistent.

File version needs to be updated exactly at the same order on all bricks, like 
size. Allowing unordered writes can generate undetectable inconsistent data if 
two bricks fail at the same time, but have written different things.

Xavi


More information about the Gluster-devel mailing list