gluster-devel
[Top][All Lists]
Advanced

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

Re: [Gluster-devel] Problems with flock functionality with fuse-2.7.0-gl


From: Raghavendra G
Subject: Re: [Gluster-devel] Problems with flock functionality with fuse-2.7.0-gls3 and tls 450
Date: Fri, 10 Aug 2007 09:03:08 +0400

Hi all,
Just an update.

With fuse-2.4.2 kernel module and fuse-2.6.3 libfuse.so, the above program
runs without problems.

On 8/10/07, Harris Landgarten <address@hidden> wrote:
>
> I ran the following ruby program named testlock.rb:
>
> #!/usr/bin/ruby
>
> class File
>   def File.open_locked(*args)
>     File.open(*args) do |f|
>       begin
>         f.flock(File::LOCK_EX)
>         result = yield f
>       ensure
>         f.flock(File::LOCK_UN)
>         return result
>       end
>     end
>   end
> end
>
> file = ARGV.shift || "./testlockfile"
> delay = ARGV.shift || 10
> hostname = `hostname`
> hostname.chomp!
> puts "opening #{file} and locking"
> File.open_locked(file, "w"){ |f| f.puts "test"; puts "#{Time.now} :
> locking file"; sleep delay.to_i; f.puts "finished" }
> puts "#{file} #{hostname} end #{Time.now}"
> puts "#{file} #{hostname} unlocked"
>
> When run on the local file system as:
>
> $ ruby ./testlock.rb testfile 60
>
> I ran another instance on the same client and it blocked until the first
> instance released the LOCK_EX and then completed.
>
> The same test was run on gluster as:
>
> $ ruby ./testlock.rb /mnt/glusterfs/testfile 60
>
> When another instance was started:
>
> $ ruby ./testlock.rb /mnt/glusterfs/test/testfile
> opening /mnt/glusterfs/test/testfile and locking
> ./testlock.rb:6:in `initialize': No such file or directory -
> /mnt/glusterfs/test/testfile (Errno::ENOENT)
>         from ./testlock.rb:6:in `open'
>         from ./testlock.rb:6:in `open_locked'
>         from ./testlock.rb:24
>
> Glusterfs is reporting the LOCK_EX file as ENOENT when another LOCK_EX is
> requested instead of blocking.
>
> Harris
>
>
> _______________________________________________
> Gluster-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/gluster-devel
>



-- 
Raghavendra G


reply via email to

[Prev in Thread] Current Thread [Next in Thread]