ftruncate expend file fop
- finodelk (whole file)
- fgetxattr(get trusted.glusterfs.crypt.att.size value)
- readv(rmw readv head block)
- writev(write head block)
- writev(write full block loop )
- readv(rmw readv tail block)
- writev(write tail block)
- fsetxattr(update new file size)
- finodelk(unlock file)
finodelk: lock whole file
- Allocate GF_FOP_FTRUNCATE local datastruct
- Init local xattr dict
- Get inode info
- Set crypt algo info
- Set lock info (the lock whole file)
- lock.l_len = 0;
- lock.l_start = 0;
- lock.l_type = F_WRLCK;
- lock.l_whence = SEEK_SET;
- 呼叫STACK_WIND finodelk去加鎖整個檔案