[Lustre-discuss] Group Lock in Lustre: write call is blocking

Alexander Zarochentsev Alexander.Zarochentsev at Sun.COM
Wed Mar 18 13:40:18 PDT 2009


Hello,

On 16 March 2009 12:41:20 pascal.deveze at bull.net wrote:
> Hi,
>
> I have seen the group lock Design at:
> http://lists.lustre.org/pipermail/lustre-devel/2006-May/000071.html
> I checked the group lock capabilities with the programme
> parallel_grouplock.c:
> http://lustre.sourcearchive.com/documentation/1.6.5/parallel__grouplo
>ck_8c-source.html
>
> This program runs well, but ... it only tests the read function call.
>
> I have a Lustre version 1.6.6, and on this release, the write is
> blocking (I have to delete my job). I would like to use the write
> call.
>
> Here is a little program to reproduce this.
>
> Could anyone tell me if I made a mistake, if Lustre does not support
> the group lock or if it is a bug in Lustre ?

Thanks for catching it!

Here is the fix:

Index: lustre/llite/file.c
===================================================================
--- lustre/llite/file.c.orig    2009-03-18 23:22:17.000000000 +0300
+++ lustre/llite/file.c 2009-03-18 23:22:31.000000000 +0300
@@ -1144,7 +1144,7 @@ static int ll_is_file_contended(struct f
                 RETURN(0);
         }
         if (fd && (fd->fd_flags & LL_FILE_IGNORE_LOCK))
-                RETURN(1);
+                RETURN(0);
         if (test_bit(LLI_F_CONTENDED, &lli->lli_flags)) {
                 cfs_time_t cur_time = cfs_time_current();
                 cfs_time_t retry_time;

==================================================================
# ./l
GROUP_LOCK OK, we will write on file
write done
We will free the lock
group lock is free

> Thanks very much for your help.


>
> Best Regards,
> P. Devèze

Thanks,
-- 
Alexander "Zam" Zarochentsev
Staff Engineer
Lustre Group, Sun Microsystems



More information about the lustre-discuss mailing list